|
TinyRobotics
|
Abstract base class for all vehicle types. More...
#include <Vehicle.h>


Public Member Functions | |
| bool | begin () |
| Initialize the vehicle. | |
| 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). | |
| virtual std::vector< MessageContent > | getControls () const =0 |
| float | getSpeedFactor () const |
| Get the speed factor (scaling for speed commands). | |
| void | setSpeedFactor (float factor) |
| Set the speed factor (scaling for speed commands). | |
| virtual std::vector< IMotor< MotorT > * > | getMotors ()=0 |
Public Member Functions inherited from MessageHandler | |
| virtual bool | onMessage (const Message< float > &msg)=0 |
| Handle an incoming message (pure virtual). | |
| virtual bool | onMessage (const Message< Coordinate< float > > &msg) |
| virtual bool | onMessage (const Message< GPSCoordinate > &msg) |
| virtual bool | onMessage (const Message< MotionState3D > &msg) |
Public Member Functions inherited from MessageSource | |
| void | subscribe (MessageHandler &handler, MessageOrigin origin=MessageOrigin::Undefined, MessageContent content=MessageContent::Undefined) |
| Subscribe a message handler to this source, with optional filtering. | |
| void | unsubscribeAll () |
| Remove all registered message handlers. | |
| void | sendMessage (Message< float > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< Coordinate< float > > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< GPSCoordinate > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< MotionState3D > &msg) |
| Overload for MotionState3D messages. | |
Protected Attributes | |
| float | speedFactor_ = 1.0f |
Protected Attributes inherited from MessageSource | |
| std::vector< MessageHandlerEntry > | messageHandlers_ |
Abstract base class for all vehicle types.
The Vehicle class defines a common interface for all robotic vehicles in the library. It enforces the implementation of a reset() method, which should reset the vehicle's actuators and internal state to a safe or neutral configuration.
All vehicle classes (e.g., Car4WD, Quadrotor, AirPlane, MotorBoat) should inherit from Vehicle.
|
inline |
Initialize the vehicle.
|
pure virtual |
Reset the vehicle to a safe or neutral state (pure virtual).
Implemented in AirPlane< T, MotorMT, ServoMT >, MotorBoat< T, MotorMT, ServoMT >, CarAckerman< T, MotorMT, ServoMT >, CarDifferential< N, T, MotorMT >, and Quadrotor< T, DriverT >.
|
pure virtual |
Check if the necessary pins for the vehicle's actuators have been set (pure virtual).
Implemented in AirPlane< T, MotorMT, ServoMT >, CarAckerman< T, MotorMT, ServoMT >, CarDifferential< N, T, MotorMT >, MotorBoat< T, MotorMT, ServoMT >, and Quadrotor< T, DriverT >.