Daddy's Robot Car: DRC Mark 1

Posted on 22/02/2014 by gregus
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

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 ...


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
LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post