ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I also had this problem, but now I know how it works.
Odom and map frame are aligned real time by your localization node, which is the one who publishes map->odom tf. That is why odom and map are not aligned, check REP 105 of ros.
Odom->base_link tf is published by your odometry, in this case it is ekf_localization. So they are also not aligned as the robot moves wrt odom.
The map "cuts through" your robot your robot since at initialization, odom and base_link overlaps. Note that your base_link is not on the ground, it is at the base of your robot, which is above the point of contact of your wheels and the ground. So when visualized in rviz, the map will "cut through" the robot wheels.
The frame which should be on the ground is base_footprint.
That being said, you should initialize ekf_localization to have odom->base_link to be offset in z axis, but i dont know how to do this