Ros2 in 5 Days Python Turtlebot3 and simulation difference

I finished my real robot project and wanted to test on turtlebot3 so i connected to the robot. The odom values i got from simulation and real robot is so different that i couldnt really test my code. I also couldnt find the difference between them to correct it since my time at the robot is finished while i was searching for the reason how should i approach this problem?

Firm up your testing plans and book another connection to the real robot.

  • Prepare the data of the simulation in advance.
  • When you connect to the real robot quickly gather all the data you need for comparison.
  • Do the comparison after the connection.
  • Make adjustments based on your comparison and test again until everything is perfect.

Thank you for the reply i think i should also try different method without relying on odom values. Writing this here just for the if other people also needs some ideas.

Hi @retarkek ,

Here are some tips from my experience. Even I was in the same situation like you when I connected to the real robot for the very first time.

  1. Create a python program to:
    a. subscribe to /odom and write the values to a file for 15-30 seconds
    b. subscribe to /scan and write the values to a file for 15-30 seconds
    c. subscribe to /imu and write the values to a file for 15-30 seconds
    d. You can do the same for /tf topic, but it is not necessary for ROS1/2 Basics course.
  2. Move the robot around with the on-screen joystick while doing any of the above three tasks.
  3. If possible, create a rosbag with all topics and move the robot around with the on-screen joystick. You can later use this rosbag to understand the dynamics of the robot. [I did this and it helped me a lot.]

Hope this helps!


I did not know about rosbag i was thinking to save them manually thank you for the insight.

Hi @retarkek ,

If you had completed ROS Basics course, you will definitely be introduced to rosbag.
But I think it comes in the last chapter, so in case you are half-way through the course, you would have not known it.