Packet Serial Mode Latency Issues

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Packet Serial Mode Latency Issues

Post by Basicmicro Support »

You need to determine if you are getting failed packets. If a packet fails it takes a minimum of 10ms to clear. The Roboclaw python library is setup to retry several times so failed packets add up to significant delays. Note: they are not the problem. They are a symptom of a problem.

If bad packets are causing problems you need to figure out why. Check your baudrate timings. Check how you have routed your signal wires. They should not be right next to a noisy motor power wire for example.

Also, Jetsons have known issues with serial communications. I recommend you search around in this forum specifically for Jetson. I know several people have worked around the Jetson issues in the past.
felix
Posts: 19
Joined: Thu Dec 03, 2020 8:08 am
Re: Packet Serial Mode Latency Issues

Post by felix »

Hi, I'm not sure for the Jetson Nano, but on the Jetson Xavier AGX developper kit, the UART port of the GPIO is also used for connecting a serial terminal for debugging. This sends some data on the UART pins in adition to those you want to send to the robocalw. Therefore, the roboclaw receives a "mix" of both inputs, which results in many broken packages.

If it is the same on the nano, then you need to disable the serial terminal.

There is the part of my instalation script (bash) for giving access to the UART pin for the roboclaws on the Jetson Xavier AGX :

Code: Select all

#disable serial terminal (in order to be able to use UART pins of the GPIO to communicate with the roboclaws)
sudo systemctl stop nvgetty
sudo systemctl disable nvgetty
sudo udevadm trigger 
#allow user to access the serial output (nb : make sure $USER is defined, I think it is by default, if not simply replace it by our user name)
sudo usermod -a -G dialout $USER

Post Reply