RIO-HW 🎛️ is a real-time control library for cross-embodiment robot hardware.
Tested on: Ubuntu 22.04 LTS (optional: real-time kernel patch). See docs/ubuntu.md for setup instructions.
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# create venv
uv venv --python 3.10
source .venv/bin/activate
uv sync --all-extrasSee [Hardware Guide (Google Docs)] for hardware BOM and example robot stations.
Run
python -c "from rio_hw.cameras.{CAMERA} import get_connected_cameras; print(get_connected_cameras())"to get camera serials and models.
Realsense: docs/cameras/realsense.md
sudo ./scripts/setup/realsense.sh
# verify install
realsense-viewer
# Note: if you do not need L515 support, then you can use newer versions of librealsense2/pyrealsense2 >2.54.2Record3d (iOS device): Download the Record3D app and keep the app running in the background. You may need to pay for both "Full Version" and "Wi-Fi Streaming & RGBD Videos" in-app purchases or restore purchases.
sudo ./scripts/setup/record3d.sh
# Enable "Settings -> Higher-quality LiDAR recording" to capture data at higher resolution.Zed: To install ZED SDK for the first time, see Stereolabs Docs: Install the ZED Python API.
# (re)install pyzed
python /usr/local/zed/get_python_api.py
# verify install
/usr/local/zed/tools/ZED_Explorer
# fix Error: "Can't save calibration file.
sudo chmod -R 777 /usr/local/zed/settingsAVP Stream (Apple Vision Pro): Download the Tracking Streamer app. Run the app and click Start to stream tracking data over WiFI network. Click the digital crown to stop streaming.
Gamepad: docs/interfaces/gamepad.md
Gello: docs/interfaces/gello.md
Oculus Reader (Quest 2): rail-berkeley/oculus_reader/README.md
Spacemouse:
sudo ./scripts/setup/spacemouse.sh
# verify install
systemctl status spacenavdVuer: docs/interfaces/vuer.md
XRoboToolkit: docs/interfaces/x_robotoolkit.md
Franka: docs/robots/franka.md
Kinova: docs/robots/kinova.md
XArm docs/robots/xarm.md
Unitree G1: docs/robots/unitree_g1.md
A Node dynamically inherits from any given Middleware to handle automatically message passing, and factory functions produce Server and Client nodes. Each Node publishes data and handles requests, in separate loops or in the same loop.
Node.pub()only publishes data.Node.req()only handles requests.Node.pubreq()both publishes data and handles requests.Node.req()only handles requests, andNode.pub()publishes data in a separate worker.Node.pub()only publishes data, andNode.req()handles requests in a separate worker.
Users only need to implement "pub/req" behavior in nodes through Node.pub() / Node.req() / Node.pubreq(). A "pub" loop should call ring_buffer.put() to publish data, and a "req" loop should call request_queue.get() to handle requests. A Server runs "pub/req" ("publish"/"request") and a Client resolves "sub/rep" ("subscribe"/"reply") automatically. See template.py for an example outline of a Node.
- SI units:
seconds,meters,kilograms,radians - Quaternion ordering:
(x, y, z, w) - SE3 matrix:
[R t; 0 1]whereRis 3x3 rotation matrix andtis 3x1 translation vector. - Linear velocity: COM, world frame
- Angular velocity: world frame
- Naming:
-
*_frame: coordinate system -
a_b_tf: rigid-body transform$T_{a}^{b}$ from frame$a$ to frame$b$ (frame$a$ in coordinates of frame$b$ ) -
*_pose: pose of an entity in a frame
-
- Coordinate system:
Zup, right-handed - Other conventions:
- Images:
(height, width, channel), RGB channel order - Robot base frame:
+Xfront,+Yleft,+Zup - Robot eef frame: at mounting flange / tool base
- Gripper:
[0, 1]->[closed, open]
- Images: