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

chore(booars_costmap_generator): fix var scope in costmap_generator #37

Merged
merged 1 commit into from
Sep 9, 2024
Merged
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
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