Daddy's Robot Car: DRC Mark 1

Well.... It may not be pretty... but it's fun to do...

Trying to use the Raspberry Pi and its camera to navigate the room full of toddlers toys...

The ultrasonic setup is not being used - navigation is solely down to the vision... A fairly simple algorithm - what's flooring? How far away is the nearest object? If it's too close then turn, else move forward a distance based on how near the objects are.

While all this is going on I'm also trying to map things, which makes things a bit slow...

Inspiration came from http://www.linuxuser.co.uk/news/build-a-raspberry-pi-robot-with-linux-user-issue-132

The motor control circuitry has been built on a Slice of Pi (https://www.modmypi.com/slice-of-pi-raspberry-pi-breakout-boad) that makes it a bit more compact...

Started with a Dagu Magician kit but found the motors were a bit weak, so upgraded to some 298:1 of these: http://shop.pimoroni.com/products/micro-metal-gearmotor-mp

Next up: hide and seek - show the robot an object that it can learn about, then hide it and let the robot search for it. How hard can that be? ;o)

So... here are some pics that illustrate things...

First up - Pi camera image, shrunk down to 160x120 to speed up the OpenCV processing on the Pi.

Rasp Pi camera image: 160 x 120

Then try to work out what's flooring:

Flooring estimation

Measure distance up, in pixels:

pixel distance to 'non floor'

A bit of calibration beforehand to relate pixels to distance, using some lego... and we are good to go...

While it's, er, speeding around it's trying to make a map. It's a bit crude at the moment but I hope to improve it substantially... green is floor, red is an object. Blue line shows its route...

Simple mapping attempt

Here's a close up of the Pi with its Slice of Pi motor board:

Close of pi with motor board

Would like to compress it down to a smaller setup, something like http://shop.pimoroni.com/products/zumo-chassis-kit-no-motors

Now to work on the object recognition rather than just avoidance...

Autonomous navigation using vision

  • Actuators / output devices: 1:298 Pololu micro metal gearmotors
  • CPU: Raspberry Pi
  • Operating system: Linux, Raspbian
  • Power source: 4 AA batteries, USB power pack for Pi
  • Programming language: Python w OpenCV
  • Sensors / input devices: Raspberry Pi camera
  • Target environment: indoors

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/daddys-robot-car-drc-mark-1

Very nice work

Thanks for sharing. I look forward to seeing the improvements you make.

**Welcome to LMR :slight_smile:

Welcome to LMR! Pretty

Welcome to LMR!  

Pretty cool what you have done so far with OpenCV.  Nice work.  I look forward to seeing what else you can teach your bot.

Regards,

Bill

 

 

 

Cute!

We built a similar project.  However, we installed an Android device onto a RC car and used an IOIO board instead to control it autonomously. Here is the preliminary result:

http://youtu.be/vkvkfcqEUkk

code

thanks for cool project. Will you share code this project ?