otaviogood / carputer

Toy car that drives itself using neural networks
201 stars 39 forks source link

How to make the car #3

Open ArtlyStyles opened 6 years ago

ArtlyStyles commented 6 years ago

I was at the meetup and your car is awesome.

Can you give me some advice how to build the control part of the car? I am an experienced Computer Vision and Deep Learning software engineer, already bought the TX2 and Zed and they worked perfectly for me. So the "car" itself is the only obstacle. I am trying to use TX2 to control a RC car I bought from Frys but have to admit that assembling the parts and building hardware boards are not my expertise.

otaviogood commented 6 years ago

I also suck at electronics, but maybe I can give you some starting points. If you haven't already looked at donkeycar.com, you should. It's a similar car but with much better instructions than Carputer. If you don't do that, then start with hooking up a servo motor to an Arduino. This is something you can Google for. Any good RC car will have a standard servo motor for steering and the throttle will use an "electronic speed controller" that is interfaced with in the same way as a servo. Once you get your Arduino talking to both servos, then you can talk to the Arduino with USB, which is what we do. If you want to be fancy, the TX2 might have direct I/O so you can cut out the Arduino middleman. So now you should be able to control the car from the TX2. That's all the output. Now you need input. For our car, we have an odometer input, a camera input, and radio input from the RC controller for training. Once again, for the radio, Google how to hook up an RC receiver to an Arduino. That's what I did. For camera, we have a USB hub and web cam that talks to the computer. The only part of all these electronics that I don't understand because I got my friends to do it is the odometer. Since I used a 2wd Traxxas Slash RC car (I recommend it), I got a magnet for the gear box that acts as a "hall effect sensor", whatever that means. The magnet is a standard Traxxas part, so no hacks required. Just Google for Traxxas odometer or something. To hook up the hall effect sensor, you could try Googling it, or just get your EE friends to help you out. That's what I did. Also, the odometer is the least important of all the sensors, so you can get started without it.

ArtlyStyles commented 6 years ago

Hi, thank you very much for your feedback. A lot of information and good suggestion here. I need time to dig into it...

marcoeg commented 6 years ago

@ArtlyStyles: we have started our model car electronics from Octavio's ideas and optimized it with only one Arduino board. We are not using the Donkey approach as we run the ML model on the Raspberry PI on board the car. The same way Octavio runs his model onto the MacBook. Check our repo https://github.com/cometa/Autonomia that includes the Arduino optimized code and the board schematics. Also, we have a couple of extra model cars already retrofitted. I would be happy to give one to you. At the moment I cannot keep working the long hours required for this project because I am an independent engineer and I have to do designs that bring revenues. Best.

ArtlyStyles commented 6 years ago

@marcoeg Thank you very much. It would great if you can give one to me.

marcoeg commented 6 years ago

@ArtlyStyles please contact me at marco@autonomia.io to arrange.