Odometry Glitches

From wikidb
Revision as of 10:12, 18 October 2017 by Edc (Talk | contribs)

Jump to: navigation, search

Background and Set Up

These odometry glitches were discovered during motor control PID tuning. See

Example Graph

These measurements are under load.

Observations

  • Notice the odometry glitches that report a 0 m/sec wheel speed. This issue appears to be an odometry node bug when the angular velocity stays at 0 rad/sec. See below.
  • Notice the wheel speed short term oscillation. This issues appears to be an encoder node issue bug because of a lack of time precision. See below.

Plot151520.png

Zero Wheel Speed Glitches

The motor Twist messages are generated with the following command which specifies a 0.2 m/sec linear x and 0.0 rad/sec angular z. As result, the robot cross the 0/360 degree boundary multiple times. Each time a bug result in reporting a 0 speed to odometry.

 python motors_go_full.py 0.2 0.0

A second Twist command adds confusion. The angular z component is now set to 0.4 rad/sec making the robot's angular position cross quadrant boundaries more often. There are not zero velocity glitches.

 python motors_go_full.py 0.2 0.4

Rotate odom glitch2.png

Short Term Oscillations

One candidate for the short term oscillations that ride on top of the wheel speed line is the lack of encoder time precision. This has not been verified. What follows are some data points.

Odometry Publication Rate

Odometry is published 22 times a second. See the frequency definition in line 407 of odometry.cpp.

Wheel Speed Publication

The motor controller publishes wheel speed and power values whenever it receives a odometry publication. The Example Graph above

  • Displays 22 points every second.
  • Displays 7 dips every second. (Roughly 1/3 have speed values significantly lower than average.

Encoder Publications

There are roughly 125 encoder messages published each second by each encoder like the two below. The rate of 125 corresponds to one roughly every 8 milliseconds. See the time field. Measurement show that

  • 102 or about 80% have a time value of 8 ms
  • 23 or about 20% have a time value of 7 ms
 ---
 header: 
   seq: 2171
   stamp: 
     secs: 0
     nsecs:         0
  frame_id: 
 index: 0
 count: -64455
 count_change: -33
 time: 7
 ---
 header: 
   seq: 2172
   stamp: 
     secs: 0
     nsecs:         0
   frame_id: 
 index: 0
 count: -64488
 count_change: -33
 time: 8
 ---