Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzy-matching Trajectory Cache Injectable Traits refactor 🔥🔥 #2941

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
99d50cd
Implement trajectory cache
methylDragon May 18, 2024
3025ed6
Add README
methylDragon May 18, 2024
d7095ba
Move test cpp to test directory
methylDragon Jul 23, 2024
728dce2
Clean up logging and comments
methylDragon Jul 23, 2024
7341e64
Use move_group node for time
methylDragon Jul 23, 2024
aa05365
Add and use logger
methylDragon Jul 23, 2024
cb8ab14
Use new move_group accessors
methylDragon Jul 24, 2024
deef7e0
Coerce variable and method names to style
methylDragon Jul 24, 2024
7bf9129
Formatting pass
methylDragon Jul 24, 2024
cec778c
Add docstrings
methylDragon Jul 24, 2024
6222846
Add ability to sort in descending order
methylDragon Jul 24, 2024
10c6ac3
Add RFE for custom cost functions
methylDragon Jul 24, 2024
692f562
Formatting pass
methylDragon Jul 24, 2024
3199c33
Fix build for downstream packages
methylDragon Jul 26, 2024
ac50316
Always get some workspace frame ID
methylDragon Jul 26, 2024
5a54628
Always get some cartesian path request frame ID
methylDragon Jul 26, 2024
caa4669
Fix tests
methylDragon Jul 26, 2024
8b04e2f
Add const qualifiers as appropriate
methylDragon Jul 30, 2024
cf980c1
Add accessors, and support for preserving K plans
methylDragon Jul 30, 2024
cefceca
Edit docs and rename puts to inserts
methylDragon Jul 31, 2024
307fa98
Make clang tidy happy
methylDragon Jul 31, 2024
70fc487
Fix CMakeLists.txt
methylDragon Aug 8, 2024
d12ad95
Make getters const
methylDragon Aug 8, 2024
5e4a622
Clarify frame ID utils docstrings
methylDragon Aug 8, 2024
9a59882
Elaborate on trajectory cache benefits
methylDragon Aug 8, 2024
85aa3f7
Fix CHANGELOG, and make library shared
methylDragon Aug 22, 2024
333fc3d
Merge branch 'main' into ch3/trajectory_cache
methylDragon Sep 11, 2024
f2eccc2
Add utils library with test fixtures
methylDragon Jul 31, 2024
2d437ab
Add features interface with constant features
methylDragon Aug 1, 2024
1122641
Add constraint feature extractor utils
methylDragon Aug 1, 2024
465fd10
Add RobotState.joint_state feature extractor utils
methylDragon Aug 2, 2024
95d0f0e
Add MotionPlanRequest features
methylDragon Aug 1, 2024
6890dd5
Add GetCartesianPlanRequest features
methylDragon Aug 2, 2024
ea752ef
Use namespace declarations and do cleanups
methylDragon Aug 3, 2024
6b8eced
Add CacheInsertPolicyInterface and AlwaysInsertNeverPrunePolicy
methylDragon Aug 3, 2024
938c83c
Add CartesianAlwaysInsertNeverPrunePolicy
methylDragon Aug 4, 2024
bad5e8b
Init policy features on construction
methylDragon Aug 5, 2024
5e9574a
Add execution time extraction util
methylDragon Aug 5, 2024
af41671
Add BestSeenExecutionTimePolicy and rename methods
methylDragon Aug 5, 2024
9d19df5
Add CartesianBestSeenExecutionTimePolicy
methylDragon Aug 5, 2024
715e303
Return reason string from cache insert policy methods
methylDragon Aug 5, 2024
df364a6
Refactor TrajectoryCache to use the interfaces
methylDragon Aug 5, 2024
f30f57f
Move test fixtures to their own directory
methylDragon Aug 5, 2024
011ff7d
Fix bugs and build
methylDragon Aug 6, 2024
fdb0a79
Fix formatting and clang-tidy
methylDragon Aug 7, 2024
4427aef
Update CHANGELOG
methylDragon Aug 7, 2024
2a49bed
Make clang-tidy happy
methylDragon Aug 8, 2024
ad3f25a
Update README
methylDragon Aug 9, 2024
330df34
Enable unrelated query matching test
methylDragon Aug 20, 2024
68e4268
Make libraries shared
methylDragon Aug 22, 2024
56766e9
Merge remote-tracking branch 'moveit/main' into ch3/trajectory-cache-…
methylDragon Sep 17, 2024
7848b49
Merge remote-tracking branch 'moveit/main' into ch3/trajectory-cache-…
methylDragon Oct 22, 2024
a70b660
Sidestep deprecation warning for computeCartesianPath
methylDragon Oct 22, 2024
ff61b50
Fix typo in trajectory cache utils test
methylDragon Oct 22, 2024
2a3f274
Merge branch 'main' into ch3/trajectory-cache-refactor
sjahr Oct 25, 2024
1ddac46
Merge branch 'main' into ch3/trajectory-cache-refactor
methylDragon Oct 29, 2024
4118f49
Merge branch 'main' into ch3/trajectory-cache-refactor
methylDragon Nov 6, 2024
8575486
Merge branch 'main' into ch3/trajectory-cache-refactor
methylDragon Nov 7, 2024
f456a5c
Merge branch 'main' into ch3/trajectory-cache-refactor
methylDragon Nov 14, 2024
e6ab6ea
Merge branch 'main' into ch3/trajectory-cache-refactor
methylDragon Nov 15, 2024
f1f3c44
Exclude test on humble
sjahr Nov 15, 2024
a382562
Add missing header
sjahr Nov 15, 2024
f645b50
Merge branch 'main' into ch3/trajectory-cache-refactor
sjahr Nov 19, 2024
e386dc8
Merge branch 'main' into ch3/trajectory-cache-refactor
sjahr Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespell_words
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
aas
ang
ans
AppendT
atleast
ba
brin
Expand Down
3 changes: 2 additions & 1 deletion moveit_ros/trajectory_cache/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog for package moveit_ros_trajectory_cache

2.11.0 (2024-09-16)
-------------------
* Refactor `moveit_ros/trajectory_cache` package to allow feature extraction and cache insert policy injection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under the Forthcoming header to play nicely with the catkin release tools, as 2.11 is already out


0.1.0 (2024-05-17)
------------------
* Add ``moveit_ros_trajectory_cache`` package for trajectory caching.
* Add ``moveit_ros/trajectory_cache`` package for trajectory caching.
82 changes: 60 additions & 22 deletions moveit_ros/trajectory_cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,62 @@ set(TRAJECTORY_CACHE_DEPENDENCIES
trajectory_msgs
warehouse_ros)

set(TRAJECTORY_CACHE_LIBRARIES
moveit_ros_trajectory_cache_utils_lib
moveit_ros_trajectory_cache_features_lib
moveit_ros_trajectory_cache_cache_insert_policies_lib
moveit_ros_trajectory_cache_lib)

# Utils library
add_library(moveit_ros_trajectory_cache_utils_lib SHARED src/utils/utils.cpp)
generate_export_header(moveit_ros_trajectory_cache_utils_lib)
target_include_directories(
moveit_ros_trajectory_cache_utils_lib
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/moveit_ros_trajectory_cache>)
ament_target_dependencies(moveit_ros_trajectory_cache_utils_lib
${TRAJECTORY_CACHE_DEPENDENCIES})

# Features library
add_library(
moveit_ros_trajectory_cache_features_lib SHARED
src/features/motion_plan_request_features.cpp
src/features/get_cartesian_path_request_features.cpp)
generate_export_header(moveit_ros_trajectory_cache_features_lib)
target_link_libraries(moveit_ros_trajectory_cache_features_lib
moveit_ros_trajectory_cache_utils_lib)
target_include_directories(
moveit_ros_trajectory_cache_features_lib
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/moveit_ros_trajectory_cache>)
ament_target_dependencies(moveit_ros_trajectory_cache_features_lib
${TRAJECTORY_CACHE_DEPENDENCIES})

# Cache insert policies library
add_library(
moveit_ros_trajectory_cache_cache_insert_policies_lib SHARED
src/cache_insert_policies/always_insert_never_prune_policy.cpp
src/cache_insert_policies/best_seen_execution_time_policy.cpp)
generate_export_header(moveit_ros_trajectory_cache_cache_insert_policies_lib)
target_link_libraries(
moveit_ros_trajectory_cache_cache_insert_policies_lib
moveit_ros_trajectory_cache_features_lib
moveit_ros_trajectory_cache_utils_lib)
target_include_directories(
moveit_ros_trajectory_cache_cache_insert_policies_lib
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/moveit_ros_trajectory_cache>)
ament_target_dependencies(moveit_ros_trajectory_cache_cache_insert_policies_lib
${TRAJECTORY_CACHE_DEPENDENCIES})

# Trajectory cache library
add_library(moveit_ros_trajectory_cache_lib SHARED src/trajectory_cache.cpp)
generate_export_header(moveit_ros_trajectory_cache_lib)
target_link_libraries(
moveit_ros_trajectory_cache_lib
moveit_ros_trajectory_cache_cache_insert_policies_lib
moveit_ros_trajectory_cache_features_lib
moveit_ros_trajectory_cache_utils_lib)
target_include_directories(
moveit_ros_trajectory_cache_lib
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand All @@ -39,7 +92,7 @@ ament_target_dependencies(moveit_ros_trajectory_cache_lib
${TRAJECTORY_CACHE_DEPENDENCIES})

install(
TARGETS moveit_ros_trajectory_cache_lib
TARGETS ${TRAJECTORY_CACHE_LIBRARIES}
EXPORT moveit_ros_trajectory_cacheTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
Expand All @@ -48,29 +101,14 @@ install(
DESTINATION include/moveit_ros_trajectory_cache)

install(DIRECTORY include/ DESTINATION include/moveit_ros_trajectory_cache)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_ros_trajectory_cache_lib_export.h
DESTINATION include/moveit_ros_trajectory_cache)

if(BUILD_TESTING)
find_package(ament_cmake_pytest REQUIRED)
find_package(launch_testing_ament_cmake REQUIRED)
find_package(rmf_utils REQUIRED)
find_package(warehouse_ros_sqlite REQUIRED)

# This test executable is run by the pytest_test, since a node is required for
# testing move groups
add_executable(test_trajectory_cache test/test_trajectory_cache.cpp)
target_link_libraries(test_trajectory_cache moveit_ros_trajectory_cache_lib)
ament_target_dependencies(test_trajectory_cache warehouse_ros_sqlite)

install(TARGETS test_trajectory_cache RUNTIME DESTINATION lib/${PROJECT_NAME})

ament_add_pytest_test(
test_trajectory_cache_py "test/test_trajectory_cache.py" WORKING_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}")
# Install export headers for each library
foreach(lib_target ${TRAJECTORY_CACHE_LIBRARIES})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${lib_target}_export.h
DESTINATION include/moveit_ros_trajectory_cache)
endforeach()

endif()
add_subdirectory(test)

ament_export_targets(moveit_ros_trajectory_cacheTargets HAS_LIBRARY_TARGET)
ament_export_dependencies(${TRAJECTORY_CACHE_DEPENDENCIES})
Expand Down
Loading
Loading