Skip to content

Commit

Permalink
Update costmap_generator.cpp (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Autumn60 authored Sep 9, 2024
1 parent 2fba0e8 commit 0730ecd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ void CostmapGenerator::update()

// Fill the costmap data
{
PointStamped global_point;
global_point.header.frame_id = map_frame_;
global_point.header.stamp = costmap_time;
global_point.point.z = 0.0;
for (int i = 0; i < costmap_parameters_->grid_num(); i++) {
Point2d local_point = index_to_point_table_[i];
PointStamped global_point;
global_point.header.frame_id = map_frame_;
global_point.header.stamp = costmap_time;
global_point.point.x = local_point[0] + costmap_center_position.x;
global_point.point.y = local_point[1] + costmap_center_position.y;
global_point.point.z = 0.0;
costmap_->data[i] = multi_layered_costmap_->is_occupied(global_point) ? 100 : 0;
}
}
Expand Down

0 comments on commit 0730ecd

Please sign in to comment.