Standard Library

The HORUS Standard Library (horus_library) provides 55+ typed messages for robotics, coordinate transforms (TransformFrame), and zero-copy domain types (Image, PointCloud, DepthImage). All types work in both Rust and Python.

Which Type Do I Need?

I need to...UseRustPython
Drive wheels / send velocityCmdVelCmdVel::new(0.5, 0.1)CmdVel(linear=0.5, angular=0.1)
Read IMU (accel + gyro)Imuimu.linear_accelerationimu.linear_acceleration
Read LiDAR scanLaserScanscan.rangesscan.ranges
Send camera imagesImageImage::new(640, 480, Rgb8)Image(640, 480, encoding=0)
Send 3D point cloudPointCloudPointCloud::new(1000, XYZ)PointCloud(num_points=1000)
Read wheel odometryOdometryodom.x, odom.yodom.x, odom.y
Control jointsJointStatejs.positionsjs.positions
Detect objects (2D)Detectiondet.class_namedet.class_name
Detect objects (3D)Detection3Ddet.bboxdet.bbox
Build a 2D mapOccupancyGridgrid.is_free(x, y)grid.is_free(x, y)
Plan a pathNavPathpath.add_waypoint(wp)path.add_waypoint(wp)
Estimate body poseLandmarkArray.coco_pose().coco_pose()
Transform coordinatesTransformFrametf.lookup("camera", "world")tf.lookup("camera", "world")
Monitor robot healthSafetyStatusstatus.estop_engagedstatus.estop_engaged

Sections

Design Decisions

Why a standard library instead of user-defined messages only? Standardized message types enable interoperability: a SLAM node from one developer works with a path planner from another because they agree on OccupancyGrid. Without standard types, every team invents its own Pose, IMU, and scan formats, making integration painful (the ROS2 ecosystem learned this lesson early).

Why 55+ types instead of a minimal set? Robotics has well-established data patterns (IMU, LiDAR, odometry, detection, etc.). Providing them out of the box means users start building application logic immediately instead of defining message schemas. Custom messages (message! macro or horus.msggen) cover domain-specific needs.

Why Rust and Python parity? Mixed-language systems are common: Rust for real-time control, Python for ML inference and prototyping. Every standard type is available in both languages with binary-compatible zero-copy IPC, so a Rust SLAM node can publish OccupancyGrid that a Python planner consumes with no translation layer.


See Also