Ndt_mapping created pcd in wrong position
Dear,
First of all, I'm using Autoware 1.12 and Ubuntu 16.
I created a point cloud map using the ndt_mapping while reproducing a bag file from the autoware data website. However, when reproducing the bag simulation with the pcd map loaded, the zero (origin) of the /map is too far away from the /base_link, such that the car and its lidar point cloud never overlap the cloud map.
The procedure was the following:
1) Simulation tab -> Play and pause the bag file.
2) Setup tab -> Start TF (Baselink to localizer) using the transform contained in the bag file (x=1.2 y=0 z=2.35).
3) Setup tab -> Start the vehicle model (left blank, using the default model I guess).
4) Quick Start tab -> Run my_sensing.launch (the same from the autoware sample), because otherwise the ndt_mapping does not even compute anything.
5) Computing tab -> start the ndt_mapping.
6) Simulation tab -> play the bag file for a while.
7) Simulation tab -> stop the simulation.
8) Computing tab -> ndt_mapping -> app -> export the pcd file.
9) Restart autoware from scratch
10) Simulation tab -> start the simulation and pause
11) Quick start -> run my_map, to load the map, and my_sensing to make lidar work.
12) Simulation tab -> play the simulation and watch it on rviz
Any ideas on what the problem could be?
I thank you in advance for any suggestions.
Update: Did the same with a bag created with the kitti dataset, using the kitti2bag tool.
The map is near the car in this case (probably because there is no gps data in the rosbag file, and both are placed in x=0, y=0, z=0), but when reproducing, the car is not aligned with the map (figure attached). The car indeed goes to the left (of the figure), while it should be going to the right (of the figure), where it went when the map was created.
Since I'm reproducing over the map generated with the same rosbag file, I don't understand why that happens. Do I have to manually rotate/replace the map everytime I generate it with ndt_mapping?
Again, thank you.