### Run MoveIt Setup Assistant Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/README.md Launches the MoveIt Setup Assistant GUI. No additional setup is required. ```bash ros2 run moveit_setup_assistant moveit_setup_assistant ``` -------------------------------- ### Installation Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_assistant/CMakeLists.txt Specifies the installation paths for binaries, headers, and support files. ```cmake install( TARGETS moveit_setup_assistant moveit_setup_assistant_updater EXPORT moveit_setup_assistantTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION lib/moveit_setup_assistant INCLUDES DESTINATION include/moveit_setup_assistant) install(DIRECTORY include/ DESTINATION include/moveit_setup_assistant) ``` -------------------------------- ### Install Targets and Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/trajectory_cache/CMakeLists.txt Configures installation rules for libraries, headers, and export files. ```cmake install( TARGETS moveit_ros_trajectory_cache ${TRAJECTORY_CACHE_LIBRARIES} EXPORT moveit_ros_trajectory_cacheTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_ros_trajectory_cache) install(DIRECTORY include/ DESTINATION include/moveit_ros_trajectory_cache) # 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() ``` -------------------------------- ### Installation Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/move_group/CMakeLists.txt Specifies the installation destination for the built executables. ```cmake install(TARGETS move_group list_move_group_capabilities RUNTIME DESTINATION lib/moveit_ros_move_group) ``` -------------------------------- ### Installation Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/planning/kinematics_plugin_loader/CMakeLists.txt Defines the installation paths for the generated parameter library and header files. ```cmake install( TARGETS kinematics_parameters EXPORT ${PROJECT_NAME}Targets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin) install(DIRECTORY include/ DESTINATION include/moveit_ros_planning) ``` -------------------------------- ### Configure Testing and Installation Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_srdf_plugins/CMakeLists.txt Sets up unit tests and defines installation rules for the package. ```cmake if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) ament_add_gtest(test_srdf test/test_srdf.cpp) target_link_libraries(test_srdf moveit_setup_srdf_plugins) endif() install( TARGETS moveit_setup_srdf_plugins EXPORT moveit_setup_srdf_pluginsTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_setup_srdf_plugins) install(FILES moveit_setup_framework_plugins.xml DESTINATION share/moveit_setup_srdf_plugins) install(DIRECTORY include/ DESTINATION include/moveit_setup_srdf_plugins) ament_export_targets(moveit_setup_srdf_pluginsTargets HAS_LIBRARY_TARGET) pluginlib_export_plugin_description_file(moveit_setup_framework moveit_setup_framework_plugins.xml) ament_package() ``` -------------------------------- ### Installation and Export Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_plugins/moveit_simple_controller_manager/CMakeLists.txt Configures installation paths and exports targets and plugin descriptions. ```cmake install( TARGETS moveit_simple_controller_manager EXPORT moveit_simple_controller_managerTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_simple_controller_manager) install(DIRECTORY include/ DESTINATION include/moveit_simple_controller_manager) ament_export_targets(moveit_simple_controller_managerTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS} Boost) pluginlib_export_plugin_description_file( moveit_core moveit_simple_controller_manager_plugin_description.xml) ament_package(CONFIG_EXTRAS ConfigExtras.cmake) ``` -------------------------------- ### Install Targets and Resources Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/move_group/CMakeLists.txt Defines installation rules for libraries, headers, scripts, and plugin descriptions. ```cmake install( TARGETS moveit_ros_move_group moveit_move_group_capabilities_base EXPORT moveit_ros_move_groupTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) install( TARGETS moveit_move_group_default_capabilities EXPORT moveit_move_group_default_capabilitiesTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) install(DIRECTORY include/ DESTINATION include/moveit_ros_move_group) install(PROGRAMS scripts/load_map scripts/save_map DESTINATION lib/moveit_ros_move_group) ``` -------------------------------- ### Install Targets and Directories Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner/CMakeLists.txt Defines installation paths for the package libraries and header files. ```cmake install( TARGETS pilz_industrial_motion_planner cartesian_limits_parameters joint_limits_common planning_context_loader_base planning_context_loader_ptp planning_context_loader_lin planning_context_loader_circ planning_context_loader_polyline command_list_manager sequence_capability trajectory_generation_common EXPORT pilz_industrial_motion_plannerTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/pilz_industrial_motion_planner) install(DIRECTORY include/ DESTINATION include/pilz_industrial_motion_planner) ``` -------------------------------- ### Build and Install Configuration Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/planning/CMakeLists.txt Includes subdirectories, defines the interface library, and sets up installation rules for targets and plugins. ```cmake include_directories(${THIS_PACKAGE_INCLUDE_DIRS}) include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS}) add_subdirectory(collision_plugin_loader) add_subdirectory(constraint_sampler_manager_loader) add_subdirectory(kinematics_plugin_loader) add_subdirectory(moveit_cpp) add_subdirectory(plan_execution) add_subdirectory(planning_components_tools) add_subdirectory(planning_pipeline_interfaces) add_subdirectory(planning_pipeline) add_subdirectory(planning_request_adapter_plugins) add_subdirectory(planning_response_adapter_plugins) add_subdirectory(planning_scene_monitor) add_subdirectory(rdf_loader) add_subdirectory(robot_model_loader) add_subdirectory(srdf_publisher_node) add_subdirectory(trajectory_execution_manager) # Create an umbrella INTERFACE target so downstream packages can use # moveit_ros_planning::moveit_ros_planning to link all libraries at once. add_library(moveit_ros_planning INTERFACE) target_link_libraries(moveit_ros_planning INTERFACE ${THIS_PACKAGE_LIBRARIES}) install( TARGETS moveit_ros_planning ${THIS_PACKAGE_LIBRARIES} EXPORT moveit_ros_planningTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_ros_planning) # install plugins as separate export set install( TARGETS moveit_default_planning_response_adapter_plugins moveit_default_planning_request_adapter_plugins LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_ros_planning) ament_export_targets(moveit_ros_planningTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) ``` -------------------------------- ### Basic CMakeLists.txt for MoveIt Package Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_framework/templates/CMakeLists.txt This snippet defines the minimum CMake version, project name, and finds the ament_cmake package. It also includes installation rules for launch, config, and setup assistant files. ```cmake cmake_minimum_required(VERSION 3.22) project([GENERATED_PACKAGE_NAME]) find_package(ament_cmake REQUIRED) ament_package() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/launch") install( DIRECTORY launch DESTINATION share/${PROJECT_NAME} PATTERN "setup_assistant.launch" EXCLUDE) endif() install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(FILES .setup_assistant DESTINATION share/${PROJECT_NAME}) ``` -------------------------------- ### Define Installation Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_simulation/CMakeLists.txt Specifies installation paths for templates, targets, and plugin configuration files. ```cmake install(DIRECTORY templates DESTINATION share/moveit_setup_simulation) install( TARGETS moveit_setup_simulation EXPORT moveit_setup_simulationTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_setup_simulation) install(FILES moveit_setup_framework_plugins.xml DESTINATION share/moveit_setup_simulation) install(DIRECTORY include/ DESTINATION include/moveit_setup_simulation) ``` -------------------------------- ### Install Header Files Source: https://github.com/moveit/moveit2/blob/main/moveit_kinematics/srv_kinematics_plugin/CMakeLists.txt Installs the include directory to the specified destination. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_kinematics) ``` -------------------------------- ### Installation Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_core/collision_distance_field/CMakeLists.txt Defines the installation paths for header files and generated export headers. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_core) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_collision_distance_field_export.h DESTINATION include/moveit_core) ``` -------------------------------- ### Install include directory Source: https://github.com/moveit/moveit2/blob/main/moveit_core/distance_field/CMakeLists.txt Specifies the installation path for the library header files. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_core) ``` -------------------------------- ### Installation and Export Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/chomp/chomp_interface/CMakeLists.txt Configures installation paths, exports targets, and registers the plugin description file. ```cmake install( TARGETS moveit_chomp_interface moveit_chomp_planner_plugin EXPORT moveit_planners_chompTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) ament_export_targets(moveit_planners_chompTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) pluginlib_export_plugin_description_file(moveit_core chomp_interface_plugin_description.xml) ament_package() ``` -------------------------------- ### Plugin Export and Installation Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/CMakeLists.txt Exports the plugin description and installs the build artifacts. ```cmake pluginlib_export_plugin_description_file( moveit_core prbt_manipulator_moveit_ikfast_plugin_description.xml) install( TARGETS prbt_manipulator_moveit_ikfast_plugin prbt_ikfast_kinematics_parameters EXPORT moveit_resources_prbt_ikfast_manipulator_pluginTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_resources_prbt_ikfast_manipulator_plugin) ament_export_targets(moveit_resources_prbt_ikfast_manipulator_pluginTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS} generate_parameter_library) ament_package() ``` -------------------------------- ### Install Library Files Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/planning/trajectory_execution_manager/CMakeLists.txt Defines the installation paths for header files and generated export headers. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_ros_planning) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_trajectory_execution_manager_export.h DESTINATION include/moveit_ros_planning) ``` -------------------------------- ### IKFast Kinematics Plugin CMake Configuration Source: https://github.com/moveit/moveit2/blob/main/moveit_kinematics/ikfast_kinematics_plugin/templates/CMakeLists.txt Standard CMake setup for building a MoveIt IKFast plugin, including dependency resolution and library installation. ```cmake cmake_minimum_required(VERSION 3.22) project(_PACKAGE_NAME_) if(NOT "${CMAKE_CXX_STANDARD}") set(CMAKE_CXX_STANDARD 14) endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) find_package(ament_cmake REQUIRED) find_package(moveit_core REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(tf2_kdl REQUIRED) find_package(tf2_eigen REQUIRED) find_package(LAPACK REQUIRED) find_package(generate_parameter_library REQUIRED) include_directories(include) generate_parameter_library( ikfast_kinematics_parameters # cmake target name for the parameter library src/ikfast_kinematics_parameters.yaml # path to input yaml file ) set(IKFAST_LIBRARY_NAME _LIBRARY_NAME_) add_library(${IKFAST_LIBRARY_NAME} SHARED src/_ROBOT_NAME___GROUP_NAME__ikfast_moveit_plugin.cpp) # suppress warnings about unused variables in OpenRave's solver code target_compile_options(${IKFAST_LIBRARY_NAME} PRIVATE -Wno-unused-variable -Wno-unused-parameter) target_link_libraries( ${IKFAST_LIBRARY_NAME} ikfast_kinematics_parameters rclcpp::rclcpp moveit_core::moveit_core pluginlib::pluginlib tf2_kdl::tf2_kdl ${orocos_kdl_LIBRARIES} tf2_eigen::tf2_eigen ${LAPACK_LIBRARIES}) install( TARGETS ${IKFAST_LIBRARY_NAME} ikfast_kinematics_parameters EXPORT ${PROJECT_NAME}Targets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) pluginlib_export_plugin_description_file( moveit_core _ROBOT_NAME___GROUP_NAME__moveit_ikfast_plugin_description.xml) ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET) ament_export_libraries(${IKFAST_LIBRARY_NAME}) ament_export_dependencies(moveit_core) ament_export_dependencies(pluginlib) ament_export_dependencies(rclcpp) ament_export_dependencies(tf2_kdl) ament_export_dependencies(tf2_eigen) ament_export_dependencies(generate_parameter_library) ament_package() ``` -------------------------------- ### Install Test Executable Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/trajectory_cache/test/CMakeLists.txt Installs the test executable to the project library directory. ```cmake install(TARGETS test_trajectory_cache RUNTIME DESTINATION lib/${PROJECT_NAME}) ``` -------------------------------- ### Install Include Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/perception/point_containment_filter/CMakeLists.txt Specifies the installation directory for the project header files. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_ros_perception) ``` -------------------------------- ### Install Directories Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/moveit_servo/CMakeLists.txt Installs project directories including headers, launch files, and configuration files. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_servo) install(DIRECTORY launch DESTINATION share/moveit_servo) install(DIRECTORY config DESTINATION share/moveit_servo) ``` -------------------------------- ### Launch the Hybrid Planning demo Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/hybrid_planning/README.md Execute the provided launch file to start the hybrid planning demonstration. ```bash ros2 launch moveit_hybrid_planning hybrid_planning_demo.launch.py ``` -------------------------------- ### Install Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_core/collision_detection_fcl/CMakeLists.txt Installs the public headers and generated export headers for the library. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_core) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_collision_detection_fcl_export.h DESTINATION include/moveit_core) ``` -------------------------------- ### Install Plugin Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/visualization/trajectory_rviz_plugin/CMakeLists.txt Specifies the installation directory for the plugin header files. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_ros_visualization) ``` -------------------------------- ### Installation and Export Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner_testutils/CMakeLists.txt Configures installation paths for the library and headers, and exports targets for downstream packages. ```cmake install( TARGETS pilz_industrial_motion_planner_testutils EXPORT pilz_industrial_motion_planner_testutilsTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/pilz_industrial_motion_planner_testutils) install(DIRECTORY include/ DESTINATION include/pilz_industrial_motion_planner_testutils) ament_export_targets(pilz_industrial_motion_planner_testutilsTargets HAS_LIBRARY_TARGET) ament_export_dependencies(rclcpp moveit_core moveit_msgs tf2_eigen) ament_package() ``` -------------------------------- ### Installation and Export Rules Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/chomp/chomp_motion_planner/CMakeLists.txt Configures installation paths for the library and exports targets for downstream packages. ```cmake install( TARGETS chomp_motion_planner EXPORT chomp_motion_plannerTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/chomp_motion_planner) install(DIRECTORY include/ DESTINATION include/chomp_motion_planner) ament_export_targets(chomp_motion_plannerTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_EXPORT_DEPENDS}) ament_package() ``` -------------------------------- ### Install library headers and test assets Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/planning/rdf_loader/CMakeLists.txt Defines the installation directories for include files and test-related data. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_ros_planning) install(DIRECTORY test/data test/launch DESTINATION share/${PROJECT_NAME}/rdf_loader/test) ``` -------------------------------- ### Register Plugins and Install Targets Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/visualization/CMakeLists.txt Exports plugin descriptions and defines installation rules for the package. ```cmake pluginlib_export_plugin_description_file( rviz_common motion_planning_rviz_plugin_description.xml) pluginlib_export_plugin_description_file(rviz_common trajectory_rviz_plugin_description.xml) pluginlib_export_plugin_description_file( rviz_common planning_scene_rviz_plugin_description.xml) pluginlib_export_plugin_description_file( rviz_common robot_state_rviz_plugin_description.xml) # Create an umbrella INTERFACE target so downstream packages can use # moveit_ros_visualization::moveit_ros_visualization to link all libraries at # once. add_library(moveit_ros_visualization INTERFACE) target_link_libraries(moveit_ros_visualization INTERFACE ${THIS_PACKAGE_LIBRARIES}) install( TARGETS moveit_ros_visualization ${THIS_PACKAGE_LIBRARIES} EXPORT moveit_ros_visualizationTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_ros_visualization) ament_export_targets(moveit_ros_visualizationTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) ament_package(CONFIG_EXTRAS ConfigExtras.cmake) include_directories("${OGRE_PREFIX_DIR}/include") ``` -------------------------------- ### Install Test Targets and Assets Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner/test/unit_tests/CMakeLists.txt Configures the installation paths for test binaries, configuration files, and launch scripts. ```cmake install( TARGETS ${UNIT_TEST_SOURCEFILES} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION lib/${PROJECT_NAME}) install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) ``` -------------------------------- ### Install MoveIt Servo Binaries Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/moveit_servo/CMakeLists.txt Installs the executable binaries for MoveIt Servo tools and demos. ```cmake install( TARGETS demo_joint_jog demo_twist demo_pose servo_node servo_keyboard_input ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION lib/moveit_servo) ``` -------------------------------- ### Install Headers and Export Files Source: https://github.com/moveit/moveit2/blob/main/moveit_core/collision_detection_bullet/CMakeLists.txt Defines installation rules for the library headers and generated export headers. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_core) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_collision_detection_bullet_export.h DESTINATION include/moveit_core) ``` -------------------------------- ### Install moveit_py_utils Targets and Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_py/src/moveit/moveit_py_utils/CMakeLists.txt Specifies installation destinations for the library binaries and header files. ```cmake install( TARGETS moveit_py_utils EXPORT moveit_py_utilsTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) install(DIRECTORY include/ DESTINATION include/moveit_py) ``` -------------------------------- ### Basic CMakeLists.txt for MoveIt Plugins Source: https://github.com/moveit/moveit2/blob/main/moveit_plugins/moveit_plugins/CMakeLists.txt Sets up the minimum CMake version, project name, and finds the ament_cmake package. It concludes by calling ament_package() to finalize package setup. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_plugins) find_package(ament_cmake REQUIRED) ament_package() ``` -------------------------------- ### CMakeLists.txt for moveit_resources_prbt_pg70_support Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/test_configs/prbt_pg70_support/CMakeLists.txt This is the main CMakeLists.txt file for the package. It sets up the project, finds dependencies, and defines installation rules for package resources. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_resources_prbt_pg70_support) find_package(ament_cmake REQUIRED) ament_package() # ############################################################################## # Install ## # ############################################################################## install(DIRECTORY config DESTINATION share/moveit_resources_prbt_pg70_support) install(DIRECTORY meshes DESTINATION share/moveit_resources_prbt_pg70_support) install(DIRECTORY urdf DESTINATION share/moveit_resources_prbt_pg70_support) ``` -------------------------------- ### Interface Target and Installation Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/hybrid_planning/CMakeLists.txt Creates an interface target for linking and defines installation rules for libraries and configuration files. ```cmake # Create an umbrella INTERFACE target so downstream packages can use # moveit_hybrid_planning::moveit_hybrid_planning to link all libraries at once. add_library(moveit_hybrid_planning INTERFACE) target_link_libraries(moveit_hybrid_planning INTERFACE ${LIBRARIES}) install( TARGETS moveit_hybrid_planning ${LIBRARIES} EXPORT moveit_hybrid_planningTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_hybrid_planning) install( TARGETS cancel_action ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION lib/moveit_hybrid_planning INCLUDES DESTINATION include/moveit_hybrid_planning) install(DIRECTORY ${THIS_PACKAGE_INCLUDE_DIRS} DESTINATION include/moveit_hybrid_planning) install(DIRECTORY test/launch DESTINATION share/moveit_hybrid_planning) install(DIRECTORY test/config DESTINATION share/moveit_hybrid_planning) ``` -------------------------------- ### Install Smoothing Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_core/online_signal_smoothing/CMakeLists.txt Installs the header files and generated export headers for the smoothing libraries. ```cmake install(DIRECTORY include/ DESTINATION include/moveit_core) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_smoothing_base_export.h DESTINATION include/moveit_core) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_acceleration_filter_export.h DESTINATION include/moveit_core) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_butterworth_filter_export.h DESTINATION include/moveit_core) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/moveit_ruckig_filter_export.h DESTINATION include/moveit_core) ``` -------------------------------- ### Basic MoveIt CMakeLists.txt Setup Source: https://github.com/moveit/moveit2/blob/main/moveit/CMakeLists.txt This snippet shows the essential CMake commands for initializing a MoveIt package. It sets the minimum required CMake version, defines the project name, and finds the necessary ament_cmake build system. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit) find_package(ament_cmake REQUIRED) ament_package() ``` -------------------------------- ### Install MoveIt Version Header and Executable Source: https://github.com/moveit/moveit2/blob/main/moveit_core/version/CMakeLists.txt Installs the generated version.hpp header file to the include directory and the 'moveit_version' executable to the bin directory. ```cmake install(FILES "${CMAKE_BINARY_DIR}/include/moveit_core/moveit/version.hpp" DESTINATION include/moveit_core/moveit) install(TARGETS moveit_version RUNTIME DESTINATION bin) ``` -------------------------------- ### Install MoveIt Core Targets Source: https://github.com/moveit/moveit2/blob/main/moveit_core/CMakeLists.txt Configures installation paths and export targets for the core libraries and plugins. ```cmake install( TARGETS moveit_core moveit_collision_detection moveit_collision_detection_bullet moveit_collision_detection_fcl moveit_collision_distance_field moveit_constraint_samplers moveit_distance_field moveit_dynamics_solver moveit_exceptions moveit_kinematic_constraints moveit_kinematics_base moveit_kinematics_metrics moveit_macros moveit_planning_interface moveit_planning_scene moveit_robot_model moveit_robot_state moveit_robot_trajectory moveit_smoothing_base moveit_test_utils moveit_trajectory_processing moveit_transforms moveit_utils EXPORT moveit_coreTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) ``` ```cmake install( TARGETS collision_detector_bullet_plugin collision_detector_fcl_plugin moveit_acceleration_filter moveit_acceleration_filter_parameters moveit_butterworth_filter moveit_butterworth_filter_parameters moveit_ruckig_filter moveit_ruckig_filter_parameters EXPORT moveit_core_pluginTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) ``` -------------------------------- ### Install MoveIt Servo Targets Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/moveit_servo/CMakeLists.txt Installs the core MoveIt Servo libraries and headers to the specified destination directories. ```cmake install( TARGETS moveit_servo moveit_servo_lib_cpp moveit_servo_lib_ros moveit_servo_lib_parameters EXPORT moveit_servoTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_servo) ``` -------------------------------- ### Retrieve SetupConfig Instance Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/README.md Get a shared pointer to a generic SetupConfig instance by its name and class. The config_class specifies how to load it using pluginlib. ```cpp SetupConfigPtr get(string config_name, string config_class) ``` -------------------------------- ### Install Executable Target Source: https://github.com/moveit/moveit2/blob/main/moveit_core/utils/test/CMakeLists.txt Installs the built executable to a destination directory, typically for runtime execution by testing frameworks. ```cmake install(TARGETS logger_dut DESTINATION lib/${PROJECT_NAME}) ``` -------------------------------- ### Target Export and Installation Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/planning_interface/CMakeLists.txt Creates an interface target for downstream packages and defines installation rules for libraries and headers. ```cmake add_library(moveit_ros_planning_interface INTERFACE) target_link_libraries(moveit_ros_planning_interface INTERFACE ${THIS_PACKAGE_LIBRARIES}) install( TARGETS moveit_ros_planning_interface ${THIS_PACKAGE_LIBRARIES} EXPORT moveit_ros_planning_interfaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_ros_planning_interface) ament_export_targets(moveit_ros_planning_interfaceTargets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) ament_package(CONFIG_EXTRAS ConfigExtras.cmake) ``` -------------------------------- ### CMake Configuration for moveit_setup_controllers Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_controllers/CMakeLists.txt The complete CMake configuration for the moveit_setup_controllers package, handling dependencies, library definition, and installation. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_setup_controllers LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() find_package(ament_cmake REQUIRED) find_package(ament_cmake_ros REQUIRED) find_package(ament_index_cpp REQUIRED) # rviz switched to Qt6 in version 15.1: https://github.com/ros2/rviz/pull/1635 find_package(rviz2 QUIET) if(rviz2_VERSION VERSION_GREATER_EQUAL 15.1) find_package(Qt6 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 6) # Hint for transitive deps that use find_package(QT NAMES Qt6 Qt5 ...) which # may incorrectly resolve to Qt5 due to CMake's ascending path order set(QT_DIR "${Qt6_DIR}") else() find_package(Qt5 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 5) endif() find_package(moveit_setup_framework REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) add_definitions(-DQT_NO_KEYWORDS) add_library( moveit_setup_controllers src/control_xacro_config.cpp src/controller_edit_widget.cpp src/controllers.cpp src/controllers_widget.cpp src/controllers_config.cpp src/modified_urdf_config.cpp src/moveit_controllers_config.cpp src/moveit_controllers_widget.cpp src/ros2_controllers_config.cpp src/ros2_controllers_widget.cpp src/urdf_modifications.cpp src/urdf_modifications_widget.cpp include/moveit_setup_controllers/controller_edit_widget.hpp include/moveit_setup_controllers/controllers_widget.hpp include/moveit_setup_controllers/urdf_modifications_widget.hpp) target_include_directories( moveit_setup_controllers PUBLIC $ $) target_link_libraries( moveit_setup_controllers ament_index_cpp::ament_index_cpp moveit_setup_framework::moveit_setup_framework pluginlib::pluginlib rclcpp::rclcpp) if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) ament_add_gtest(test_controllers test/test_controllers.cpp) target_link_libraries(test_controllers moveit_setup_controllers) endif() install(DIRECTORY templates DESTINATION share/moveit_setup_controllers) install( TARGETS moveit_setup_controllers EXPORT moveit_setup_controllersTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_setup_controllers) install(FILES moveit_setup_framework_plugins.xml DESTINATION share/moveit_setup_controllers) install(DIRECTORY include/ DESTINATION include/moveit_setup_controllers) install(DIRECTORY launch DESTINATION share/moveit_setup_controllers) ament_export_targets(moveit_setup_controllersTargets HAS_LIBRARY_TARGET) pluginlib_export_plugin_description_file(moveit_setup_framework moveit_setup_framework_plugins.xml) ament_package() ``` -------------------------------- ### CMake Build Configuration Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_app_plugins/CMakeLists.txt The primary CMake configuration for the moveit_setup_app_plugins package, handling dependencies, library definition, and installation. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_setup_app_plugins LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() find_package(ament_cmake REQUIRED) find_package(ament_cmake_ros REQUIRED) find_package(ament_index_cpp REQUIRED) # rviz switched to Qt6 in version 15.1: https://github.com/ros2/rviz/pull/1635 find_package(rviz2 QUIET) if(rviz2_VERSION VERSION_GREATER_EQUAL 15.1) find_package(Qt6 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 6) # Hint for transitive deps that use find_package(QT NAMES Qt6 Qt5 ...) which # may incorrectly resolve to Qt5 due to CMake's ascending path order set(QT_DIR "${Qt6_DIR}") else() find_package(Qt5 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 5) endif() find_package(moveit_ros_visualization REQUIRED) find_package(moveit_setup_framework REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) add_definitions(-DQT_NO_KEYWORDS) add_library( moveit_setup_app_plugins src/launches.cpp src/launches_widget.cpp src/launches_config.cpp src/perception_config.cpp src/perception.cpp src/perception_widget.cpp include/moveit_setup_app_plugins/launches_widget.hpp include/moveit_setup_app_plugins/perception_widget.hpp) target_include_directories( moveit_setup_app_plugins PUBLIC $ $) target_link_libraries( moveit_setup_app_plugins ament_index_cpp::ament_index_cpp moveit_ros_visualization::moveit_ros_visualization moveit_setup_framework::moveit_setup_framework pluginlib::pluginlib rclcpp::rclcpp) if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) ament_add_gtest(test_perception test/test_perception.cpp) target_link_libraries(test_perception moveit_setup_app_plugins) endif() install(DIRECTORY templates DESTINATION share/moveit_setup_app_plugins) install( TARGETS moveit_setup_app_plugins EXPORT moveit_setup_app_pluginsTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_setup_app_plugins) install(FILES moveit_setup_framework_plugins.xml DESTINATION share/moveit_setup_app_plugins) install(DIRECTORY include/ DESTINATION include/moveit_setup_app_plugins) ament_export_targets(moveit_setup_app_pluginsTargets HAS_LIBRARY_TARGET) pluginlib_export_plugin_description_file(moveit_setup_framework moveit_setup_framework_plugins.xml) ament_package() ``` -------------------------------- ### CMake Build Configuration Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_core_plugins/CMakeLists.txt The primary CMake configuration file for the moveit_setup_core_plugins package, handling dependencies, library definitions, and installation. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_setup_core_plugins LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() find_package(ament_cmake REQUIRED) find_package(ament_cmake_ros REQUIRED) find_package(ament_index_cpp REQUIRED) # rviz switched to Qt6 in version 15.1: https://github.com/ros2/rviz/pull/1635 find_package(rviz2 QUIET) if(rviz2_VERSION VERSION_GREATER_EQUAL 15.1) find_package(Qt6 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 6) # Hint for transitive deps that use find_package(QT NAMES Qt6 Qt5 ...) which # may incorrectly resolve to Qt5 due to CMake's ascending path order set(QT_DIR "${Qt6_DIR}") else() find_package(Qt5 REQUIRED COMPONENTS Core Widgets) set(QT_VERSION_MAJOR 5) endif() find_package(moveit_ros_visualization REQUIRED) find_package(moveit_setup_framework REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(srdfdom REQUIRED) find_package(urdf REQUIRED) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) add_definitions(-DQT_NO_KEYWORDS) add_library( ${PROJECT_NAME} src/start_screen.cpp src/start_screen_widget.cpp src/configuration_files.cpp src/configuration_files_widget.cpp src/author_information.cpp src/author_information_widget.cpp include/moveit_setup_core_plugins/start_screen_widget.hpp include/moveit_setup_core_plugins/configuration_files_widget.hpp include/moveit_setup_core_plugins/author_information_widget.hpp) target_include_directories( ${PROJECT_NAME} PUBLIC $ $) target_link_libraries( ${PROJECT_NAME} ament_index_cpp::ament_index_cpp moveit_ros_visualization::moveit_ros_visualization moveit_setup_framework::moveit_setup_framework pluginlib::pluginlib rclcpp::rclcpp srdfdom::srdfdom urdf::urdf) install( TARGETS moveit_setup_core_plugins EXPORT moveit_setup_core_pluginsTargets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include/moveit_setup_core_plugins) install(FILES moveit_setup_framework_plugins.xml DESTINATION share/${PROJECT_NAME}) install(DIRECTORY include/ DESTINATION include/moveit_setup_core_plugins) ament_export_targets(moveit_setup_core_pluginsTargets HAS_LIBRARY_TARGET) pluginlib_export_plugin_description_file(moveit_setup_framework moveit_setup_framework_plugins.xml) ament_package() ``` -------------------------------- ### Basic CMakeLists.txt for MoveIt Planners Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/moveit_planners/CMakeLists.txt Sets the minimum CMake version, defines the project, and finds the ament_cmake package. This is a standard setup for ROS 2 packages. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_planners) find_package(ament_cmake REQUIRED) ament_package() ``` -------------------------------- ### Define Executable Targets Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_assistant/CMakeLists.txt Defines the main setup assistant and updater executables, including their source files, include directories, and linked libraries. ```cmake add_executable( moveit_setup_assistant src/main.cpp src/setup_assistant_widget.cpp src/navigation_widget.cpp ${HEADERS}) target_include_directories( moveit_setup_assistant PUBLIC $ $) target_link_libraries( moveit_setup_assistant ${Boost_LIBRARIES} ament_index_cpp::ament_index_cpp moveit_setup_framework::moveit_setup_framework moveit_setup_srdf_plugins::moveit_setup_srdf_plugins pluginlib::pluginlib Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets rclcpp::rclcpp) ``` ```cmake add_executable(moveit_setup_assistant_updater src/collisions_updater.cpp) target_include_directories( moveit_setup_assistant_updater PUBLIC $ $) target_link_libraries( moveit_setup_assistant_updater ${Boost_LIBRARIES} ament_index_cpp::ament_index_cpp moveit_setup_framework::moveit_setup_framework moveit_setup_srdf_plugins::moveit_setup_srdf_plugins pluginlib::pluginlib Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets rclcpp::rclcpp) ``` -------------------------------- ### Retrieve Specific SetupConfig Instance Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/README.md Get a shared pointer to a specific SetupConfig class instance using a template. This provides syntactic sugar for accessing specialized configurations. ```cpp config_data_->get("urdf") ``` -------------------------------- ### Package Initialization and Dependency Management Source: https://github.com/moveit/moveit2/blob/main/moveit_plugins/moveit_ros_control_interface/CMakeLists.txt Sets up the project, finds required dependencies, and includes common MoveIt configuration. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_ros_control_interface LANGUAGES CXX) find_package(ament_cmake REQUIRED) set(THIS_PACKAGE_INCLUDE_DEPENDS rclcpp_action controller_manager_msgs moveit_core moveit_simple_controller_manager pluginlib trajectory_msgs) foreach(dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) find_package(${dependency} REQUIRED) endforeach() # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() # Finds Boost Components include(ConfigExtras.cmake) ``` -------------------------------- ### Project Initialization and Dependencies Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/ompl/CMakeLists.txt Sets up the project requirements and finds necessary MoveIt and OMPL packages. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_planners_ompl LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() find_package(Boost REQUIRED filesystem date_time thread serialization) find_package(moveit_core REQUIRED) find_package(moveit_msgs REQUIRED) find_package(moveit_ros_planning REQUIRED) find_package(rclcpp REQUIRED) find_package(pluginlib REQUIRED) find_package(tf2_eigen REQUIRED) find_package(tf2_ros REQUIRED) find_package(ompl REQUIRED) ``` -------------------------------- ### Library Definition and Linking Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_framework/CMakeLists.txt Defines the moveit_setup_framework library, sets include directories, and links required dependencies. ```cmake set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) add_library( moveit_setup_framework src/helper_widgets.cpp src/double_list_widget.cpp src/urdf_config.cpp src/package_settings_config.cpp src/srdf_config.cpp src/rviz_panel.cpp src/data_warehouse.cpp src/templates.cpp src/utilities.cpp src/xml_syntax_highlighter.cpp include/moveit_setup_framework/qt/helper_widgets.hpp include/moveit_setup_framework/qt/setup_step_widget.hpp include/moveit_setup_framework/qt/rviz_panel.hpp include/moveit_setup_framework/qt/double_list_widget.hpp) target_include_directories( moveit_setup_framework PUBLIC $ $) target_link_libraries( moveit_setup_framework PUBLIC ament_index_cpp::ament_index_cpp fmt::fmt moveit_core::moveit_core moveit_ros_planning::moveit_ros_planning moveit_ros_visualization::moveit_ros_visualization pluginlib::pluginlib Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets rclcpp::rclcpp rviz_common::rviz_common rviz_rendering::rviz_rendering srdfdom::srdfdom urdf::urdf) ``` -------------------------------- ### Project Initialization and Dependencies Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/chomp/chomp_interface/CMakeLists.txt Sets up the project requirements and locates necessary MoveIt and ROS 2 dependencies. ```cmake cmake_minimum_required(VERSION 3.22) project(moveit_planners_chomp LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() # find dependencies find_package(ament_cmake REQUIRED) find_package(moveit_core REQUIRED) find_package(chomp_motion_planner REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(rsl REQUIRED) set(THIS_PACKAGE_INCLUDE_DEPENDS moveit_core chomp_motion_planner moveit_core pluginlib rclcpp rsl) include_directories(include) ``` -------------------------------- ### Define Library and Build Targets Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_simulation/CMakeLists.txt Sets up the library compilation, include directories, and links necessary dependencies. ```cmake find_package(moveit_setup_framework REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) add_definitions(-DQT_NO_KEYWORDS) add_library( moveit_setup_simulation src/simulation.cpp src/simulation_widget.cpp include/moveit_setup_simulation/simulation_widget.hpp) target_include_directories( moveit_setup_simulation PUBLIC $ $) target_link_libraries( moveit_setup_simulation ament_index_cpp::ament_index_cpp moveit_setup_framework::moveit_setup_framework pluginlib::pluginlib rclcpp::rclcpp) ``` -------------------------------- ### Define Build Targets and Dependencies Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/visualization/CMakeLists.txt Sets up the library lists and include directories for the visualization plugins. ```cmake set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) add_definitions(-DQT_NO_KEYWORDS) set(THIS_PACKAGE_LIBRARIES moveit_motion_planning_rviz_plugin moveit_motion_planning_rviz_plugin_core moveit_planning_scene_rviz_plugin moveit_planning_scene_rviz_plugin_core moveit_robot_state_rviz_plugin moveit_robot_state_rviz_plugin_core moveit_rviz_plugin_render_tools moveit_trajectory_rviz_plugin moveit_trajectory_rviz_plugin_core) set(THIS_PACKAGE_INCLUDE_DEPENDS class_loader geometric_shapes interactive_markers moveit_ros_planning moveit_ros_planning_interface moveit_msgs moveit_core moveit_ros_warehouse octomap_msgs moveit_ros_robot_interaction object_recognition_msgs pluginlib rclcpp rclcpp_action rclpy rviz2 tf2_eigen Eigen3 rviz_ogre_vendor rviz_common rviz_default_plugins) include_directories( rviz_plugin_render_tools/include robot_state_rviz_plugin/include planning_scene_rviz_plugin/include motion_planning_rviz_plugin/include trajectory_rviz_plugin/include) ``` -------------------------------- ### Launch MoveIt with Pilz Planner Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner/test/acceptance_tests/acceptance_test_lin.md Launches the MoveIt motion planning framework with the Pilz industrial motion planner enabled. This is a prerequisite for using the LIN motion planner. ```bash roslaunch moveit_resources_prbt_moveit_config demo.launch pipeline:=pilz_industrial_motion_planner ``` -------------------------------- ### Link Dependencies and Install Headers Source: https://github.com/moveit/moveit2/blob/main/moveit_ros/perception/lazy_free_space_updater/CMakeLists.txt Configures library linking for OpenMP and ROS 2 dependencies, and defines the installation path for header files. ```cmake if(APPLE) target_link_libraries(moveit_lazy_free_space_updater OpenMP::OpenMP_CXX) endif() target_link_libraries( moveit_lazy_free_space_updater rclcpp::rclcpp moveit_ros_occupancy_map_monitor::moveit_ros_occupancy_map_monitor ${sensor_msgs_TARGETS}) install(DIRECTORY include/ DESTINATION include/moveit_ros_perception) ``` -------------------------------- ### Fixing MoveIt Setup Assistant Templates Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_assistant/CHANGELOG.rst This commit addresses and fixes issues found within the MoveIt Setup Assistant (MSA) templates. These fixes ensure that the generated configuration files are correct and functional. ```xml Fix MSA templates (`#2769 `_) ``` -------------------------------- ### Fixing Setup Assistant Custom Planner Namespace Problem Source: https://github.com/moveit/moveit2/blob/main/moveit_setup_assistant/moveit_setup_assistant/CHANGELOG.rst This resolves a problem within the MoveIt Setup Assistant related to the namespace of custom planners. It ensures that custom planners are correctly configured and accessible within their designated namespaces. ```xml Fixes setup_assistant custom planner ns problem (`#2842 `_) ``` -------------------------------- ### Configure include directories Source: https://github.com/moveit/moveit2/blob/main/moveit_core/kinematics_metrics/CMakeLists.txt Sets public include directories for both build and install interfaces. ```cmake target_include_directories( moveit_kinematics_metrics PUBLIC $ $) ``` -------------------------------- ### Conditional Testing Block Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner/CMakeLists.txt Starts a conditional block for building tests when BUILD_TESTING is enabled. ```cmake if(BUILD_TESTING) ``` -------------------------------- ### Project Initialization and Dependencies Source: https://github.com/moveit/moveit2/blob/main/moveit_planners/pilz_industrial_motion_planner/CMakeLists.txt Sets the minimum CMake version, project name, and initializes MoveIt common package settings. ```cmake cmake_minimum_required(VERSION 3.22) project(pilz_industrial_motion_planner LANGUAGES CXX) # Common cmake code applied to all moveit packages find_package(moveit_common REQUIRED) moveit_package() ```