7namespace RoboidControl {
26 void Update(
float currentTimeMs)
override;
36 bool Drive(
float distance);
A motor with speed control It uses a feedback loop from an encoder to regulate the speed The speed is...
Definition ControlledMotor.h:12
float lastError
Definition ControlledMotor.h:43
Motor * motor
Definition ControlledMotor.h:38
float velocity
Definition ControlledMotor.h:20
Encoder * encoder
Definition ControlledMotor.h:39
float targetDistance
Definition ControlledMotor.h:54
float pidI
Definition ControlledMotor.h:24
bool Drive(float distance)
Definition ControlledMotor.cpp:54
bool driving
Definition ControlledMotor.h:53
float startDistance
Definition ControlledMotor.h:47
static bool CheckType(Thing *thing)
Definition ControlledMotor.h:17
float actualSpeed
Definition ControlledMotor.h:45
ControlledMotor()
Definition ControlledMotor.cpp:3
void Update(float currentTimeMs) override
Definition ControlledMotor.cpp:22
virtual float GetActualSpeed() override
Get the actual speed from the encoder.
Definition ControlledMotor.cpp:52
float pidD
Definition ControlledMotor.h:23
float lastUpdateTime
Definition ControlledMotor.h:42
float pidP
Definition ControlledMotor.h:22
virtual void SetTargetSpeed(float speed) override
Set the target speed for the motor controller.
Definition ControlledMotor.cpp:14
float netDistance
Definition ControlledMotor.h:46
float lastEncoderPosition
Definition ControlledMotor.h:55
An Encoder measures the rotations of an axle using a rotary sensor Some encoders are able to detect d...
Definition IncrementalEncoder.h:8
A Motor is a Thing which can move parts of the Roboid.
Definition Motor.h:12
A thing is a functional component on a robot.
Definition Thing.h:9
unsigned int type
The type of Thing.
Definition Thing.h:15
Definition Accelerometer.h:7
Definition AbsoluteEncoder.h:5