Vehicle
Vehicle class representing a single physical or simulated vehicle in any domain.
#include <vehicle.hpp>Classes
class Vehicle
Represents a single physical or simulated vehicle and provides access to all its controllers.
struct CameraConfig
Per-camera configuration snapshot captured at Init time.
| Field | Type | Description |
|---|---|---|
port |
uint16_t |
UDP port the camera streams on |
codec |
Camera::VideoCodec |
video codec used by this camera |
id |
std::string |
stable identifier from configuration |
label |
std::string |
human-readable label for display |
struct Map3D
3D point cloud map snapshot.
| Field | Type | Description |
|---|---|---|
points |
std::vector<float> |
flat array of [x, y, z, …] coordinates |
point_count |
int |
number of points in the cloud |
robotX |
float |
robot X position in map frame (m) |
robotY |
float |
robot Y position in map frame (m) |
robotZ |
float |
robot Z position in map frame (m) |
robotYaw |
float |
robot heading in map frame (radians) |
explicit Vehicle(uint8_t id)Construct a Vehicle instance with the given ID.
| Parameter | Type | Description |
|---|---|---|
id |
uint8_t |
Unique identifier for the vehicle (0-255). |
auto GetIdentityController() -> IdentityController&Provides access to the identity controller for this vehicle.
Coming soonReturns: Reference to the IdentityController.
auto Id() const -> uint8_tReturns the unique identifier for this vehicle.
Returns: Vehicle ID in the range 0–255.
auto GetMainController() -> MainController&Provides access to the main controller for high-level commands and state.
Returns: Reference to the MainController.
auto IsSpaceVehicle() const -> boolChecks if the vehicle is a space vehicle.
Returns: true if the vehicle is a space vehicle, false otherwise.
auto IsAerialVehicle() const -> boolChecks if the vehicle is an aerial vehicle.
Returns: true if the vehicle is an aerial vehicle, false otherwise.
auto IsGroundVehicle() const -> boolChecks if the vehicle is a ground vehicle.
Returns: true if the vehicle is a ground vehicle, false otherwise.
auto IsMarineVehicle() const -> boolChecks if the vehicle is a marine vehicle.
Returns: true if the vehicle is a marine vehicle, false otherwise.
auto IsSubmarineVehicle() const -> boolChecks if the vehicle is a submarine vehicle.
Returns: true if the vehicle is a submarine vehicle, false otherwise.
auto GetPayloadController() -> PayloadController&Provides access to the payload controller for this vehicle.
Coming soonReturns: Reference to the PayloadController.
auto GetCamera() -> Camera&Returns the primary payload camera on the vehicle. Equivalent to *GetCamera(0).
Returns: Reference to the primary Camera.
auto GetCameraCount() const -> size_tReturns the number of payload cameras mounted on this vehicle.
Returns: Camera count; always ≥ 1 after construction (index 0 is primary).
auto GetCamera(size_t idx) -> Camera*Returns the payload camera at the given index on this vehicle. Index 0 is the primary camera, equivalent to &GetCamera().
| Parameter | Type | Description |
|---|---|---|
idx |
size_t |
Zero-based camera index. |
Returns: Pointer to the Camera, or nullptr if idx is out of range.
auto GetCameraConfig(size_t idx) const -> CameraConfigReturns the configuration for the camera at the given index.
| Parameter | Type | Description |
|---|---|---|
idx |
size_t |
Zero-based camera index. Bound with GetCameraCount(). |
Returns: Configuration snapshot. Out-of-range indices log a warning to
auto SendVideoControl(bool resume) -> voidPause or resume this vehicle's video stream forwarding.
Best-effort; silently dropped if the link is not yet established.
| Parameter | Type | Description |
|---|---|---|
resume |
bool |
true to resume forwarding, false to pause. |
auto GetGimbal() -> Gimbal&Returns the first gimbal on the vehicle.
Returns: Reference to the primary Gimbal.
auto GetRadioLink() -> RadioLink&Returns the first radio link on the vehicle.
Returns: Reference to the primary RadioLink.
auto GetAutonomyController() -> AutonomyController&Provides access to the autonomy controller for this vehicle.
Coming soonReturns: Reference to the AutonomyController.
auto SetMission(std::function<void(std::shared_ptr<Vehicle>)> mission_func) -> voidSets the mission callable for this vehicle.
| Parameter | Type | Description |
|---|---|---|
mission_func |
std::function<void(std::shared_ptr<Vehicle>)> |
Callable invoked with a shared pointer to this vehicle when the mission starts. |
auto GetMission() const -> std::function<void(std::shared_ptr<Vehicle>)>Returns the current mission callable for this vehicle.
Returns: The stored mission function, or an empty callable if none is set.
auto GetTelemetry() const -> RogueTelemetryReturns the latest aggregated telemetry snapshot for the vehicle.
Returns: RogueTelemetry struct containing pose, battery, GPS, and camera state.
auto GetPerceptionController() -> PerceptionController&Provides access to the perception controller for this vehicle.
Coming soonReturns: Reference to the PerceptionController.
auto GetPowerController() -> PowerController&Provides access to the power controller for this vehicle.
Coming soonReturns: Reference to the PowerController.
auto GetVisualCommunicationController() -> VisualCommunicationController&Provides access to the visual communication controller for this vehicle.
Coming soonReturns: Reference to the VisualCommunicationController.
auto GetSafetyController() -> SafetyController&Provides access to the safety controller for this vehicle.
Coming soonReturns: Reference to the SafetyController.
auto Get3DMap() const -> Map3DReturns the latest 3D point cloud map snapshot.
Returns: Map3D struct; point_count is 0 if no map data is available.