I want to use Ruckig with ROS2 Humble. But during running the colcon build command i am getting errors. Please help. Will be grateful. I followed the official documentation of Ruckig to install it and I was able to successfully install and sucessfully run the example codes. But I am not able to intergrate Ruckig with ROS2. So, please help me.
Failed <<< motion_planner [0.36s, exited with code 2]
So, can you please tell how can I integrate Ruckig with ROS2 humble? Is there any error in my CMakeLists.txt and Package.xml file that I have provided above.
I want to use Ruckig with ROS2 Humble. But during running the colcon build command i am getting errors. Please help. Will be grateful. I followed the official documentation of Ruckig to install it and I was able to successfully install and sucessfully run the example codes. But I am not able to intergrate Ruckig with ROS2. So, please help me.
THIS IS MY CMAKELISTS.TXT :
cmake_minimum_required(VERSION 3.8) project(motion_planner)
Default to C99
if(NOT CMAKE_C_STANDARD) set(CMAKE_C_STANDARD 99) endif()
Update to C++17 for Ruckig and modern C++ features
if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif()
find dependencies
find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(std_msgs REQUIRED) find_package(sensor_msgs REQUIRED) find_package(geometry_msgs REQUIRED) find_package(trajectory_msgs REQUIRED) find_package(visualization_msgs REQUIRED)
Ruckig dependency
find_package(ruckig REQUIRED)
Include directories
include_directories(include ${ruckig_INCLUDE_DIRS})
Declare a ROS2 executable
add_executable(motion_planner_node src/motion_planner_node.cpp) ament_target_dependencies(motion_planner_node rclcpp std_msgs sensor_msgs geometry_msgs trajectory_msgs visualization_msgs )
Link libraries, including Ruckig
target_link_libraries(motion_planner_node ruckig::ruckig )
Install the executable and configure the package
install(TARGETS motion_planner_node DESTINATION lib/${PROJECT_NAME} )
Linters for code quality
if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() endif()
Final package setup
ament_package()
THIS IS MY PACKAGE.XML :
<?xml version="1.0"?> <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
AND THIS IS THE ERROR THAT I AM GETTING WHILE RUNNING COLCON BUILD :
/usr/bin/ld: CMakeFiles/motion_planner_node.dir/src/motion_planner_node.cpp.o: in function, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator > > const&, bool)'
collect2: error: ld returned 1 exit status
gmake[2]: [CMakeFiles/motion_planner_node.dir/build.make:192: motion_planner_node] Error 1
gmake[1]: [CMakeFiles/Makefile2:137: CMakeFiles/motion_planner_node.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
ruckig::Result ruckig::WaypointsCalculator<3ul, ruckig::StandardVector>::calculate<false>(ruckig::InputParameter<3ul, ruckig::StandardVector> const&, ruckig::Trajectory<3ul, ruckig::StandardVector>&, double, bool&)': motion_planner_node.cpp:(.text._ZN6ruckig19WaypointsCalculatorILm3ENS_14StandardVectorEE9calculateILb0EEENS_6ResultERKNS_14InputParameterILm3ES1_EERNS_10TrajectoryILm3ES1_EEdRb[_ZN6ruckig19WaypointsCalculatorILm3ENS_14StandardVectorEE9calculateILb0EEENS_6ResultERKNS_14InputParameterILm3ES1_EERNS_10TrajectoryILm3ES1_EEdRb]+0x8b3): undefined reference to
ruckig::CloudClient::post(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traitsFailed <<< motion_planner [0.36s, exited with code 2]
So, can you please tell how can I integrate Ruckig with ROS2 humble? Is there any error in my CMakeLists.txt and Package.xml file that I have provided above.