5#include "TinyRobotics/communication/Message.h"
6#include "TinyRobotics/communication/MessageHandler.h"
7#include "TinyRobotics/communication/MessageSource.h"
8#include "TinyRobotics/motors/IMotor.h"
10namespace tinyrobotics {
13
14
15
16
17
18
19
20
21
22
23
24
25template <
typename MotorT =
float>
30
31
32
33
34
39 for (
auto* motor : getMotors()) {
40 if (motor) motor->begin();
46
47
48 virtual void end() = 0;
51
52
53
56 virtual std::vector<MessageContent> getControls()
const = 0;
59
60
64
65
68 virtual std::vector<IMotor<MotorT>*> getMotors() = 0;
71 float speedFactor_ = 1.0f;
Interface for handling messages in the TinyRobotics framework.
Definition: MessageHandler.h:18
Base class for message sources in the TinyRobotics communication framework.
Definition: MessageSource.h:35
Abstract base class for all vehicle types.
Definition: Vehicle.h:26
bool begin()
Initialize the vehicle.
Definition: Vehicle.h:36
float getSpeedFactor() const
Get the speed factor (scaling for speed commands).
Definition: Vehicle.h:61
void setSpeedFactor(float factor)
Set the speed factor (scaling for speed commands).
Definition: Vehicle.h:66
virtual void end()=0
Reset the vehicle to a safe or neutral state (pure virtual).
virtual bool isPinsSet() const =0
Check if the necessary pins for the vehicle's actuators have been set (pure virtual).