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

progressive costs in costmap2d

asked 2020-12-05 11:16:37 -0600

updated 2022-04-17 10:40:24 -0600

lucasw gravatar image

Hi,

i am trying to figure out a way to navigate on a road like environment. For this i would like to give both lanes different costs so the right lane has preference but when it is blocked left lane offers a feasible route. By the way I am using teb_local_planner along with base_global_planner right now.

Imo the best way to handle this would be to have some kind of progressive distribution from road lines to the middle of the right lane (by altering the hight and the progressiveness of the individual lines).

Is there an option to set individual inflation layers for different sensor data so i could configure a different radius for them?

I have seen that a social layer has been added to the wiki, which offers progressive costs i considered to convert my point cloud into people messages but i am not sure how the planner handles this.

I would highly appreciate any ideas Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-12-10 02:25:16 -0600

jorge gravatar image

I did something very similar to what you are trying. If you know the geometric shape of your road lanes (and specially easy if they are rectangles), you can create your own costmap layer plugin and "paint" the costs you want. The social_navigation_layers::PassingLayer is a very good starting point, as there it shows how to slightly increase to cost in one area. Instead of listening for persons, you use your information about the lanes and in which lane the robot is prefered to drive, and increase the costs on the other lanes. Hope this helps

edit flag offensive delete link more

Comments

Hi thanks for your Answer! First off all sorry that it took some time untill i was able to respond. This is what i imagined. To be honest i tried to create a custom layer based on the progressive social layer in the last few days, but wasn't really successful i got some cost in the layer but it almost seemed like i did something wrong since this was very demanding for my computer. Do you have any code of a costmap layer i could have a look at?

Tristan9497 gravatar image Tristan9497  ( 2020-12-11 11:41:11 -0600 )edit

Hey, in the mean time i figured out how to work with the custom layers you where right with looking at David Lu's code helped me a lot, since the tutorial is not very good in explaining everything. In the end i gotta say i am quiet happy with the result. Like this its possible to force the global path to go on the right lane and with via point weighting of points on the global path i can give teb_local_planner enough room to navigate around upcoming obstacles on the road. I have still some small things to fix but when i am finished with that i'll post a link to my github repo here so future readers have a starting point.

Tristan9497 gravatar image Tristan9497  ( 2020-12-18 11:14:57 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-12-05 11:16:37 -0600

Seen: 124 times

Last updated: Dec 10 '20