USB Latency Issues - Ubuntu 22.04 on NVIDEA JETSON ORIN AGX

Hi everyone,

I’m experiencing latency issues when using the ODrive Web GUI on my NVIDIA Jetson Orin AGX. On a Windows machine with the exact same settings, everything works seamlessly, and the ODrive setup performs as expected.

However, on my Jetson Orin AGX, the sensor values from the encoder are coming back very slowly, which affects the closed-loop control. This delay introduces vibrations into the motor, making it difficult to operate smoothly.

To troubleshoot, I tested the same setup on another Ubuntu host machine and found that changing the power mode had an impact on the sensor readings from the encoder. On the Jetson, switching to a higher power mode and increasing the CPU frequency improved the encoder readings slightly, but the issue still persists.

GUI - Sensor Output on Windows

GUI - Sensor Output on Ubuntu - Nvidea Jetson ORin AGX (Jetpack 6.1)

Has anyone encountered similar issues with ODrive on Jetson devices? Could this be related to USB communication latency or something else? Any advice or suggestions for further troubleshooting would be greatly appreciated!

Thank you!

Thanks for reporting this!

In a vacuum, I’m not sure what could be the cause of this. I know we have customers successfully using USB at higher data rates on embedded devices.

A few things to try / let me know:

  1. What’s the output of odrivetool rate-test?
  2. Is this ODrive directly connected to an Orin USB port? Is there a USB hub? Any other USB devices with significant traffic (e.g. camera, etc)
  3. I tested the same setup on another Ubuntu host machine and found that changing the power mode had an impact on the sensor readings from the encoder.

  • Can you elaborate on this a bit? I’m not sure what you mean by “power mode” – like turning off battery saver on a laptop? Something else?
  1. This delay introduces vibrations into the motor, making it difficult to operate smoothly.

  • The ODrive control loop shouldn’t be affected by USB issues – do you mean your user code that’s processing encoder data and sending setpoints to the ODrive?

To add to Solomons answer, my first guess based on your screenshot is that it’s CPU saturation such that the GUI can’t update at the nominal rate. This would also impact the responsiveness of the slider and lead to jerky motion when you move the slider. (is that what you mean by “vibration”?)

However, while there might still be optimizations possible from our end, a Jetson should easily have enough CPU power. For comparison, here’s the GUI on a Raspberry Pi 4:

So you can additionally:

  • Check if any other programs are using a lot of resources
  • Check if there are any CPU throttling settings in the OS that impact the browser
  • Pause plotting on the “Inspector” tab, so that only “Dashboard” is plotting (or the other way around)

Thank you for your quick responses!

To clarify, I’m not using any USB hubs. By “power mode,” I’m referring to the different operational modes of the Jetson (15W, 30W, 50W, and full power mode). In full power mode, all CPUs are activated.

I’ve discovered that my device is artificially limiting the USB connection, but I haven’t yet pinpointed the cause. I rebuilt a Python script to communicate with the ODrive, focusing specifically on the encoder. After doing this, and connecting the device via USB, I encountered almost no latency. The application’s outputs were plotted in real-time on my screen.

It seems the issue lies in how Ubuntu handles the web GUI. For now, I’m in a good place since I’ll be using Python for my future work anyway.

Thank you again!

That’s super fascinating – if you find the USB ratelimiting cause, please let us know – I’m super interested. Maybe a selinux thing?

Glad to hear it doesn’t affect Python though – let us know if there’s any other way we can help!