Let's Make Robots!

MARS ROVER Autonomous Desert Roving Robot (Help Needed)

Autonomous Navigation Requirements

Guy's I'm completely new to this and just ordered my first prototype kit with the following components as a starting point.

1. Arduino UNO Rev3

2. Dagu Rover 5 4wd

3. Parallax PING

4. Motor shield kit

In sum, here are my project requirements.  I've been searching the web and LMR to find snippets of code that I might be able to use and am now reaching out to the forum to see if anyone has any interest in sharing some more specific code for my prototype.  My prototype is essentially to prove that I can wander a desert-type terrain (rocks, scrub brush, sand, inclines, declines, etc.), similar to the Mars Rover and cover the area like a lawnmower.  Obviously, the robot's ability to move through this terrain will be platform specific; however, for "proof of concept", I'm thinking to build this as if it's in my backyard and put some obstacles in the way.  I think these are some of the more specific basics that I haven't found yet. Can you point me I the direction for the additional components that would work well to accomplish the following tasks? Also, any snippets of code that would help would be tremendous!  

1. I need to be able to enter GPS coordinates and have the robot navigate to that point;

2. I need to be able to have the robot navigate around obstacles larger than say 6 inches, but over obstacles less than 6 inches. (obviously this is platform specific)  If the robot decides to go around the obstacle, it needs to stay within 12 inches of the obstacle as it completes a 360 degree turn around the obstacle. (Let me clarify, I'm only using 6 inches to illustrate a point.)

3. If the obstacle can not be navigated around, it needs to proceed as if it were a boundary (i.e. a big wall, like in a desert wash)

4. I need to be able to enter at least 3 or more GPS points and have the robot "fill in" the area like a lawnmower mowing the lawn.  So it'll need to know where it's been before so it doesn't necessarily cover the same path twice.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I am wondering if you have had any success with your project, and whether any of the ideas offered by the various posters were helpful in any way.

I think this shows why GPS isn't the most accurate solution for a small platform.

Woman wears GPS tracker/heart rate monitor during sex.

suggestion for you, may be useful, may be rubbish:

seeing as the general consesus is that you are a little bit ahead of yourself, considering what you a trying to do i would scale it down in complexity, and go for the following project:

Lay out a "test area" on the floor, a flat square.

position 4 identical (very similar) desk lamps at the corners of the square, and point them all into the middle.

using some photoresistors to detect light levels, how about you build a robot, whos objective is to find the centre of the square, based on the 4 light sources. as you get too close to one, the light wil be brighter on the PR, so you should be able to calculate (very roughly) which direction it is to the middle!

how you mount the PRs is a decision for you. You could have one on each corner? one on each face (front back left and right) a combination of both (8 PRs) or even do it how i did it in my last light follower, and have ONE (that was an interesting challenge for a noob like you or me)

Point is, GPS (as far as i understand it) works in a similar kind of way, so this would get you SOME way to the objective that you want, but with much less cursing.

(i may point out that i am pretty CERTAIN than GPS units on arduinos do NOT work in this way, the timing of the satalite signals is the GPS units job).

Do you have a job for your rover. If not, if it is just a toy, scale it back for sure.

what do the panel think to my idea? (i might give it a go myself :p)

I hesitate to mention this here, but think I have some code that may eventually help you.

I have two Rover 5 based robots. As part of my debugging process, I included a serial interface for the robot so I could set motor speeds from a PC terminal window. I later realized this serial interface also allows the control board (a Propeller QuickStart) to be used as a slave to another microcontrol. The master microcontroller could issue motor speed commands to the slave controller which would take care of monitoring the encoders and sending appropriate PWM to the motor control boards.

I've looked at as many Rover 5 projects as I could find and I haven't yet found any (other than mine) that use all four encoders as feedback for motor control. Four quadrature encoders appears to send too many interrupts for many microcontrollers.

Since I used a Propeller with eight cogs, I could devote an entire cog to just monitoring the encoders. Another cog provides PWM signals to the four H-bridge circuits. A cog monitors the wheel speeds and adjusts the PWM values in order to keep the wheels turning at their desired speeds.

By sending serial commands to the Propeller board, you could off load the above listed tasks from the main controller and use your main controller for sensor reading and decision making.

One reason for my hesitation in bringing up the possibility of using my code in a slave controller is all the things the slave will be doing are important aspects of robotics. It may be better to learn to control a motor or two yourself and then use my code in a slave controller in order to free up resources in the master controller.

As others have mentioned, there's a lot to this stuff and it's best to take it one step at a time.

You may want to take a look at my Rover 5 projects. I personally think it's fun to watch my tracked Rover 5 traveling through the snow.

Hey McGu, I just thought I would drop you a line and see if I could save you from yourself a bit here...

You are gettting very close to some dangerous territory, and I have seen it many many times before. Basically, the #1 worst sin you can make around here is to ask a question that one can easily find in the manual or via a google. The easier that info is to find, the more people will hate you for asking it. I am not joking. Your "4 smaller wires" question is kinda a perfect example of this.

We have also run in to sin #2 here as well. Asking about step 200 when you have not completed step 1,2 and 3. No one likes trying to explain complicated stuff to someone who skipped past all the fundamentals.

Really, dude. Like, really really, you need to forget about all your GPS stuff. You need to do fundamentals. Questions like, "are the 4 smaller wires for direction?" followed by, "how to I connect and code my GPS" is going to piss a lot of folks off, pretty quick.

Again, please understand I don't want to discourage --its just that I have seen this one, dozens of times.


The 4 small wires coming from the motor are for the encoders built in to the "legs" of the rover. I suggest you read the manual of the Rover 5 and the motor shield kit you have bought. Please take notice that the motors of the Rover 5 can draw +1A (I have seen almost 2A / motor when climbing a steep hill or when the rover is turning around it's axis). Are you sure that your motor shield can handle that?

Just saying - David P Anderson was likely doing most of this stuff with jBot and nearly 7 years ago. You should check David's bots out. Odometry mixed with GPS, compass, and some very smart programming. Worth a read for sure and definately not a beginer build :-) http://www.geology.smu.edu/~dpa-www/robo/jbot/ -Stephen

I've found exactly what I've been looking for and went and purchased it earlier this afternoon:


This thing essentially maps out waypoints using the software and will do EXACTLY what I was hoping to build. 



 Now I have a few basic build questions for everyone please...Basically, I want the APM 2.5 kit to control everything, but because I have this Dagu 5 4WD tracked chassis, I'm unsure what to use...

1.  Do I still use the Arduino Uno and motor shield kit and the APM 2.5 kit?  I'm pretty sure that I need the motor shield kit to run the 4 DC motors in the Dagu 5 4WD Chassis, but I'm not sure...

2.  The DC motors coming out of the chassis have 2 larger wires (Black and Red) and I'm pretty sure that those are for power that I will plug into the motor shield.  The DC motors also have 4 smaller wires (Red, Yellow, White, Black) that are bundeled together. I believe these just control the motor to turn it on and off forward and reverse, etc..right?  So where do these plug in?  On the motor shield? And more importantly, I only see 3 pins on the motor shield or the APM 2.5 kit and I have 4 wires coming off the DC motors...


As CtC stated, you probably aren't doing yourself any favors by making this your first project and will very likely get overwhelmed by it.

These two questions make it clear that you really need to take several steps back and learn about the basics and only then about the very expensive equipment you've now purchased before you're anywhere close to achieving what you've set out to do.

By way of analogy, what you've done here is proposed to build a Formula One race car and then asked if, once you hired the driver, whether you still needed the engine or transmission, and how does the gerbil cage (with live gerbils) hook up to the horse? That car will not be racing in any of the next 3 Grand Prix circuit years.

The unit you've linked to and purchased doesn't seem to do much of anything to alleviate the problem that GPS is only accurate to a little over 2m, and your platform is less than a tenth of the size of that area of error. All this kit adds to the general GPS package is a 915 MHz remote controller and a compass/accelerometer-which won't overcome the inaccuracy problems unless you plan to cheat and pilot the platform manually.

If you are to have any hope of success (and if that success needs to happen before the current school year ends, there is not much hope) you need to break this down in to bite sized pieces rather than hoping you can eat the whole pizza in one mouthful. Start, maybe, by building the most basic obstacle avoider with the parts you have, then program it. (There are hundreds of tutorials out there and if you don't find one using exactly your parts with a simple google search I'd be so surprised it would probably ease my constipation.) Don't worry about making something difficult to undo for the rest of the project. With what you have at hand, nothing will be permanent. Once you understand a little bit about how the electronics, the mechanics and the programming work together, you'll see why what you're proposing is such a challenge and you can begin the problem solving process that will get you closer to what you want.

What you absolutely do not want to do (unless you enjoy reading forum posts by seasoned, experienced, long-time LMR members where you are dressed down, demeaned and made to feel like a noob-and I'm sorry if I'm doing it here) is to come to the forum with a bag of parts, metaphorically empty them out on the table in front of us and say "How do I make this do something unreasonable? And can you do the programming for me?" That's not the way to go here...

Now, in response to the questions. 1-Yes, you will still need an Arduino or another microcontroller to act as the brains of the operation, and you will still need the motor controller kit between the microcontroller and motors for them to work. Whether or not an UNO will have appropriate I/O to use all the add-ons you've purchased is another matter. You may need to step up to a DUE or Mega.

2-I'm guessing (without knowing much about that platform) that the four wires bundled together coming out of the motor housing are the encoder wires which, should you decide to use them, will take power of their own (red and black) and generate a signal via the other two wires which your microcontroller can use to to determine how fast each motor is going. If you do use this method (it is advisable) then you probably want to learn about using and programming encoders between the obstacle avoidance stage and trying to implement your GPS.

Interesting!  Nice find, thanks.  Ill check it out.