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

How do I convert costmap information to odom or pose information?

asked 2022-02-07 14:19:14 -0600

distro gravatar image

updated 2022-02-07 14:20:50 -0600

I can convert pose or odom data to costmap(Occupancy Gird Map) index, with this i = (width * y) + x. I learned how to do so from here. Is there a way to get x and y from i? I know its two unknowns thats why Im trying to figure out if there is some way.

edit retag flag offensive close merge delete

Comments

It’s possible to solve but you need to discard for complex solutions in your case.

Take a look at this: https://math.stackexchange.com/questi...

osilva gravatar image osilva  ( 2022-02-07 16:05:35 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2022-03-16 11:57:08 -0600

David Lu gravatar image
edit flag offensive delete link more
0

answered 2022-02-08 07:02:26 -0600

harderthan gravatar image

updated 2022-02-08 07:03:35 -0600

There are two unknowns, but you know width of costmap already.

x = i % width
y = (i - x) / width

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-02-07 14:19:14 -0600

Seen: 124 times

Last updated: Mar 16 '22