Interpetting a stream of cmd_vels
Investigating weird observed behavior of my TurtleBot3 (previous question: #q300209) I monitored the cmd_vel
topic during the observed behavior. The conditions are as follows:
- turtlebot3 running kinetic
- map made by gmapping followed by teleoping to visit the maze
- I changed the resolution of the map from 0.05 to 0.01 (I don't think this matters)
- Saved the map
- Stopped gmapping
- start navigation
The robot was able to navigate to a variety of corners of the maze relatively well (it did get confused often.) but when I set up a goal where it would try to drive in reverse (twist x < 0) it would exhibit the bucking behavior. And looking at the cmd_vel message stream I did indeed see negative cmd_vels right next to positive ones. I was not running any teleop at the time. Here is some of the data. I had to search for it but you see negative x's next to positive x's. The maximum linear speed specified for TurtleBot3 is 0.22 so -0.11 is about half the maximum.
Any comments on whether this is normal or weird? And whether this can explain the "bucking" (very intense shuddering motion) that I've reported seeing?
linear:
x: -0.113387688994
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.661418616772
---
linear:
x: -0.12927775085
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.976840138435
---
linear:
x: 0.126691520214
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -1.05274891853
---
linear:
x: -0.148515239358
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.77896797657
---
linear:
x: -0.127474233508
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.721023142338
---
linear:
x: 0.134267643094
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -1.08932781219
---
You should try to find which nodes are publishing on the
/cmd_vel
topic withrosnode info /cmd_vel
(during run time). Or if you are using a cmd_vel mutliplexer simply echo the topic/cmd_vel_mux/active
to know what are the inputs for the command.