mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Fixed build with RTAB-Map 0.21.8 (and grid_map_core dep)
This commit is contained in:
@@ -1362,7 +1362,11 @@ void MapsManager::publishMaps(
|
||||
(elevationMapPub_->get_subscription_count() && !latched_.at(&elevationMapPub_)))
|
||||
{
|
||||
grid_map_msgs::msg::GridMap::UniquePtr msg;
|
||||
#if RTABMAP_VERSION_MAJOR>0 || (RTABMAP_VERSION_MAJOR==0 && RTABMAP_VERSION_MINOR>21) || (RTABMAP_VERSION_MAJOR==0 && RTABMAP_VERSION_MINOR==21 && RTABMAP_VERSION_MINOR>=8)
|
||||
msg = grid_map::GridMapRosConverter::toMessage(*elevationMap_->gridMap());
|
||||
#else
|
||||
msg = grid_map::GridMapRosConverter::toMessage(elevationMap_->gridMap());
|
||||
#endif
|
||||
msg->header.frame_id = mapFrameId;
|
||||
msg->header.stamp = stamp;
|
||||
elevationMapPub_->publish(std::move(msg));
|
||||
|
||||
Reference in New Issue
Block a user