Hacker News new | comments | ask | show | jobs | submit login
Show HN: Self-Driving Pi Car (github.com)
304 points by felsal 3 months ago | hide | past | web | favorite | 42 comments



Cool project! Last year I built self driving robot for my bachelor's thesis. Instead of building end-to-end deep learning pipeline I used two neural nets: one trained with genetic algorithm to drive a robot based on ultrasonic sensors, another for object recognition and detection. Based on detected items (like road signs) robot took different actions.

Video: https://www.youtube.com/watch?v=cUXh7iP3hoQ Code: https://github.com/kazepilot


Nice project and cool video! (our video is not so well produced :P). Our project was a summer project, we did it in this January. The evolution of the project will be something like yours, we didn't apply any object detection technique.


while 'pigs' != 'fly':

    ...
Made me chuckle!


Nice work. I worked on a similar project where I created an adaptive cruise control prototype. I used a camera and a CNN to determine the distance from the car ahead of my car. From there you can adjust your cruise control speed and hopefully maintain a set distance away.

https://www.youtube.com/watch?v=ECbU_EvyUqM

https://github.com/iinc/acc

There are clearly some ethical/safety issues with testing the entire thing at once while driving on the road. Some better applications would be an alert for following too close or drifting out of lane. Anyways, I find self driving cars exceptionally interesting and I liked reading your write up.


> Some better applications would be an alert for following too close or drifting out of lane.

One problem I have with 'adaptive cruise control' in car is that it has no situational awareness. It constantly speeds up and slows down in heavy traffic highway situations, its quite jarring. What i want instead is integration with traffic situation and adapt the speed to that automatically os it doesn't zoom upto 75 mph and come to a stop.


Great project! It's really interesting that you relied solely on a regular camera for depth perception. Way less expensive than working with RGBD images.


Awesome! have y'all seen donkeycar? http://www.donkeycar.com/ great for meetups/hackathons!


There's also https://diyrobocars.com/ and https://diyrobocars.com.au in Australia.


I didn't know about it, thanks!


I built something similar for my senior design project. We made a game of Pacman using two little rovers running FreeRTOS with RN-131C wifi modules on a PIC board and an overhead PixyCam connected to a raspberry pi. The rovers had a color sensor on the front and back that would allow it to track a black line on white paper. The overhead camera would feed pacman and ghost positions to the identical rovers. The rovers were commanded by just telling it what to do at the next intersection and what speed to move at. We did most of the heavy lifting on the raspberry pi simply because it's quicker to write A* in python than FreeRTOS C. Once pacman was seen driving over a colored dot on the map, the ghost would be commanded to run from pacman. If the camera saw the two rovers touch, the game was over.

Modularity was pretty key on reducing the work for that project. The rovers ran identical code and had no knowledge whether they were a ghost or pacman. The command router didn't care if the instructions it received came from a AI or a user GUI.

The platform was limited by what the professor provided us. We only bought color sensor arrays. Other teams went with simpler "games" but much more complex sensor processing on the rover. Those teams had much more trouble getting their designs to work, essentially needing two separate code bases.

Half of us were taking a class on AI and the other half were taking network application design so the idea for the game seemed like an easy way to just reuse code from those classes.


Great! Our project had the same idea of combining different skills: I was working with ML and my colleague was the TA from a robotics class.


Always nice to see Brazilians in tech, orgulho!


Valeu, é nois


FormulaPi is a robot car racing series along similar lines. Submit your own code and race against teams from around the world. I've participated in the last couple of seasons and it's been great fun.

https://www.formulapi.com


Does it "look" into a single frame or does it take previous steps into account as well?


Only a single frame


Cool experiment! Tiny nit, can you resize the image in the README so it isn't 12MB?


https://github.com/apps/imgbot can open image compression pull requests automatically in repositories


Done!


Very interesting project. It reminds me of a paper I read recently about a similar Pi car: https://www.sciencedirect.com/science/article/pii/S231472881...


I made a self driving car for a competition called the International Autonomous Robot Racing Challenge, held in Waterloo, Canada. I used my robot to beat Georgia Tech on my own.

Great to see so many others doing similar things.

I used a CNN/LSTM network and you can read more here: blog.suryad.com/iarrc2018


Awesome project, but why Python 2? :(

Pre-compiled Python wheels are available for Python 3 on Raspberry Pi at piwheels.org (default for pip in Raspbian)


Yep, we hate Python 2 too! But we develop the project in Python2 to use the library NXT-Python (the library responsible to control the Lego Mindstorms NXT). But, in our defense, w also have created a branch of the project using Python 3 :)


I'm tired of seeing this comment over and over on HN. Does everyone who writes a Python 2-based project on HN have to explain themselves and provide a valid excuse? Why can't people just be deciding they like Python 2 more than 3, or finding that it's more suitable for their project?


It doesn't seem unreasonable to me to ask why someone would use a version language that is going to be deprecated in just over a year, when newer versions are readily available.


Is it that hard to assume they either like it more or they couldn't use a later version because of a dependency? The only scenario this question would be useful in is if they had no idea the later version exists, which is a boat I have yet to see anyone fall into. Unless, I guess, it's one of those "questions" that isn't looking for an answer, but simply looking for an opportunity to chastise...


No, but the project will be dead in a year (or rather bitrot will set in), so if there are old dependencies then perhaps effort should be put into porting or working out the kinks in Python3 dependencies doing a similar thing. I understand for a hobby project that's a big ask but it's not unreasonable to question, I think

https://pythonclock.org/


I'm sorry it's getting tedious (and I agree, it is), but yes, at this point you do need a good reason for staying on Python 2, and in this case, learning about their good reason is actually helpful and insightful into their choices.

This wasn't contentious or combative (I didn't interpret it as such anyway), it's a good question for new projects.


I totally agree. There are so many embedded stuff running Python 2 out there that it will go nowhere. For me the countdown is a joke.


I find it quite telling you were downvoted. It makes it clear that people hate the idea that Python 2.7 may stay around so they keep trying to shut it down at every opportunity.


Looking at the video, the toy car is turning in-place when it gets to the boundary. There is no realistic turning radius proportional to its size.


The toy car used differential steering with 2-wheels and a castor wheel. One of our ideas of future work was to change the current steering method for an Ackerman model, giving our toy car a more realistic dynamic.


Any company doing this to solve the scooter littering issue? Like a Self Driving Scooter that drives itself back home?


Are there any guides on extracting the electronics, or batteries out for personal uses?


I hear there is a whole black market for electric scooter batteries.


Cool stuff! Do you have plans to expand this further? Would you accept pull requests? :)


I did this project together with my colleague Paula (pksm here, @pksmoraes on Twitter). I am doing research on NLP, this was just one summer project for me. She will work on that project further. So yes, it is not dead! Submit a pull request if you like :)


Yeah like he said I'll be working on employing transfer learning for self-driving cars. :)


So all of the training was done without a GPU?


Elaborating on my question.

In your read me it says - "In the computer that you will perform the training -- protip: don't train the model in the Raspberry Pi! -- install all the requirements by runnig:"

Could you give some specs on the computer? I currently don't own a GPU based PC so was wondering if I need to get one or use cloud based GPU instance.


No, you don't need a GPU at all. It helps, of course, but it not necessary. I don't remember the specs of the computer we used, but to give you an idea we give all the training data to undergrad students in the machine learning class (https://www.kaggle.com/c/mac0460-self-driving) they achieved good results with their personal laptop.


Thanks a lot :-)




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: