Technology updates
NVIDIA's Holoscan 5 Tutorial Builds a 400 Hz Gravity-Compensation Loop for a Robot Arm
An NVIDIA developer tutorial shows a three-operator Holoscan 5 gravity-compensation loop running at 400 Hz on a Seeed Studio reBot arm, with Nsight Systems latency results.
NVIDIA published a developer tutorial on November 9 showing how to build a gravity-compensation control loop with Holoscan 5, so that a Seeed Studio reBot Arm B601-DM can support its own weight while yielding to a person guiding it by hand. The post is written by NVIDIA's Jay Carlson and Ansley Dunn, who say the walkthrough was tested on Jetson Orin Nano, Jetson Thor and x86 Ubuntu 24.04 systems.
Holoscan 5's change is that robotic control now sits alongside high-throughput sensor processing in one programming model, using the same operators, ports and graph APIs. The authors describe the goal as a transparent runtime: minimize avoidable framework overhead and make execution explicit and inspectable. The mechanisms are partitions, which keep a chain of operators on a single thread to avoid cross-thread handoffs; clock and data-arrival triggers that decide when work runs; and depth-one, drop-oldest queues that stop stale samples from piling up.
The loop is split into three custom operators. JointStateSourceOp reads the seven motor positions every 2.5 ms, or 400 Hz. PinocchioGravityOp runs whenever state arrives and computes inverse dynamics with Pinocchio's recursive Newton-Euler algorithm. MotorCommandSinkOp sends the torque command to the motors on arrival. All three sit in one control partition and run serially, so nothing hands off between reading, computing and sending. Torques go out as gravity feedforward plus light stiffness and damping, which lets the arm hold itself up and still follow a hand. A helper rejects expired, out-of-order or out-of-range commands; if no batch completes within 100 ms, a watchdog tries to disable the motors and stops the graph.
The authors argue that position-control demos can hide errors in joint axes, offsets, link placement, masses and moments of inertia, whereas gravity compensation makes those errors immediately visible as sagging or pushing upward. That makes the demo a useful check on both the robot model and the runtime.
Measurement uses Holoscan's built-in NVTX annotations, so an unmodified application can be profiled in Nsight Systems without custom timing code. The authors pinned the control partition to a CPU core and used a temporary Linux cgroup to reserve two physical cores and their SMT siblings, retaining more than one million cycles per configuration. With pinning and isolation, p99.99 latency for the C++ implementation fell from 86.6 to 17.2 microseconds, roughly a 5x improvement; the Python version fell from 1,373.5 to 142.6 microseconds, roughly 9.6x. Python's median latency was already about 93 microseconds, which the authors attribute to interpreter execution, object allocation and GIL coordination.
Their practical conclusion is that C++ gives more control for CPU control loops with microsecond budgets, while Python remains a reasonable way to compose pipelines whose heavy elements run in CUDA, as with millisecond-scale GPU perception. The tutorial repository also includes a second example that adds kinematics and impedance control, positioned as a starting point for hand-guided teaching, teleoperation and manipulation, with Holoscan's vision module and Isaac ROS operators available for perception. The release suggests NVIDIA is consolidating edge real-time control and AI perception under one programming model, and that latency tooling is part of the pitch.