Odometer

The odometer is a sensor that measures the rotation of the wheels of the robot. From the number of rotation of each wheel it can calculate the distance the robot has driven, the direction it is facing, and even the location the robot has reached by doing this. Unfortunately like all sensors there is a bit of noise in the measurements. This noise originates from 3 main sources: Encoder errors from sensor resolution, error in the wheel radius, and a calculation error. The noise in the measurements is 0.005m, and does not sound like much, however, there is a catch. Because the position is calculated from consecutive measurements the noise becomes a cummelative error. This means that the more distance you drive, the bigger the error becomes, and the less certain you are that the position the odometer indicates is actually the position the robot is in.

Another problem of the odometer is that it is based solely on the rotation of the wheels, and as such, it can not cope with a situation where the robot is stuck but the wheels still turn. This results in the position being completely wrong.

However as long as you dont drive into anything the odometer is quite a reliable and reasonably accurate way to find our position. For example: after driving around the arena, the error had added up to about 0,5m.

Odometer Component

The odometer measures its position and rotation using the radius of the wheels and the number of rotations each wheel has made. This method is not very reliable in case the robot bumps into something and the wheels slip or the robot is rotated unexpectedly.

The measurements are also subject to a cumulative error from the noise from the encoder sensor it uses to determine the number of rotations of the wheels, and the limited resolution of the encoders and odometer. The resolution of the encoder is roughly one degree. The angle of the rotation of the wheels is subject to a noise level of ±0.005 radians per measurement.

The odometer component receives triples of (x, y, θ) and the time of the measurement from the network relay and relays this information to all connected (higher level) components.

The odometry sensor in USARSim does not have the timestamp enabled by default. To enable it bWithTimeStamp=True should be set in USARBot.ini.

Commands

The odometer accepts the following commands:
  • SENSORDATA: Sensor data received from the network relay component.
The odometer sends the following commands:
  • POS: A triple of (x, y, rotation) in absolute coordinates.
class odometry.Odometry

The Odometry class extends the sensor class.

command(client, cmd, params)
Calculates the difference between the previous and current position and heading and broadcasts this data
connect(client)
Make a connection to the other components.
parsePose(params)
Parses the odometry data and returns the timestamp and an array with x, y and angle

Table Of Contents

Previous topic

Sonar

Next topic

Wheels

This Page