Robotics StackExchange | Archived questions

getting coordinate in map

I am developing a qt qml application where i have put the map generated by the hector slam from ros. Here when i click on given map location i'm getting problems properly converting the pixel coordinates to real world coordinates. Here is the map yaml file:

image: ./map.pgm
resolution: 0.050000
origin: [-10.000000, -10.000000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

Here i'm used the formula:

y_real_pos = mapDragArea.mouseY*resolution-map_origin.y*resolution

Where mapDragAread.mouseY is the y coordinate in pixel units.

The map is the same map used by turtlebot3 package in default mode. image description

Asked by dinesh on 2021-07-24 00:19:25 UTC

Comments

Answers