A unified, real-time execution & safety layer for Flexiv Rizon arms — one action contract for teleoperation, MPC, reinforcement learning, and real-to-sim-to-real manipulation.
A thin Python client over a real-time-capable control loop, one action interface, and sim + real behind a single backend switch — what Deoxys, Polymetis, frankapy, SERL/HIL-SERL, and LeRobot all settled on, specialized here to the Rizon. The decisive fact: the Rizon runs its hard real-time loop inside the robot, so a Python host loop is genuinely reactive.
Every planner, RL trainer, MPC loop, and teleop session speaks the same action contract; every backend consumes the same safety-filtered setpoint stream.
CartesianChunk, CartesianDelta, JointChunk, GripperCommand + a quantified ExecutionResult. from_waypoint_array(u) ingests a planner's (H,5) array directly.
A named, version-controlled SafetyProfile + a microsecond per-tick filter: workspace box, speed & jump caps, joint limits, contact-wrench stop, watchdog. It clips or rejects — and reports.
Tier A: a 100–500 Hz Python loop, no root, Standard license. Tier B: an optional C++ 1 kHz daemon. Same contract & wire protocol across both.
Develop offline on fake, simulate on mujoco (Jacobian IK + a faithful GN01 gripper), deploy on a real Rizon via RDK — your policy code never changes.
A RecedingHorizonRunner drives any policy(obs) → chunk — the seam for an openpi/VLA policy server, an MPC solver, or a sampler. Predict H, execute H_exec, replan.
An in-process lease plus a host-wide lock, so a second server or a stray script can't fight over the same arm.
A numpy-only server + RemoteRobot client (no ROS), a Gymnasium env, a LeRobot adapter, SpaceMouse teleop / RL intervention, and a ROS 2 overlay with a MoveIt-Servo jog.
The client installs with nothing but numpy and runs anywhere — an RL trainer, an MPC loop, a notebook. Everything heavier is an opt-in extra.
The Rizon servos at 1 kHz internally, so the host only streams setpoints. Both tiers share everything above the backend line.
Server, Gym env, and ROS overlay are pure pass-through — they serialize and forward these exact objects.
The mujoco backend tracks Cartesian setpoints with a damped-least-squares Jacobian IK under gravity compensation, behind the same action contract as the real arm. A one-command builder attaches the GN01 / Grav parallel-jaw gripper — the real Flexiv meshes, the 4-bar linkage reproduced with MuJoCo equality constraints — to the official menagerie Rizon, so executed poses and grasp geometry match the lab.
python -m flexiv_control.sim.build_rizon_gn01 \
--arm <menagerie>/flexiv_rizon4/scene.xml \
--grav-meshdir <flexiv_description>/meshes/Grav \
--out rizon4_gn01.xml
A parallel-jaw gripper is continuous width (0–0.10 m), not 0/1. The 4-bar actuator is ctrl = 9.404·w − 0.155; GripperCommand(width=…) maps straight through.
The dependency-free fake backend runs the whole stack — contract, safety, interpolation — with no robot.
from flexiv_control import Robot, RobotConfig, CartesianChunk robot = Robot(RobotConfig(backend="fake")) # dependency-free sim robot.connect() robot.start_cartesian_impedance() # a short Cartesian chunk: (x, y, z, gripper, n_frames) chunk = CartesianChunk.from_waypoint_array([[0.45, 0.0, 0.30, 1.0, 20], [0.50, 0.0, 0.25, 0.0, 20]]) result = robot.execute_cartesian_chunk(chunk) print(result.success, result.path_tracking_error) robot.disconnect()
pip install -e . # core
pip install -e ".[rl]" # Gym env
pip install -e ".[teleop]" # SpaceMouse
pip install -e ".[lerobot]" # LeRobot
pip install -e ".[mujoco]" # sim
pip install -e ".[flexiv]" # real arm
$ flexiv-control demo
Offline FakeBackend demo — no hardware.
Ten focused guides — architecture, the contract, safety, hardware setup, and one integration walkthrough per use case.