Smartcar Shield
Loading...
Searching...
No Matches
AckermanControl.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "../Control.hpp"
9#include "../../motor/Motor.hpp"
10
12{
13public:
26 AckermanControl(Motor& steering, Motor& throttling);
27
28 /* Check `Control` interface for documentation */
29 void setAngle(int angle) override;
30
31 /* Check `Control` interface for documentation */
32 void setSpeed(int speed) override;
33
34 /* Check `Control` interface for documentation */
35 void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed) override;
36
37private:
38 Motor& mSteering;
39 Motor& mThrottling;
40};
Class to represent controling a vehicle by changing the angle of the front wheels,...
void setAngle(int angle) override
Sets the driving angle in degrees [-90, 90].
void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed) override
Set the motor speed individually as a percentage of the motors` total power.
void setSpeed(int speed) override
Sets the driving speed as percentage of the total motor speed where the sign represents the direction...
Interface to generalize all classes that can provide a way to control a Car.
Definition Control.hpp:24
Interface programmatically representing any kind of motor.
Definition Motor.hpp:23