introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
1.01k stars 559 forks source link

Build Error: The plugin for class 'rtabmap_ros/MapCloud' failed to load. Error: According to the loaded plugin descriptions the class rtabmap_ros/MapCloud with base class type rviz::Display does not exist. #1113

Closed julianraheema closed 10 months ago

julianraheema commented 10 months ago

I used to have an old rtabmap_ros package, and it worked fine with ROS Noetic, ubuntu 20.04. I was doing SLAM, and I was getting 2D and 3D depth image maps just fine. Everything was working great. But I did apt update and upgrade, and the rtabmap stopped working :( . I thought it is time to update to the new rtabmap_ros since the old one is broken, so I followed the instructions at https://github.com/introlab/rtabmap_ros#build-from-source "build from source" to build inside my workspace, and switched to noetic-dev branch and succeeded build. Now when I launch the rtabmap, I get these errors, and I can't see the topics for MapGraph, MapCloud, and Info.

Please help!

SW OS:20.04 ROS: Noetic HW: Velodyne 16 puck RealSense 455

old rtabmap_ros package: Build: Fails Running: I don't know

image build error:

error: ‘class rtabmap::OccupancyGrid’ has no member named ‘addToCache’ 374 | occupancyGrid_->addToCache(iter->first, ground, obstacles, emptyCells); | ^~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:379:21: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘addToCache’ 379 | occupancyGrid->addToCache(iter->first, jter->second.first.first, jter->second.first.second, jter->second.second); | ^~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmap_ros/src/MapsManager.cpp: In member function ‘std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(const std::map<int, rtabmap::Transform>&, const rtabmap::Memory*, bool, bool, const std::map<int, rtabmap::Signature>&)’: /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:564:63: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 564 | data = memory->getNodeData(iter->first, occupancyGrid->isGridFromDepth() && !occupancySavedInDB, !occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, false, true); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:564:122: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 564 | data = memory->getNodeData(iter->first, occupancyGrid->isGridFromDepth() && !occupancySavedInDB, !occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, false, true); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:593:64: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 593 | data = memory->getNodeData(iter->first, occupancyGrid->isGridFromDepth(), !occupancyGrid_->isGridFromDepth(), false, false); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:593:100: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 593 | data = memory->getNodeData(iter->first, occupancyGrid->isGridFromDepth(), !occupancyGrid_->isGridFromDepth(), false, false); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:596:25: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 596 | occupancyGrid->isGridFromDepth() && generateGrid?&rgb:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:597:25: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 597 | occupancyGrid->isGridFromDepth() && generateGrid?&depth:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:598:26: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 598 | !occupancyGrid->isGridFromDepth() && generateGrid?&scan:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:608:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘createLocalMap’ 608 | occupancyGrid->createLocalMap(tmp, ground, obstacles, emptyCells, viewPoint); | ^~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:630:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘parseParameters’ 630 | occupancyGrid->parseParameters(parameters); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:637:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 637 | occupancyGrid->isGridFromDepth() && generateGrid?&rgb:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:638:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 638 | occupancyGrid->isGridFromDepth() && generateGrid?&depth:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:639:25: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’ 639 | !occupancyGrid->isGridFromDepth() && generateGrid?&scan:0, | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:649:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘createLocalMap’ 649 | occupancyGrid->createLocalMap(tmp, ground, obstacles, emptyCells, viewPoint); | ^~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:665:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘parseParameters’ 665 | occupancyGrid->parseParameters(parameters); | ^~~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:679:24: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘addToCache’ 679 | occupancyGrid->addToCache(iter->first, mter->second.first.first, mter->second.first.second, mter->second.second); | ^~~~~~ /home/spot/src/spot_autonomy_baseline/src/rtabmapros/src/MapsManager.cpp:698:18: error: ‘class rtabmap::OctoMap’ has no member named ‘addToCache’ 698 | octomap->addToCache(iter->first, mter->second.first.first, mter->second.first.second, mter->second.second, pter->second); | ^~~~~~

New rtabmap_ros image

Builds: OK Running: I have this error below

[ERROR] [1706580783.874992568]: PluginlibFactory: The plugin for class 'rtabmap_ros/MapCloud' failed to load. Error: According to the loaded plugin descriptions the class rtabmap_ros/MapCloud with base class type rviz::Display does not exist. Declared types are grid_map_rviz_plugin/GridMap octomap_rviz_plugin/ColorOccupancyGrid octomap_rviz_plugin/OccupancyGrid octomap_rviz_plugin/OccupancyGridStamped octomap_rviz_plugin/OccupancyMap octomap_rviz_plugin/OccupancyMapStamped rtabmap_rviz_plugins/Info rtabmap_rviz_plugins/MapCloud rtabmap_rviz_plugins/MapGraph rviz/AccelStamped rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/TwistStamped rviz/WrenchStamped rviz_imu_plugin/Imu rviz_map_plugin/ClusterLabel rviz_map_plugin/Map3D rviz_map_plugin/Mesh rviz_plugin_tutorials/Imu [ERROR] [1706580783.875324607]: PluginlibFactory: The plugin for class 'rtabmap_ros/MapGraph' failed to load. Error: According to the loaded plugin descriptions the class rtabmap_ros/MapGraph with base class type rviz::Display does not exist. Declared types are grid_map_rviz_plugin/GridMap octomap_rviz_plugin/ColorOccupancyGrid octomap_rviz_plugin/OccupancyGrid octomap_rviz_plugin/OccupancyGridStamped octomap_rviz_plugin/OccupancyMap octomap_rviz_plugin/OccupancyMapStamped rtabmap_rviz_plugins/Info rtabmap_rviz_plugins/MapCloud rtabmap_rviz_plugins/MapGraph rviz/AccelStamped rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/TwistStamped rviz/WrenchStamped rviz_imu_plugin/Imu rviz_map_plugin/ClusterLabel rviz_map_plugin/Map3D rviz_map_plugin/Mesh rviz_plugin_tutorials/Imu [ERROR] [1706580783.875424699]: PluginlibFactory: The plugin for class 'rtabmap_ros/Info' failed to load. Error: According to the loaded plugin descriptions the class rtabmap_ros/Info with base class type rviz::Display does not exist. Declared types are grid_map_rviz_plugin/GridMap octomap_rviz_plugin/ColorOccupancyGrid octomap_rviz_plugin/OccupancyGrid octomap_rviz_plugin/OccupancyGridStamped octomap_rviz_plugin/OccupancyMap octomap_rviz_plugin/OccupancyMapStamped rtabmap_rviz_plugins/Info rtabmap_rviz_plugins/MapCloud rtabmap_rviz_plugins/MapGraph rviz/AccelStamped rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/TwistStamped rviz/WrenchStamped rviz_imu_plugin/Imu rviz_map_plugin/ClusterLabel rviz_map_plugin/Map3D rviz_map_plugin/Mesh rviz_plugin_tutorials/Imu

matlabbe commented 10 months ago

You would have to update the rviz config by re-adding the rtabmap's related displays, or edit in text the rviz config and change all rtabmap_ros by rtabmap_rviz_plugins.

matlabbe commented 10 months ago

See also https://wiki.ros.org/rtabmap_ros#rtabmap_ros.2Fnoetic_and_newer.Migration_Guide_New_Interface_Noetic.2FROS2

The latest binaries and source code all use the new interface.

julianraheema commented 10 months ago

Thank you so much. It seems working now. I will test it some more and then close this ticket if everything looks fine. Much appreciated.

julianraheema commented 10 months ago

Tested and worked as expected. The proposed solved the problem. Thank you so much