![]() |
Smart Minotaur
|
The PID-Controller regulates the velocity of the robot. Mehr ...
#include <PIDController.hpp>
Öffentliche Methoden | |
| PIDController (nxt::Motor &p_leftMotor, nxt::Motor &p_rightMotor) | |
| void | setVelocity (const float p_linearVelocity, const float p_angularVelocity) |
| void | setWheelRadius (const float p_meter) |
| void | setWheelTrack (const float p_meter) |
| void | setPIDParameter (const minotaur_common::PIDParameter &p_param) |
| void | setMouseSensorSettings (const MouseSensorSettings &p_mouseSettings) |
| float | getLinearVelocity () const |
| float | getAngularVelocity () const |
| float | getWheelRadius () const |
| float | getWheelTrack () const |
|
const minotaur_common::PIDParameter & | getPIDParameter () const |
| void | step (const int p_samplingIntervalMSec) |
| Sets new motor-powers after calculate them. | |
The PID-Controller regulates the velocity of the robot.
The Controller gets measured values of the velocity, compares them with the desired values, and then calculates new velocities. The motor-publisher is used to set the "power" of the robot motors. The motor-client is used to read the current "tick count" of each motor. Publisher, Client and the wheel-circumference have to be set manually before using the "step()" method.
| void minotaur::PIDController::step | ( | const int | p_samplingIntervalMSec | ) |
Sets new motor-powers after calculate them.
| p_samplingIntervalMSec | duration of one samping-interval in Msec |