ros-simulation/stage_ros

Is is expected for ground truth position and odometry to be VERY different?

Closed this issue · 1 comments

Hello

I have been using stageros to simulate a robot running navigation 2d application [https://github.com/skasperski/navigation_2d].
I am trying to compare the odometry and ground truth pose that is published by stage every time the WorldCallback function is called. I have observed that they can differ by a lot, the stats are as below :

odom_msg.pose.pose.position.x - gt.getOrigin().x() : [mean: 3.94237572, median: 4.14029, stdev: 5.71846084, max: 13.5125]
odom_msg.pose.pose.position.y - gt.getOrigin().y() : [mean: 2.2, median: 2.1, stdev: 3.2, max: 11.1]
Angle difference between orientations : 0.784 radians always.

I was wondering if this is expected, or if I am not comparing in the right frames? Though in the code, the header.frame_id is odom for both the odometry and ground truth messages.

I realized that I did not account for the robot's initial position, while comparing odometry with global ground truth pose.