Translation the shaft encoder data

Hi all,

Have a nice day ,

I am designing a robot in real world and i want to plot everything in X,Y (Cartesian) coordinates I just want to use the encoders of wheels to determine the current position of mobile robot and its orientation depending on a specific calculation formula (like this A Tutorial and Elementary Trajectory Model for The Differential Steering System ) even if that will lead to inaccurate calculations .

Actually , I found out this formula below to compute x, y coordinates from encoder data but I still confused in some sides of this formula


I had a Rover 5 chassis form Dagu with two normal DC motors and two encoders (incremental rotary encoder) per each wheel, how could I translate the pulses of encoders or how to work out the x.y position of the robot based on the shaft encoder data.

I deduced some of values from Rover 5 chassis :

cm = conversion factor that translates encoder pulses into linear wheel displacement Dn = nominal wheel diameter (in mm)

about 20 Cm

Ce = encoder resolution (in pulses per revolution)

Encoder resolution: 1000 state changes per 3 wheel rotations

n = gear ratio of the reduction gear between the motor (where the encoder is attached) and the drive wheel.

Gearbox ratio: 86.8:1

In Rover 5 chassis there are 4 small wires with female headers. RED is +5V for the encoder , BLACK is 0V (ground) , WHITE is signal A , YELLOW is signal B . The impotent wires in each encoder are signal A and signal B ,so

How to get values of NL , NR in the formula above from signal A & signal B ?

Is the value of NL is the direct value from wire signal A or signal B ? the same question for NR .

Thanks a lot

The encoder will enable you to determine how many times each wheel has turned. That's all.

If your wheeled robot is going in a straight line, and the wheels are not slipping on the floor, then each complete rotation of the wheel will become a movement across the floor, equal to the circumference of the wheel.

If the wheels are turning with different speeds, or even in opposite directions, then the robot will turn. And in addition to turning, the relationship between wheel turns and distance travelled will break down.

If you run the left wheels forward and the right wheels backwards, the robot will turn to the right. It might go forwards and turning right, like a car would, or it may turn "on the spot", like a tank or a shopping trolley can turn. Without very detailed analysis of the geometry of the vehicle and the friction characteristics of the tyres, it is almost impossible to model either in a general way or a specific scenario, without making a lot of heroically over-simplified assumptions.

I think that your objective is unrealistic.

There is no "formula" that will do what you seek.

I suggest that you build your robot, and then carry out a series of experiments where you measure the path response to various speed and steering inputs, and then you can develop some kind of empirical predictive model based on the results of those experiments and assuming that the robot's future behaviour won't change.

Where that guy is refering to the "wheelbase", his equations actually require the "track", that is, the width between the wheels. "Wheelbase" normally means the length of a vehicle between the front and back wheels, not the width.

michinyon:
The encoder will enable you to determine how many times each wheel has turned. That's all.

If your wheeled robot is going in a straight line, and the wheels are not slipping on the floor, then each complete rotation of the wheel will become a movement across the floor, equal to the circumference of the wheel.

If the wheels are turning with different speeds, or even in opposite directions, then the robot will turn. And in addition to turning, the relationship between wheel turns and distance travelled will break down.

If you run the left wheels forward and the right wheels backwards, the robot will turn to the right. It might go forwards and turning right, like a car would, or it may turn "on the spot", like a tank or a shopping trolley can turn. Without very detailed analysis of the geometry of the vehicle and the friction characteristics of the tyres, it is almost impossible to model either in a general way or a specific scenario, without making a lot of heroically over-simplified assumptions.

I think that your objective is unrealistic.

There is no "formula" that will do what you seek.

I suggest that you build your robot, and then carry out a series of experiments where you measure the path response to various speed and steering inputs, and then you can develop some kind of empirical predictive model based on the results of those experiments and assuming that the robot's future behaviour won't change.

And, unless the robot is a balancing one, there will have to be a third point of contact. The position of this third point of contact, with respect to the wheels, and its construction/friction, will have a great effect on how the robot moves when the wheels are turned.