Skip to content

Commit

Permalink
Updated requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jatin Patil <[email protected]>
  • Loading branch information
JatinPatil2003 committed Jul 25, 2024
1 parent 601bbcf commit 5a85be0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nav2_costmap_2d/src/costmap_2d_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,13 +834,13 @@ void Costmap2DROS::getCostCallback(

if (request->use_footprint) {
Footprint footprint = layered_costmap_->getFootprint();
FootprintCollisionChecker<Costmap2D *> collision_checker_(costmap);
FootprintCollisionChecker<Costmap2D *> collision_checker(costmap);

RCLCPP_INFO(
get_logger(), "Received request to get cost at footprint (%.2f, %.2f, %.2f)",
get_logger(), "Received request to get cost at footprint pose (%.2f, %.2f, %.2f)",
request->x, request->y, request->theta);

response->cost = collision_checker_.footprintCostAtPose(
response->cost = collision_checker.footprintCostAtPose(
request->x, request->y, request->theta, footprint);
} else if (costmap->worldToMap(request->x, request->y, mx, my)) {
RCLCPP_INFO(
Expand Down

0 comments on commit 5a85be0

Please sign in to comment.