ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Are local copy of Costmaps used for recovery behaviours updated in real time?

asked 2020-02-05 08:53:23 -0500

Alrevan gravatar image

Hello,

My ros distribution is ros kinetic.

I am currently implementing a recovery behavior in a similar fashion of the rotate recovery of the nav core. During the init of the recovery i am doing a local copy of the costmap:

world_model_ = new base_local_planner::CostmapModel(*local_costmap_->getCostmap());

After that during the execution of the recovery I am doing several calls to footprintCost:

double footprint_cost = world_model_->footprintCost(x_cost, y_cost, theta, local_costmap_->getRobotFootprint(), 0.0, 0.0);

Is the cost-map interrogated by the footprintCost function updated in real time or is fixed at init time ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-05 15:19:59 -0500

updated 2020-02-06 02:16:31 -0500

gvdhoorn gravatar image

Short answer: yes.

Longer answer: https://github.com/ros-planning/navig...

You'll see that you're taking a reference to the costmap on initialization and then working with it. When you getCost(), you're getting the current cost of the costmap you referenced at initialization which is continuing to update in a background thread.

edit flag offensive delete link more

Comments

Would you not want to link to https://github.com/ros-planning/navig... instead?

gvdhoorn gravatar image gvdhoorn  ( 2020-02-05 15:22:10 -0500 )edit

Yes :-) sorry, that was a mixture of googling and not looking close enough

stevemacenski gravatar image stevemacenski  ( 2020-02-05 16:24:33 -0500 )edit

Updated the link.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-06 02:16:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-02-05 08:53:23 -0500

Seen: 93 times

Last updated: Feb 06 '20