rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

Issuse when I build rtabmap_slam

Open thanhhust26 opened this issue 6 months ago • 1 comments

Hello, I keep seeing this when I try to build rtabmap_slam. I am using jazzy-devel

/home/thang/robot_ws/src/rtabmap_ros/rtabmap_slam/src/CoreWrapper.cpp: In member function ‘void rtabmap_slam::CoreWrapper::process(const rclcpp::Time&, rtabmap::SensorData&, const rtabmap::Transform&, const std::vector&, const std::string&, const cv::Mat&, const rtabmap::OdometryInfo&, double)’: /home/thang/robot_ws/src/rtabmap_ros/rtabmap_slam/src/CoreWrapper.cpp:2090:66: error: ‘getClosestIterator’ is not a member of ‘rtabmap_conversions’ 2090 | auto iter = rtabmap_conversions::getClosestIterator<double, geometry_msgs::msg::PoseWithCovarianceStamped>(globalPoses_, data.stamp()); | ^~~~~~~~~~~~~~~~~~

/home/thang/robot_ws/src/rtabmap_ros/rtabmap_slam/src/CoreWrapper.cpp:2090:85: error: expected primary-expression before ‘double’ 2090 | auto iter = rtabmap_conversions::getClosestIterator<double, geometry_msgs::msg::PoseWithCovarianceStamped>(globalPoses_, data.stamp()); | ^~~~~~

/home/thang/robot_ws/src/rtabmap_ros/rtabmap_slam/src/CoreWrapper.cpp:2147:108: error: ‘getClosestIterator’ is not a member of ‘rtabmap_conversions’ 2147 | , rtabmap::GPS>::const_iterator iter = rtabmap_conversions::getClosestIterator<double, rtabmap::GPS>(gps_, data.stamp()); | ^~~~~~~~~~~~~~~~~~

/home/thang/robot_ws/src/rtabmap_ros/rtabmap_slam/src/CoreWrapper.cpp:2147:127: error: expected primary-expression before ‘double’ 2147 | nst_iterator iter = rtabmap_conversions::getClosestIterator<double, rtabmap::GPS>(gps_, data.stamp()); | ^~~~~~

gmake[2]: *** [CMakeFiles/rtabmap_slam_plugins.dir/build.make:76: CMakeFiles/rtabmap_slam_plugins.dir/src/CoreWrapper.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/rtabmap_slam_plugins.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2

thanhhust26 avatar Jun 22 '25 16:06 thanhhust26

It sounds like you have a different version of rtabmap_conversions package on your computer. Make sure you uninstalled the binaries to avoid this issue:

sudo apt remove ros-$ROS_DISTRO-rtabmap*

matlabbe avatar Jun 23 '25 22:06 matlabbe