![ActivMedia Robotics MOBILEROBOTS Team AmigoBot-SH Operation Manual Download Page 35](http://html.mh-extra.com/html/activmedia-robotics/mobilerobots-team-amigobot-sh/mobilerobots-team-amigobot-sh_operation-manual_3047001035.webp)
M
OBILE
R
OBOTS
The orientation commands
HEAD
(#12),
DHEAD
(#13),
DCHEAD
(#22) turn the robot with
respect to its internal dead-reckoned angle to an absolute heading (0-359 degrees),
relative to its immediate heading, or relative to its current heading setpoint (achieved or
last commanded heading), respectively. In general, positive relative heading command
arguments turn the robot in a counterclockwise direction. However, the robot always
turns in the direction that will achieve its heading most efficiently. Accordingly, relative-
heading arguments greater than 179 degrees automatically get reduced to 179 or less
degrees with a concomitant change in direction of rotation.
The
E_STOP
command #55 overrides deceleration and abruptly stop your AmigoBot in
the shortest distance and time possible. Accordingly, the robot brakes to zero translation
and rotation velocities with very high deceleration and remains stopped until it receives
a subsequent translation or rotation velocity command from the client.
PID Controls
The AmigoSH drive servers use a common Proportional-Integral-Derivative (PID) control
system to adjust the PWM pulse width at the motor drivers to smooth the power to the
motors. The motor-duty cycle is 50 microseconds (20 KHz); pulse-width is proportional 0-
500 for 0-100% of the duty cycle.
The AmigoSH drive servers recalculate and adjust your robot’s trajectory and speed
every five milliseconds based on feedback from the wheel encoders.
The default PID values for translation and rotation and maximum PWM are stored as
FLASH parameters in your robot’s controller and may be changed. You also may
temporarily update the PID values with the AmigoSH client commands #84 through #87.
On-the-fly changes persist until the client disconnects. Translation PID values apply to
independent wheel-velocity mode.
The P-term value Kp increases the overall gain of the system by amplifying the position
error. Large gains will have a tendency to overshoot the velocity goal; small gains will
limit the overshoot but cause the system to become sluggish. We’ve found that a fully
loaded robot works best with a Kp setting of around 15 to 30, whereas a lightly loaded
robot may work best with Kp in the range of 5 to 15.
The D-term Kv provides a PID gain factor that is proportional to the output velocity. It has
the greatest effect on system damping and minimizing oscillations within the drive
system. The term usually is the first to be adjusted if you encounter unsatisfactory drive
response. Typically, we find Kv to work best in the range of 3 to 10 for lightly to heavily
loaded robots, respectively. If your robot starts to vibrate or shutter, reduce Kv.
The I-Term Ki moderates any steady state errors thereby limiting velocity fluctuations
during the course of a move. At rest, your robot will seek to “zero out” any command
position error. Too large of a Ki factor will cause an excessive windup of the motor when
the load changes, such as when climbing over a bump or accelerating to a new speed.
Consequently, we typically use a zero value for AmigoBot’s Ki, but consider a value from
1-5 for heavily loaded robots.
Position Integration
M
OBILE
R
OBOTS
platforms track their position and orientation based on dead-reckoning
from wheel motion derived from encoder readings. Your AmigoBot maintains its internal
coordinate position in platform-dependent units, but reports the values in platform-
independent millimeters and degrees in the standard SIP (Xpos, Ypos, and Thpos).
29