Standard Messages
HORUS provides 60+ typed message types covering every common robotics domain. All messages support zero-copy shared memory transport via Topic<T>.
// simplified
use horus::prelude::*;
Which Message Do I Need?
| I need to... | Use | Page |
|---|---|---|
| Send velocity commands to motors | CmdVel, Twist | Control |
| Read IMU data (accel + gyro) | Imu | Sensor |
| Read LiDAR scans | LaserScan | Sensor |
| Publish robot position | Odometry, Pose2D, Pose3D | Sensor, Geometry |
| Send camera images | Image | Image API |
| Send point clouds | PointCloud | PointCloud API |
| Report detections (ML output) | Detection, Detection3D | Perception |
| Send navigation goals | NavGoal, NavPath | Navigation |
| Report system health | DiagnosticReport, NodeHeartbeat | Diagnostics |
| Send force/torque data | WrenchStamped, ForceCommand | Force |
| Send joystick/keyboard input | JoystickInput, KeyboardInput | Input |
| Send audio data | AudioFrame | Audio |
| Send ML tensors | Tensor | Tensor API |
| Send dynamic/untyped data | GenericMessage (4KB, MessagePack) | GenericMessage |
Message Categories
| Category | Types | Page |
|---|---|---|
| Geometry | Twist, Pose2D, Pose3D, Point3, Vector3, Quaternion, TransformStamped, Accel | Geometry Messages |
| Sensor | Imu, LaserScan, Odometry, NavSatFix, BatteryState, JointState, Temperature, MagneticField | Sensor Messages |
| Control | CmdVel, MotorCommand, ServoCommand, PidConfig, DifferentialDriveCommand | Control Messages |
| Navigation | NavGoal, NavPath, Waypoint, OccupancyGrid, CostMap, VelocityObstacle | Navigation Messages |
| Perception | Detection, Detection3D, TrackedObject, SegmentationMask, LandmarkArray | Perception Messages |
| Vision | CompressedImage, CameraInfo, RegionOfInterest, StereoInfo, BoundingBox | Vision Messages |
| Diagnostics | DiagnosticReport, NodeHeartbeat, SafetyStatus, EmergencyStop | Diagnostics Messages |
| Force & Haptics | WrenchStamped, ForceCommand, ContactInfo, ImpedanceParameters | Force Messages |
| Input | JoystickInput, KeyboardInput | Input Messages |
| Clock | Clock-related messages | Clock Messages |
| ML | ML inference messages | ML Messages |
| Tensor | Tensor descriptors | Tensor Messages |
Import
All standard messages are available via the prelude:
// simplified
use horus::prelude::*;
// Now you can use: CmdVel, Imu, Odometry, LaserScan, Twist, Pose2D, etc.
let cmd = CmdVel::new(1.0, 0.0);
let imu = Imu::new();
Custom Messages
Need a type that doesn't exist? Use the message! macro:
// simplified
use horus::prelude::*;
message! {
MotorStatus {
rpm: f32,
current_amps: f32,
temperature_c: f32,
fault_code: u32,
}
}
let topic = Topic::<MotorStatus>::new("motor.status")?;
See Macros for the full message! syntax.
Fixed-Size Types and Zero-Copy
All standard messages are #[repr(C)], Copy, and fixed-size — they transfer through shared memory without serialization. Variable-length data (images, point clouds, tensors) use pool-backed allocation instead.
See Also
- Standard Library — Per-message reference with usage examples
- Python Message Library — Python equivalents
- Custom Messages Tutorial — Creating your own types
- GenericMessage — Dynamic 4KB message with MessagePack
- Message Types Concept — How messages work in HORUS