Smartcar Shield
|
#include <AckermanControl.hpp>
Public Member Functions | |
AckermanControl (Motor &steering, Motor &throttling) | |
Constructs an Ackerman way of controlling the vehicle. More... | |
void | setAngle (int angle) override |
Sets the driving angle in degrees [-90, 90]. More... | |
void | setSpeed (int speed) override |
Sets the driving speed as percentage of the total motor speed where the sign represents the direction of movement [-100, 100]. More... | |
void | overrideMotorSpeed (int firstMotorSpeed, int secondMotorSpeed) override |
Set the motor speed individually as a percentage of the motors` total power. More... | |
Public Member Functions inherited from Control | |
virtual | ~Control ()=default |
Class to represent controling a vehicle by changing the angle of the front wheels, like a common car.
Definition at line 11 of file AckermanControl.hpp.
Constructs an Ackerman way of controlling the vehicle.
steering | The motor that controls the steering |
throttling | The motor that controls the throttling |
Example:
Definition at line 9 of file AckermanControl.cpp.
|
overridevirtual |
Set the motor speed individually as a percentage of the motors` total power.
Use this with caution.
firstMotorSpeed | The first motor speed [-100, 100] |
secondMotorSpeed | The second motor speed [-100, 100] |
Example:
Implements Control.
Definition at line 31 of file AckermanControl.cpp.
|
overridevirtual |
Sets the driving angle in degrees [-90, 90].
angle | The driving angle |
Example:
Implements Control.
Definition at line 15 of file AckermanControl.cpp.
|
overridevirtual |
Sets the driving speed as percentage of the total motor speed where the sign represents the direction of movement [-100, 100].
speed | The driving speed |
Example:
Implements Control.
Definition at line 25 of file AckermanControl.cpp.