Software Onboarding/Robot state estimation

From LairWiki
Jump to navigation Jump to search

State estimation is the process of estimating where a robot is in the world using a collection of sensors and mathematical models.

Odometry[edit]

Odometry uses relative position sensors to determine how a robot has moved through space. In the simplest case, odometry is accomplished using wheel mounted encoders to measure the velocity of each wheel at a regular time interval, and a simple mathematical model of the robot to calculate how the wheel velocities translate to the velocity of the base. The resulting velocity of the base can then be integrated over time to produce a position estimate of the robot.

Diff drive robot model[edit]

TODO: Make a page for diff drive robot and include the mathematical model section from that

We can model most simple robots as differential drive robots. A differential drive robot has two independently controlled wheels (with a known wheel diameter) seperated by a distance known as the wheelbase. Using these two measurements, and some simple trigonometry, the linear and angular velocity of the base can be calculated using only the angular velocity of each wheel.

TODO: This is kinda wordy, it can be done better

We can first find the linear velocity (the velocity of the point in contact with the ground) of each wheel using the circumference of a circle. If we know that a wheel has a circumference of C mm, and that it is turning 2 times per second, then the linear velocity of the wheel is 2*C mm/s. Multiplying the amount of ground covered by one rotation by the number of rotations tells us the total amount of ground covered. If we take \omega (the angular velocity of the wheel) to be in rad/s, then every revolution per second is 2*pi rad/s. At one rev/s we expect the linear velocity to be 2*pi*r mm/s, so we only need to multiply the angular velocity by the radius to find the linear velocity of a wheel.

v_l = \omega_l\left(\frac{d}{2}\right ) v_r = \omega_r\left(\frac{d}{2}\right )