Jetbot "road_following" example long camera lag

For this specific “road_followng” example… when I move the jetbot camera, It takes more than 10 seconds to see the change on my computer. This lag does not seem to be present in other modules. I am running it remotely from my mac through a jupyter notebook.

Hi jet-nano-l,

Have you tried to maximum system performance by NVPmodel?
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fpower_management_nano.html%23wwpID0E02K0HA

Yes I tried running it at MAXN, the camera response was still very slow. I then tried to use the 0.3.2 image, but it won’t boot - is it not compatible with the B01 Jetson?

Hi Jet-nano-l,

Thanks for reaching out.

Just to clarify, you were able to run the Collision avoidance and teloperation examples (which both use a live camera) without issues?

Best,
John

Yes I turned the fps down to about 5fps, reduced the speed to as low as possible, and moved my router next to the jetbot. The waveshare jetbot variant still moves too fast for the camera, so I had to make it stop about every second for the camera to keep up. It doesn’t seem to have enough torque to move itself at slow controlled speeds. https://github.com/loibucket/autobus/blob/master/combined_code/autobus_live--Seeed-Waveshare-steer-obstacle-colors.ipynb

Hi jetloi,

My best guess is that there may have been a performance regression, that has caused the road following neural network execution time to drop below the framerate of the camera. This could be causing the image queue to build up.

There is an experimental fix that addresses this in the master branch, which I’m curious if you can test. This uses a camera publisher in a separate process, and the notebook then subscribes and “drops frames” if it can’t process fast enough. This results in no queue build up and addressed some lag issues I was facing, so I’m curious if it resolves your issue.

To launch the publisher:

git clone https://github.com/NVIDIA-AI-IOT/jetbot
cd jetbot
python3 scripts/zmq_camera_publisher.py

To use the new camera class:

from jetbot.camera.zmq_camera import ZmqCamera

camera = ZmqCamera()  # this should have same interface as current camera

Please let me know if this helps or you run into issues.

Please note this is highly subject to change.

Best,
John