Standard Messages
HORUS provides 75+ typed message types covering every common robotics domain. All are importable from horus and binary-compatible with Rust for cross-language topics.
from horus import CmdVel, Imu, LaserScan, Pose2D, Odometry
Which Message Do I Need?
| I need to... | Use | Category |
|---|---|---|
| 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 ML detections | 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 | ML |
| Send dynamic/untyped data | Python dicts (GenericMessage, 4KB) | Topic API |
Message Categories
| Category | Types | Page |
|---|---|---|
| Sensor | Imu, LaserScan, Odometry, NavSatFix, BatteryState, RangeSensor, Temperature, MagneticField | Sensor Messages |
| Control | CmdVel, MotorCommand, ServoCommand, PidConfig, DifferentialDriveCommand, JointCommand | Control Messages |
| Geometry | Pose2D, Pose3D, Twist, Vector3, Point3, Quaternion, TransformStamped, Accel | Geometry Messages |
| Navigation | NavGoal, NavPath, Waypoint, OccupancyGrid, CostMap, VelocityObstacle | Navigation Messages |
| Perception | Detection, Detection3D, BoundingBox2D/3D, SegmentationMask, TrackedObject, Landmark | Perception Messages |
| Diagnostics | Heartbeat, DiagnosticReport, EmergencyStop, SafetyStatus, NodeHeartbeat | Diagnostics Messages |
| Vision | CompressedImage, CameraInfo, StereoInfo, RegionOfInterest | Vision Messages |
| Force & Haptics | WrenchStamped, ForceCommand, ContactInfo, HapticFeedback, TactileArray | Force Messages |
| Input | JoystickInput, KeyboardInput | Input Messages |
| Clock | Clock, TimeReference | Clock Messages |
| ML | AudioFrame | ML Messages |
| Tensor | Tensor descriptors | Tensor Messages |
Import
All standard messages are available from the top-level horus module:
import horus
# Direct attribute access
cmd = horus.CmdVel(linear=1.0, angular=0.5)
imu = horus.Imu(accel_x=0.0, accel_y=0.0, accel_z=9.81)
# Or import specific types
from horus import CmdVel, Imu, LaserScan, Pose2D, Odometry
Custom Messages
Need a type that doesn't exist? Use Python dicts for prototyping:
node.send("motor_status", {
"rpm": 1500.0,
"current_amps": 2.3,
"temperature_c": 45.0,
})
For production cross-language use, define message types in Rust with message! and they become available in Python automatically. See Custom Messages.
Typed vs Generic Performance
| Transport | Latency | Cross-Language |
|---|---|---|
Typed messages (horus.CmdVel) | ~1.7μs | Yes |
| Python dicts (GenericMessage) | ~6-50μs | No |
Image zero-copy (DLPack) | ~1.1μs | Yes |
Rule: Use typed messages for control loops and cross-language topics. Use dicts for Python-only prototyping.
See Also
- Custom Messages — Runtime and compiled custom types
- Topic API — Typed vs generic topics, GenericMessage constraints
- Rust Standard Messages — Rust equivalent
- Message Types Concept — How messages work in HORUS