ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

use trajectory to argument the costmap

asked 2022-09-22 21:09:56 -0500

Hi, I am using ROS2 in my navigation project and here I have an idea on the costmap.

Currently there only exists free, obstacle and unknown space in static_layer. My idea is to add a trajectory on it. The grids belonging to the trajectory are set least cost. The advantages are as follows:

1, With the given trajectory, it can realize tracked navigation under soft constraint; 2, If the trajectory is created during mapping, then the global plan would be friendly to localization.

I wonder whether this idea has already released by anyone. If necessary, I would be very happy to contribute this idea.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-09-24 10:13:04 -0500

Mike Scheutzow gravatar image

updated 2022-09-24 10:19:03 -0500

You are mistaken that a costmap2D only supports 3 values. (I'm going to describe ros1, someone please comment if any of this is different for ros2.)

Internally the costmap2D cell is an 8-bit value. Depending on which API you use to access the costmap, the range of values is either 0-255 or 0-100. Typically many cost values map to "free" (e.g. 0-252), so you can use this to influence the behavior of the global and local planners. With the proper configuration, these planners will create paths that prefer cells with lower value (cost values closer to 0.)

costmap2D already allows you to create "pathways" within a large area of free cells.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-09-22 21:09:56 -0500

Seen: 20 times

Last updated: Sep 24 '22