Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

costmap_cspace: always store received overlay map #109

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion costmap_cspace/include/costmap_3d_layer/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,16 @@ class Costmap3dLayerBase

*map_overlay_ = *map_;
if (map_updated_.info.width > 0 && map_updated_.info.height > 0)
updateCSpace(map_updated_);
{
if (map_->header.frame_id == map_updated_.header.frame_id)
{
updateCSpace(map_updated_);
}
else
{
ROS_ERROR("map and map_overlay must have same frame_id. skipping");
}
}

if (updateChain())
return true;
Expand Down
5 changes: 0 additions & 5 deletions costmap_cspace/src/costmap_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ class Costmap3DOFNode
ROS_DEBUG("Overlay 2D costmap received");

auto map_msg = map->getMap();
if (map_msg->header.frame_id != msg->header.frame_id)
{
ROS_ERROR("map and map_overlay must have same frame_id");
return;
}
if (map_msg->info.width < 1 ||
map_msg->info.height < 1)
return;
Expand Down