Personal Project: ROS2 Bot

I. Intro

Date: July 2024

ROS1 is done, and it’s time for ROS2. The hardware has no change, and it can be found here.

The code and my learning notes are on Github: https://github.com/DML-0205Michael/ROS2

II. Sub-System Tests

Figure 1: this LD19 LiDAR node is bad. Looks like the angle data is messed up.
Figure 2: so I changed another one, and this one works
Figure 3: testing communication from ROS2 to ESP32
Figure 4: testing communication from ESP32 to ROS2. However, the control loop is 133 ms!
Figure 5: change the parameters in MS_TO_NS from 100 to 0 can remove the 100ms delay. but it’s still 33 ms, not 20 ms
Figure 6: so I edit the library, and change the baud rate from 115200 to 460800. Now it’s 20 ms
Figure 7: everything else is fine, but no map received!
Figure 8: is there anything wrong with the node and the tf tree? No!
Figure 9: so I changed another executable file (changed from cpp to py), and it worked.

III. SLAM with slam-toolbox

Figure 10: SLAM with slam-toolbox. It’s very laaaaaaaaaaaaaaag, and it couldn’t process the rotation very well.
Figure 11: the time intervals that ROS2 is receiving data from ESP32 are not even and precise.
Figure 12: so I moved the odometry to ESP32, it has a much better timing and will publish the “more correct” odometry data to ROS2

IV. Navigation

ROS2 developers need to improve their code to make the navigation work properly in the real world, not only in simulation.

Leave a Reply

Your email address will not be published. Required fields are marked *