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

How to utilize Costmap in navigation process?

asked 2020-01-29 23:06:20 -0600

kane_choigo gravatar image

updated 2020-01-29 23:41:24 -0600

Hello, I'm using ROS kinetic on ubuntu 16.04.

I'd like to use cost map of navigation precess, whose type is nav_msgs/OccupancyGrid.

When I tried checking how it looks like with rostopic echo ~, it seems the main information of cost map corresponds to costmap.data of nav_msgs/Occupancy

But it has 100 X 100 lengths, so I wonder how can I access it.

What I want to do is simple:

I want to convert the elements of costmap.data into Catesian-coordinate.

Anyone who knows how to do it?

Thanks in advance :)

edit retag flag offensive close merge delete

Comments

See the info field. It contains the origin and the resolution.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-01-30 06:04:54 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-30 10:21:31 -0600

David Lu gravatar image

It is in row-major order, The index is equal to the column + row * width.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-01-29 23:06:20 -0600

Seen: 148 times

Last updated: Jan 30 '20