Help with an machine vision project!!!

General programming chat and advice for beginners

8 posts
by roosemberth » Thu Aug 09, 2012 3:57 am
Hi everybody, I want to make a wifi-controlled Helicopter, my idea is this:

RPi ----- router ----- cellphone/computer

controlled via a web server, but here I have some problems:

-How to make the RPi to boot and start the hole system without any human invervention
-How to apply machine vision like gandalf or open-cv
-How to disable video out (not nessesary, but I think it would help to increase battery duration)
-How to control it via a "web server" (actually a lan) from my cellphone/computer)

Please help me solving this problems, new Ideas welcome, my crazier ideas are a gsm/gprs/gps that I saw (sim908c) via the uart, but I'm still thinking about it

Best Regards!
Roosemberth Palacios
Posts: 5
Joined: Thu Aug 09, 2012 3:29 am
by PaulBuxton » Thu Aug 09, 2012 11:34 am
I would suggest the first step is understanding what you are actually going to try and do. Do you want the Pi to fly the copter for you using the camera, or are you going to fly the copter and have the Pi track interesting things etc? Just getting the Pi to fly the copter will be a large chunk of work. I would recommend looking at the Arducopter project to get some ideas.

OpenCV is fairly easy to use, I would recommend running it locally with a webcam to get used to it. The book 'Learning OpenCV' has lots of examples that should get you going with OpenCV.

If you are wanting to control it via a web interface you will probably want to run a web-server with some form of backend processing to link into your control code.
I would suggest looking at the CherryPy module for python. Which will handle the web server side of things allowing you to add code to handle specific web requests.

My suggestion would be to identify self contained bits of work that you can do, and builds things up from there. So as en example get some LED's connected to your Pi and produce a an application that lets you turn them on and off via a web-page.

Paul
Posts: 57
Joined: Tue Jan 10, 2012 11:38 am
by roosemberth » Thu Aug 09, 2012 4:29 pm
I want the pi to control the helicopter via the camera, ex: if it's going forward and in it's way a ball crosses in front of it, I want it to avoid the colision; and I want to it to be able to obey commands sent from the web-ui, I want the pi to be mounted over the helicopter, but it to start without any human intervention, without having to enter user, password, etc...

By the way, I'm downloading the book, and reading something about cherrypy, thanks!

Best Regards!
Posts: 5
Joined: Thu Aug 09, 2012 3:29 am
by alexchamberlain » Thu Aug 09, 2012 4:57 pm
One camera isn't enough to compute distances and avoid obstacles.
Developer of piimg, a utility for working with RPi images.
Posts: 121
Joined: Thu Jun 14, 2012 11:20 am
Location: Leamington Spa, UK
by Vassius » Thu Aug 09, 2012 6:18 pm
Reaching for the stars, are we? ;)

Since you posted this in the beginners section, I will assume that you don't have much experience with programming. Please correct me if I'm wrong.

There's no shame in reaching for the stars or diving in the deep end of the pool etc, but to successfully do so with limited experience you need to realize how big the task is. The fact that your listed questions range from "a quick 2 minute fix" to "humongous task which requires years of experience" gives me the feeling that you don't quite realize the difficulty level of this project.

Building a basically autonomous helicopter is a daunting task unless you have a LOT of experience in electronics, programming and hardware interfacing. With the proper university education and a few years of work experience in the field, you might be able to successfully complete this project in a few months time if working full time. Without previous experience, we're talking years.

If you still want to take on this project, first you need to become a skilled programmer. This alone may take years, depending on available free time and your ability to learn and think like a programmer.

Once you're an able programmer, it will be easier to find solutions, make designs etc. If you're looking for a cookbook way of doing this, or think there's a simple "just-put-some-stuff-together-and-it-will-work" solution, I'm afraid that's the wrong angle to approach this project.
Posts: 25
Joined: Sun Jun 03, 2012 7:56 pm
by roosemberth » Thu Aug 09, 2012 9:40 pm
Reaching for the stars, are we? ;)

Since you posted this in the beginners section, I will assume that you don't have much experience with programming. Please correct me if I'm wrong.

There's no shame in reaching for the stars or diving in the deep end of the pool etc, but to successfully do so with limited experience you need to realize how big the task is. The fact that your listed questions range from "a quick 2 minute fix" to "humongous task which requires years of experience" gives me the feeling that you don't quite realize the difficulty level of this project.

Building a basically autonomous helicopter is a daunting task unless you have a LOT of experience in electronics, programming and hardware interfacing. With the proper university education and a few years of work experience in the field, you might be able to successfully complete this project in a few months time if working full time. Without previous experience, we're talking years.

If you still want to take on this project, first you need to become a skilled programmer. This alone may take years, depending on available free time and your ability to learn and think like a programmer.

Once you're an able programmer, it will be easier to find solutions, make designs etc. If you're looking for a cookbook way of doing this, or think there's a simple "just-put-some-stuff-together-and-it-will-work" solution, I'm afraid that's the wrong angle to approach this project.


Yes, I kwon that this is not gonna be so easy, But as I'm concious about it, I'll follow through, I've posted it on the Beginners Section, Because is my first time working with the pi, I've got some years working on computer software, and some time in embedded systems (from pic, to arm), even a little bit in linux (suse) now, I want to take it to a newer level, even though ot doesn't work in the first time, or doesn't exactly avoid it to crash, at less to be able to detect things and "track" them, would be a good start.

Thank you, for the help and support, and I'm already reading the book

And I need some Ideas to reduce weight and current consuming!!!

Best Regards
Last edited by roosemberth on Thu Aug 09, 2012 9:48 pm, edited 1 time in total.
Posts: 5
Joined: Thu Aug 09, 2012 3:29 am
by roosemberth » Thu Aug 09, 2012 9:44 pm
alexchamberlain wrote:One camera isn't enough to compute distances and avoid obstacles.


I know, but at less I need to detect and track defined objets, later we might think about avoiding colisions 8-)

Best Regards
Posts: 5
Joined: Thu Aug 09, 2012 3:29 am
by PaulBuxton » Fri Aug 10, 2012 8:18 am
So OpenCV can certainly help with object tracking, and it also has stuff to cope with stereo imaging for depth perception.
Something else you might want to look into is ROS http://www.ros.org/wiki/ I think I saw a comment on the forums here with some guys getting ROS up and running on the Pi.

Paul.
Posts: 57
Joined: Tue Jan 10, 2012 11:38 am