# How do I determine the heading of a six wheeled robot?

I have a robot simulation that simulates Mars Exploration Rover with six steerable wheels.

In case of the following steering configuration

// --- //  front wheels
//     //  middle wheels
// --- //  rear wheels


I'd say the heading of the rover with respect of the rover's body is about 45 to the right. My question is what is the right approach of calculating heading with respect of the rover body?

Do I simply sum the steering angles of steering actuators and divide it by the total number of the steering actuators?

Additional Note: Assuming no slippage on a perfectly flat plane.

• By "heading" do you mean "desired steering angle"? A robot's heading has nothing to do with the direction the wheels are pointed in, just the direction that the body is pointed in.
– Ian
Dec 1, 2014 at 20:23
• I wanted to know if there is a way to get heading (body) of a rover based on wheels' steering angles.
– ikel
Dec 2, 2014 at 22:15
• I'm not sure the best way to answer this, but my guess is that you're trying to oversimplify "velocity" into a scalar value in the direction that the vehicle's wheels are pointing. If you consider both the X and Y components of body-relative motion, you won't have this problem.
– Ian
Dec 2, 2014 at 22:27

A vehicle like this that can move in any direction regardless of orientation is called "holonomic". This decoupling is a little counter-intuitive because we are used to cars, which always move in the direction they are pointing (kinda, see: ackerman steering). But aircraft and boats deal with this all the time. The terminology they use is: heading is the direction the craft's nose is pointing, and course is the direction of travel.

So in your example, I'd say the robot's heading is North (or 0 degrees), and it's course is 45 degrees to the right.

Of course this is assuming there is no wheel slippage. In which case i don't think there is a formal method because wheel slippage is something people try to avoid. And since wheel slippage is un-sensed, you need to determine your course with external sensors.

• Ben, could you give a link to that heading vs course terminology?
– ikel
Dec 3, 2014 at 23:47
• Wikipedia does a good job describing the terminology: en.wikipedia.org/wiki/Course_%28navigation%29
– Ben
Dec 4, 2014 at 1:45
• Ah, 4 hours late and I found that page too. Thanks. Right. I got the terminology confused between course and heading. I'll accept yor answer as being helpful. Given any steering angles for the wheels (uniformly), my heading is still the same. Holonomic.
– ikel
Dec 4, 2014 at 6:13

Where your robot will go will depend on where the axes of the wheels intersect.

• If all the axes are identical, it can turn around any point on the axes, or go straight, perpendicular to the axes.
• If all the axes intersect in one point, the robot will travel on a circle around that point.
• If the axes are parallel, it will go only straight, perpendicular to the axes.
• If the axes intersect in multiple points it can't go anywhere without sliping.
• I don't quite understand point 3, "If the axes are parallel, it will go only straight, perpendicular to the axes. "
– ikel
Nov 21, 2014 at 9:45
• This is the case on your picture. And perpendicular to the axes is the the direction where all the wheels are pointing.
– cube
Nov 21, 2014 at 11:12
• The first point tripped me up for a while. I didn't realize it was a precursor to the other points. Nov 28, 2014 at 6:06

What I see you have a reference problem ,

I suggest installing AHRS (Attitude Heading and Reference System) system over your Robot, this will indicate the direction of your robot heading and will sense the rotation of the body ,

for being simper you can use 1 Axis Magnetometer that will act as compass which will show only body heading ,

if you used 6 DOF (Degree of freedom) system it will show heading and body rotation ,

check this :- 6 DOF AHRS using MPU 6050 , A low cost