[Steven Gong] is attending the University of Waterloo and found himself with a 1/10th scale F1TENTH autonomous RC car. What better use of a fast RC car with some smarts than to race itself around your computer science building?
Onboard is an Nvidia Jetson NX (not the new Nvidia Jetson Orin), a lidar module, and a depth camera. The code runs on top of ROS2, and the results were impressive. [Steven] mapped out the fifth floor of his building at 6 am using SLAM and the onboard sensors. With a map, he created a rough track for his car to follow. First, the car needs to know when to brake and when to hit the gas. With the basics out of the way, [Steven] moved on to the fun part. He wrote code to generate a faster racing line. Every turn has an optimal speed and approach, but each turn affects the next turn, which turns it into a rather exciting optimization problem.
Along the way, [Steven] fixed the gearbox, tuned the PID steering loop, and removed the software speed limits. It’s impressive engineering, and we love seeing the car zoom around faster and faster. The car eventually hit 25km/h, which seems pretty fast for indoors. The code and more details are up on GitHub.
However, if you’re curious about playing around with self-driving, perhaps a much smaller scale Pi Zero-based racer might be more your speed. Video after the break.
4 thoughts on “Robot Races A Little Smarter To Go Faster”
It would be interesting to add collision sensors and let it run a genetic algorithm. I’d love to see this applied to a full sized go-cart, so you could physically race against the computer.
Why would it need collision sensors when it already knows how close the walls are?
The lidar should be all it needs, you could just write some code to act like it has collision sensors if you wanted.
Was thinking the same thing. Not sure GA or some other optimizer, but yeah.
There must be variables that he used in his constrained optimization, like tire grip and acceleration and braking, that could be tweaked to the car’s advantage. Might be really fun to try to play with those values on the fly too.
The more I think about it, the more this is just the awesomest project in terms of all the things you can learn from it. From the obvious ROS/robot stuff to path planning, control theory, optimization…
Please be kind and respectful to help make the comments section excellent. (Comment Policy)