pal-robotics / play_motion2

A tool to play and handle pre-recorded motions in ROS2
Apache License 2.0
20 stars 5 forks source link

Add <functional> header inclusion in motion_loader and play_motion2 h… #4

Open GiorgioMedico opened 2 weeks ago

GiorgioMedico commented 2 weeks ago

This pull request includes updates to the play_motion2 package to enhance its functionality by adding the <functional> header to two files.

Header inclusion updates:

Now compile with ros2 humble

saikishor commented 2 weeks ago

Hello @GiorgioMedico,

Isn't the package building on Humble without this fix?. Can you post exactly your compilation warning or error?. I'm asking because this package compiles and is also released on Humble.

Thank you,

Best regards, PAL Robotics Team

GiorgioMedico commented 2 weeks ago

Starting >>> play_motion2 --- stderr: play_motion2
In file included from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/include/play_motion2/motion_loader.hpp:24, from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/src/play_motion2/motion_loader.cpp:18: /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:41:10: error: ‘function’ in namespace ‘std’ does not name a template type 41 | std::function< | ^~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:29:1: note: ‘std::function’ is defined in header ‘’; did you forget to ‘#include ’? 28 | #include "rclcpp/parameter.hpp" +++ |+#include 29 | #include "rclcpp/visibility_control.hpp" /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:45:3: error: ‘OnParametersSetCallbackType’ does not name a type 45 | OnParametersSetCallbackType callback; | ^~~~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:188:70: error: ‘OnParametersSetCallbackType’ in ‘struct rclcpp::node_interfaces::OnSetParametersCallbackHandle’ does not name a type 188 | using OnParametersSetCallbackType = OnSetParametersCallbackHandle::OnParametersSetCallbackType; | ^~~~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:197:34: error: ‘OnParametersSetCallbackType’ has not been declared 197 | add_on_set_parameters_callback(OnParametersSetCallbackType callback) = 0; | ^~~~~~~ gmake[2]: [CMakeFiles/play_motion2.dir/build.make:76: CMakeFiles/play_motion2.dir/src/play_motion2/motion_loader.cpp.o] Error 1 gmake[2]: Waiting for unfinished jobs.... In file included from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/include/play_motion2/motion_loader.hpp:24, from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/src/play_motion2/play_motion2.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:41:10: error: ‘function’ in namespace ‘std’ does not name a template type 41 | std::function< | ^~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:29:1: note: ‘std::function’ is defined in header ‘’; did you forget to ‘#include ’? 28 | #include "rclcpp/parameter.hpp" +++ |+#include 29 | #include "rclcpp/visibility_control.hpp" /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:45:3: error: ‘OnParametersSetCallbackType’ does not name a type 45 | OnParametersSetCallbackType callback; | ^~~~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:188:70: error: ‘OnParametersSetCallbackType’ in ‘struct rclcpp::node_interfaces::OnSetParametersCallbackHandle’ does not name a type 188 | using OnParametersSetCallbackType = OnSetParametersCallbackHandle::OnParametersSetCallbackType; | ^~~~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:197:34: error: ‘OnParametersSetCallbackType’ has not been declared 197 | add_on_set_parameters_callback(OnParametersSetCallbackType callback) = 0; | ^~~~~~~ In file included from /opt/ros/humble/include/moveit/kinematics_base/kinematics_base.h:43, from /opt/ros/humble/include/moveit/robot_model/joint_model_group.h:42, from /opt/ros/humble/include/moveit/robot_model/robot_model.h:45, from /opt/ros/humble/include/moveit/robot_state/robot_state.h:40, from /opt/ros/humble/include/moveit/move_group_interface/move_group_interface.h:41, from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/include/play_motion2/motion_planner.hpp:25, from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/src/play_motion2/play_motion2.cpp:18: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:865:55: error: ‘OnParametersSetCallbackType’ in ‘class rclcpp::node_interfaces::NodeParametersInterface’ does not name a type 865 | rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType; | ^~~~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:934:34: error: ‘OnParametersSetCallbackType’ has not been declared 934 | add_on_set_parameters_callback(OnParametersSetCallbackType callback); | ^~~~~~~ In file included from /home/giorgio/ros2/tiago_ws/src/play_motion2/play_motion2/include/play_motion2/motion_planner.hpp:29: /opt/ros/humble/include/rclcpp_lifecycle/rclcpp_lifecycle/lifecycle_node.hpp:514:55: error: ‘OnParametersSetCallbackType’ in ‘class rclcpp::node_interfaces::NodeParametersInterface’ does not name a type 514 | rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType; | ^~~~~~~ /opt/ros/humble/include/rclcpp_lifecycle/rclcpp_lifecycle/lifecycle_node.hpp:524:5: error: ‘rclcpp_lifecycle::LifecycleNode::OnParametersSetCallbackType’ has not been declared 524 | rclcpp_lifecycle::LifecycleNode::OnParametersSetCallbackType callback); | ^~~~ gmake[2]: [CMakeFiles/play_motion2.dir/build.make:104: CMakeFiles/play_motion2.dir/src/play_motion2/play_motion2.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:169: CMakeFiles/play_motion2.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2

Failed <<< play_motion2 [24.2s, exited with code 2]