iRobotEducation / create3_sim

ROS 2 Simulation for the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
106 stars 56 forks source link

Robot odometry large drift #142

Open alsora opened 2 years ago

alsora commented 2 years ago

Describe the bug Doing very simple and short maneuvers results in a huge drift in the dead reckoning pose wrt the ground truth one.

To Reproduce Run simulation and then command

ros2 action send_goal /undock irobot_create_msgs/action/Undock "{}"
ros2 topic pub -r 20 /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"
ros2 topic pub -r 20 /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.0}}"
ros2 topic pub -r 20 /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"
ros2 action send_goal /dock irobot_create_msgs/action/DockServo "{}"

Where the forward translation is ~ 1 meter, is enough to have the robot pose drift a lot. This can be easily observed thanks to another currently open bug, where Gazebo uses ground truth pose, but rviz does not https://github.com/iRobotEducation/create3_sim/issues/75

Screenshots At the end of the aforementioned maneuver, the robot appears docked in gazebo, but it is not in Rviz Screenshot from 2021-12-21 12-46-48

shuhaowu commented 2 years ago

This kind of make sense and is expected, no? For the Create 2 (that's all I have), if I performed this maneuver, I will definitely observe /odom drift like this. For carpet, it likely will drift even more.

For at least my current investigation, I want to add more noise to the /odom topic in simulation, so I can evaluate SLAM algorithms in the presence of "bad" odometry. Having perfect /odom in a simulation would defeat the purpose of most SLAM algorithms that requires an input odometry, right?