Skip to content

Commit

Permalink
fixed build with RTAB-Map 0.21.8
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Oct 9, 2024
1 parent e0542c7 commit c3f7cfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rtabmap_util/src/MapsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,11 @@ void MapsManager::publishMaps(
(elevationMapPub_.getNumSubscribers() && !latched_.at(&elevationMapPub_)))
{
grid_map_msgs::GridMap msg;
#if RTABMAP_VERSION_MAJOR>0 || (RTABMAP_VERSION_MAJOR==0 && RTABMAP_VERSION_MINOR>21) || (RTABMAP_VERSION_MAJOR==0 && RTABMAP_VERSION_MINOR==21 && RTABMAP_VERSION_PATCH>=8)
grid_map::GridMapRosConverter::toMessage(*elevationMap_->gridMap(), msg);
#else
grid_map::GridMapRosConverter::toMessage(elevationMap_->gridMap(), msg);
#endif
msg.info.header.frame_id = mapFrameId;
msg.info.header.stamp = stamp;
elevationMapPub_.publish(msg);
Expand Down

0 comments on commit c3f7cfe

Please sign in to comment.