Roboclaw Random Lurches with ROS Driver

General discussion of using Roboclaw motor controllers
Post Reply
pcdaugherty
Posts: 1
Joined: Wed Jan 01, 2020 2:33 pm

Roboclaw Random Lurches with ROS Driver

Post by pcdaugherty » Wed Jan 01, 2020 3:24 pm

I am building a differential drive robot. While the ROS python driver node is activated, either motor (both do it randomly) will suddenly turn on for a fraction of a second. This occurs anywhere from 15 second to 1 minute intervals. Otherwise, the ROS driver is working and I can operate the robot via the ROS teleoperation modules. I have spent a few days trying to track down and debug the issue, but I am at a loss. I've combed through the python code in both the driver and the node files and I haven't found where the code is causing the lurching. Besides setting the user supplied parameters, I haven't made any changes to the code.

I would appricate any ideas that might help me narrow down what is causing the behavior and how to fix it. I suspect it has something to do with either the PID tuning or maybe encoder noise, but I really don't know how to narrow it. My encoders are set to high resoluion (202000 ticks per meter), but resolution can be lowered by moving some dip switches. PID was autotuned.

Here is the hardware setup:
Roboclaw 2x60A
Raspberry Pi 3B+
2 ea 24v Wheelchair motors
2 ea CUI AMT102v quadrature encoders

Driver Setup:
<arg name="dev" default="/dev/ttyAMA0"/>
<arg name="baud" default="115200"/>
<arg name="address" default="128"/>
<arg name="max_speed" default="2.0"/>
<arg name="ticks_per_meter" default="202000"/>
<arg name="base_width" default="0.51"/>
<arg name="run_diag" default="true"/>

Thank you !

User avatar
Basicmicro Support
Posts: 1404
Joined: Thu Feb 26, 2015 9:45 pm

Re: Roboclaw Random Lurches with ROS Driver

Post by Basicmicro Support » Thu Jan 02, 2020 10:12 am

The ROS python code is pretty simple. It doesnt do anything unless it gets a command from ROS. I would recommend adding some debug code, print or rospy.loginfo commands, to see if you are getting spurious commands from ROS.

Post Reply