Modify the 2D map

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Modify the 2D map

zimmon
After reconstructing the scene, we can get a 2D map. If I have a specific point in 3D space and I know its 3D coordinate, how can I compute its 2D coordinate in the 2D map? For example, I want to save the 2D coordinate of the specific point so that I can control the robot to move to the point later.
Reply | Threaded
Open this post in threaded view
|

Re: Modify the 2D map

matlabbe
Administrator
Hi,

It depends if the 3D coordinate is in the same coordinate frame (e.g., /map) than the 2D map. If so, you only need to keep (x, y, 0, 0, 0, yaw) and you have the 2d pose.

If you want to translate a cell to a 2D pose in /map frame, look at MapMetaData in the OccupancyGrid msg. You can get the resolution of the map and its orientation/offset with origin field.

cheers,
Mathieu