Practical Robotics in C++ by Lloyd Brombach

Practical Robotics in C++ by Lloyd Brombach

Author:Lloyd Brombach [Brombach, Lloyd]
Language: eng
Format: epub
ISBN: 9789389423464
Publisher: BPB Publications
Published: 2021-05-15T00:00:00+00:00


Figure 11.4: Measuring the ticks per meter and the wheel base - two constants we’ll use for odometry

From here, the math is straightforward with a little trigonometry. With each cycle, we’ll receive the updated counts from the left and right wheel encoders. Ten times per second is a minimum target for frequency, but that’ll be set in how fast the tick publisher publishes. With each cycle:

Calculate the distance traveled for each wheel

Calculate the total distance the robot has traveled

Calculate the change in heading angle theta

Add the change in heading to old heading theta

Calculate the distance moved in the x and y directions

Add the distances calculated to the previous pose estimate

Publish the new odometry pose message for other nodes

Save the new pose data to use in the next cycle



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.