Odometry ru: Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „= Abstract = <gallery> File: odometry.png File: ardumower_odometry_sensor.png File: ardumower_motor.jpg </gallery> Latest Ardumower code requires motor enco…“)
 
(Video)
Zeile 85: Zeile 85:
 
</gallery>
 
</gallery>
  
= Video =
+
= Видео =
No video yet (odometry is currently under development)
+
Еще нет видео (функционал в разработке)

Version vom 23. August 2015, 15:07 Uhr

Abstract

Latest Ardumower code requires motor encoders for odometry. Using odometry you can calculate the robot's speed and the short-term position of the robot. This works by counting the rotations of left and right wheel (motor encoders - required by latest Ardumower software).

Currently, odometry is used:

  • to ensure the robot left and right wheel are turning the same speed (in forward direction)

Encoder pinout (Ardumower motors)

The Ardumower has a 2-channel encoder with 5 pulses at one cycle of motor multiplied by gear ratio 1:212, resulting in 1060 encoder ticks per one full tire resolution.

Wiring/pinout of motor encoder connector:

green  ---- GND
brown  ---- VCC
blue   ---- odometry1
purple ---- odometry2


IMPORTANT: PCB v0.5/1.2 are missing pull-ups! You need to add them yourself:

odometry1 --- 4.7k --- 5v
odometry2 --- 4.7k --- 5v

Signal of odometry encoders

Forward: pin1 makes LOW->HIGH transition and pin2 = HIGH
Reverse: pin1 makes LOW->HIGH transition and pin2 = LOW

Do-It-Yourself encoders

Circuit

VCC           pinArduino
+--13 KOhm----+-------Collector  Emitter---GND
+--380 Ohm------------Anode      Kathode---GND

Differential drive

By adding (integrating) Odometry speed, we can calculate distance and heading.


Distance per wheel:

left_cm  = ticksLeft  / odometryTicksPerCm
right_cm = ticksRight / odometryTicksPerCm

Heading:

wheel_theta = (left_cm - right_cm) / odometryWheelBaseCm
odometryTheta += wheel_theta

Overall distance:

avg_cm  = (left_cm + right_cm) / 2.0
odometryX += avg_cm * sin(odometryTheta)
odometryY += avg_cm * cos(odometryTheta)

Ground measurement error

By adding (integrating) Odometry speed, we can calculate distance and heading. However, as we are adding a small error each time (due to not exact physical ground measurement), distance and angle errors are increasing. This can be solved by sensor fusion.

Motor controller (PID)

The speed of the motors is controlled by a software PID controller. You can monitor the quality of the motor speed control via pfodApp (Plot->Motor control):

Видео

Еще нет видео (функционал в разработке)