Mapping and GPS Orientation Problems
Posted by
jitoobias on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Mapping-and-GPS-Orientation-Problems-tp8090.html
Hi,
I am using RTAB-map to create a 2D occupancy map from a 3D LiDAR point cloud (and potentially test the ZED2 camera in the future). I have been able to create a map and but my GPS does not match the orientation of the map. If I try to localize within the map I created my GPS orientation is still not inline.

Note:
Robot localization output is red arrows and GPS position is yellow dots. Blue and yellow lines are from RTAB-map /rtabmap/mapGraph.
- I use the Robot Localization package to fuse my sensor data and provide the map -> Odom and Odom -> base_link TFs.

If I use RTAB-map to provide the Map->Odom TF my robot will follow the map path but the GPS and Robot localization won't.
Note:
In my TF tree, it can be seen that I use a TF from datum -> Map. This was done to provide the vehicle an initial position and orientation within the map. Datum is a fixed GPS position of a landmark within the map to provide a global reference for both the vehicle and the map. (Side Note: I have run the mapping without this node applying the datum and the issue is still there.)If someone can tell me (or provide an example of) the correct way to map using RTAB-map, with a 3D LiDAR, GPS, robot localization, and have everything in the correct orientation that would be amazing, as I have been stuck going around in circles trying to figure this out for weeks.
If you need me to upload the launch files I use to set my RTAB-map parameters or anything else, let me know.
Any help is greatly appreciated.