Let's Make Robots!

Autonomous 4wd1 sabertooth with Arduino Leonardo

Hello !

I am currently working on a project that has an objective of building an autonomous rover with the use of a sabertooth 2x12 and arduino uno or leonardo.So I have the following :

-sabertooth 2x12

-arduino uno & leonardo

-4wd1 rover


The objective of the project was to make it autonomous and do a closed loop feedback using an IMU. So from the IMU data I was supposed to see that the rover moves 1m straight and come back to its orginal position. As of now I am done with how to control the sabertooth 2X12 to make it moves forward and backward. So I am having problems with my IMU data and the arduino board. Does anyone have a guideline on how I can make use of an IMU data for distance tracking? To get the IMU data I am using the work of Fabio Varesano. I have attached the file for reference.

I also experience problems in interfacing the arduino leonardo with the processing sketch i have attached. I really hope for the advices. I am really motivated to complete this project however, I think the improvement of knowledge on automation from this forum will help me to achieve my goal.
Cube2.pde6 KB
FreeIMU_quaternion.pde570 bytes

Comment viewing options

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

Okay I have visited the site you suggested, however  the site uses an encoder instead of an IMU. So do anyone know a way for me to find the distance using IMU data and how will I go about on doing it? 

That site is the probably the single best reference on the web about navigating with an IMU.  There are quite a few others, but none with the depth of knowledge there.  You can search on IMU navigation or similar terms.  The reason he uses encoders, and the reason you won't find a lot of positive info about using IMU alone, is because of two reasons:  1)  IMU's drift a lot.  In other words, just sitting still they will indicate they are moving slowly.  So after a while of sitting still, the robot will think it has moved.  Without some external reference there is no way to know what has happened.  2)  Integration.  (brush up on your calculus here)  An IMU measures accelerations.  Position is the second integral of acceleration ( INT(acceleration) = velocity, INT(velocity) = position).  Any integral in the real world is going to be full of error.  All the "small" errors get added together to make a big one.  Double integrals multiply those errors together.

In short, all the evidence I have been able to find indicates that navigating by IMU alone is going to be extremely inaccurate.  But I encourage you to do a web search and experiment.  Math and physics are your friends.

I think you have missed out on putting the link.

Have a look at this web site.  This guy has done a LOT with IMU navigation, among other things.

IMU is an Inertia Measurement Unit that includes a 3-axis accelerometer and 3-axis gyroscope, I believed its mainly used on planes to actually monitor the stabilisation. 


There's no way, at least that I'm aware of, to track the distance with an IMU (inertial measurement unit) if the IMU doesn't have 12 DOF (gyroscopee + accelerometer + magnemometer + barometer + GPS).

What is an IMU and where is the datasheet for your particular unit?