aligning map to map_frame origin
Hi
I am using two ekf_localization_nodes
and one navsat_transform_node
from robot_localization
package. One ekf_localization_node
is used to fuse wheel encoder and imu data, the other one is used to fuse wheel encoder, imu and GPS data (output from the navsat_transform_node
). So far this setup has been working more or less fine.
My question is this:
When the robot initialises, it takes the first GPS data received and set that as the origin of the map_frame
in rviz. Because previously I have just been looking at the trajectories of the GPS data and the odometry/filtered_map
, there wasn't a need to use a map. However, currently I would like to map this trajectory onto a map to see if the trajectory is correct. Assuming that I already have a .pgm map of the location, how can I map the starting position of the robot (aka the first GPS data) onto this map? I can't fix a starting point on the map itself as well because everytime the first GPS data will be different. Is there a way to automatically map the first GPS data to the correct position on the .pgm map?
Thanks in advance.