Odometry ru: Unterschied zwischen den Versionen
(→Video) |
(→Motor controller (PID)) |
||
Zeile 78: | Zeile 78: | ||
</gallery> | </gallery> | ||
− | = | + | = Регулятор скорости мотора (ПИД) = |
− | + | Скорость двигателей регулируется с помощью программного ПИД-регулятора. Вы можете следить за качеством управления скорости через pfodApp (Plot->Motor control): | |
<gallery> | <gallery> |
Version vom 23. August 2015, 15:08 Uhr
Inhaltsverzeichnis
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.
Регулятор скорости мотора (ПИД)
Скорость двигателей регулируется с помощью программного ПИД-регулятора. Вы можете следить за качеством управления скорости через pfodApp (Plot->Motor control):
Видео
Еще нет видео (функционал в разработке)