Closed XiongHenning closed 2 years ago
@XiongHenning there have been changes in upstream tf2_geometry_msgs
going from Foxy to Rolling.
Either switch to the foxy-devel
branch or build against Rolling.
thanks for your answer. yes, when icheckout to foxy-devel, then i can build it now
ubuntu:20.04 ros:foxy when i colcon bulild and report some error as follow: note:I had used the command with sudo apt-get install ros-foxy-tf2-geometry-msgs .
In file included from /mnt/hgfs/ShareUbuntu/AGV/ros2_prj/AGV_SIM_WS_test/src/slam_toolbox/src/loop_closure_assistant.cpp:22:
/mnt/hgfs/ShareUbuntu/AGV/ros2_prj/AGV_SIM_WS_test/src/slam_toolbox/include/slam_toolbox/loop_closure_assistant.hpp:29:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
29 | #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and:
In file included from /mnt/hgfs/ShareUbuntu/AGV/ros2_prj/AGV_SIM_WS_test/src/slam_toolbox/src/slam_toolbox_common.cpp:23:
/mnt/hgfs/ShareUbuntu/zxkj/AGV/ros2_prj/AGV_SIM_WS_test/src/slam_toolbox/include/slam_toolbox/slam_toolbox_common.hpp:40:10: fatal error: tf2_sensor_msgs/tf2_sensor_msgs.hpp: No such file or directory
40 | #include "tf2_sensor_msgs/tf2_sensor_msgs.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
when I change include "tf2_geometry_msgs/tf2_geometry_msgs.h and include "tf2_sensor_msgs/tf2_sensor_msgs.hpp and reprort error as as follows:
`
/opt/ros/foxy/include/rclcpp/node_impl.hpp:169:23: error: no matching function for call to ‘rclcpp::ParameterValue::get~~~~~
src/slam_toolbox_common.cpp:310:8: error: ‘void map_start_at_dock’ has incomplete type
310 | auto map_start_at_dock = this->declare_parameter("map_start_at_dock",rclcpp::ParameterType::PARAMETER_BOOL)
/src/slam_toolbox_common.cpp:315:56: error: expected primary-expression before ‘>’ token
315 | read_pose = map_start_pose.get<std::vector
`
Required Info:
When I run colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug then igot errors /home/code/ros2_ws/src/slam_toolbox/include/slam_toolbox/slam_mapper.hpp:25:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory 25 | #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
even after i run apt-get install ros-foxy-tf2-geometry-msgs