18 ms·
This is really inspiring. I played around with converting an RC car to self-driving with an arduino but it was very simplistic. It used an ultrasonic sensor (P
by drivers99 8y ago
This is really inspiring. I played around with converting an RC car to self-driving with an arduino but it was very simplistic. It used an ultrasonic sensor (Parallax "Ping)))" sensor) to try to keep a specific range of distance from a wall to its left. It wasn't aware of its angle so it had a positive feedback loop in its reactions which caused it to oscillate more and more out of control. Just knowing there are people are there playing around with this for fun makes me want to get back into it.
- a1k0n 8y agoI think just adding a simple low-pass filter on your distance measurements and tracking the derivative for PD control would cure that problem. Try it!
- sgillen 8y agoCan also put two distance sensors on and fet the angle using some trig. And when you’re ready to get a little more serious you can get an imu and gps. Maybe even get a more beefy computer and add a camera!
- drivers99 8y ago> Can also put two distance sensors on and fet the angle using some trig. That is exactly what I was planning to do next. I realized that when the angle was greater, it would see the distance to the wall as higher than it really is, because of trigonometry. And that is a positive feedback loop which makes it worse. (I just realized that is only true when it headed towards the wall at an angle, but is the opposite when heading away from the wall at an angle. It reacts later (steer right) when it's angle towards the wall, but it should react sooner (steer left) when it's angled away from the wall... hmm...) Getting the angle, I could set a target angle and distance together, and steer as needed.