Omnizyro

Research note · In development

From PyTorch to the robot: a TensorRT and Isaac ROS latency budget on Jetson Orin

How Omnizyro takes a perception model from PyTorch to ONNX to TensorRT FP16 and INT8 on Jetson Orin, and the per-stage latency targets we design against.

Abstract

A robot moving at warehouse speed covers a meaningful distance between the moment a camera exposes a frame and the moment the planner reacts. This note sets out how we move models from training to the robot, and the latency budget we design to. Every number below is a design target, not a measurement. We describe how we will measure each stage on Jetson Orin hardware; measured results will be published after evaluation.

Problem

Research code runs perception in PyTorch at full precision on a desktop GPU, one image at a time, with no other process competing. A robot computer does something different. It runs stereo depth, visual odometry, map integration, object detection and local planning at once, on a power budget of tens of watts, while sharing memory between CPU and GPU. Latency adds up across stages, and the slowest stage sets the rate for everything after it. If we do not budget each stage, the robot ends up reacting to the world as it was a third of a second ago.

Method

Export. Models are trained in PyTorch, or fine-tuned in the TAO Toolkit, and exported to ONNX with fixed input shapes per camera resolution. Fixed shapes let TensorRT choose the fastest kernels. We check the exported graph against PyTorch on a held-out image set and require the outputs to agree within a set tolerance before going further.

Build engines. TensorRT engines are built on the same Jetson module family that will run them, because engines are tied to the GPU architecture and TensorRT version. We build an FP16 engine first, then an INT8 engine using entropy calibration on about a thousand frames sampled from the target site at different times of day. Layers that lose too much accuracy in INT8 stay in FP16; TensorRT allows this mixed precision per layer.

Integrate. On the robot, everything runs as ROS 2 nodes from Isaac ROS. Stereo depth and visual odometry use the Isaac ROS packages; nvblox integrates depth into the map; our detector runs through the Isaac ROS TensorRT node. Isaac ROS uses NITROS type adaptation so images stay in GPU memory between nodes instead of being copied back to the CPU, which is a large part of the budget on an embedded module.

Budget. For a 30 frames-per-second stereo camera at 640 by 480, the end-to-end target from exposure to updated costmap is 120 ms at the 95th percentile. The per-stage targets are:

Latency budget per stage (targets, not measurements)
StageRuns onTarget p95
Capture and transfer to GPU memoryCamera driver, NITROS15 ms
Stereo disparity to depthIsaac ROS stereo, GPU20 ms
Object detection, INT8TensorRT, GPU and DLA18 ms
Depth integration into the mapnvblox, GPU25 ms
Costmap band extraction and labelsCUDA kernel12 ms
Margin for scheduling jitterShared30 ms

Detection runs in parallel with depth, so the budget is not a simple sum. On Orin modules with Deep Learning Accelerators we will test moving the detector to a DLA core to free the GPU for depth and mapping.

Evaluation design

We will measure on Jetson Orin Nano, Orin NX and AGX Orin modules with the power mode recorded for every run. Latency is measured with ROS 2 message timestamps from capture to costmap publication, over at least 30 minutes of recorded aisle driving replayed through the pipeline, and reported as median, 95th and 99th percentile. Accuracy is checked by running the FP16 and INT8 engines on the LOCO test split and our site-held-out sets, reporting the change in per-class average precision against the PyTorch model. We also record GPU memory, power draw and thermal throttling events, because a pipeline that meets its target for five minutes and then throttles is not useful on a twelve-hour shift.

Risks and limits

  • INT8 calibration on one site may not transfer to another with different lighting. We plan to recalibrate per site and compare.
  • Engines must be rebuilt after every JetPack upgrade. The update process in our edge deployment guide handles this, but it adds rollout time.
  • Other software from the robot vendor shares the module on some robots. Where we run on a separate Jetson mounted on the robot, transfer from the vendor's sensors adds its own latency, which we will report separately.
  • Latency targets say nothing about safety. The robot's certified safety functions are independent of this pipeline and must stay so.

Next steps

The export and engine-build scripts exist for the detector. Next we instrument the full ROS 2 graph with timestamps, run the first replay measurements on Orin NX, and publish the measured budget beside these targets.

References

  • Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation
  • Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
  • Robot Operating System 2: Design, Architecture, and Uses in the Wild
  • nvblox: GPU-Accelerated Incremental Signed Distance Field Mapping