Apology in advance for the long-winded post, but I wanted to be thorough.
I’ve been doing research into the behavior of the Magni’s
PID controller with respect to some unusual movement characteristics
we have observed in our two Magni’s, both under th Kinetic and Noetic images.
I found that subjective evaluation wasn’t good enough, so I started collecting
numerical data.
Using the 'rostopic echo" command on the /diagnostic topic, I was able
to parse out and capture the left and right motor velocity, as well as
the associated timestamp, and then plot this data.
This test was run with the following conditions:
- Firmware version v43_20210829_enc.cyacd
- ROS Noetic Pi image - 2020-11-07-ubiquity-xenial-lxde-raspberry-pi.img.xz
- P set to 5000, per Ubiquity recommendation
- I, D, and pid_velocity set to 0, per Ubiquity
- teleop_twist_keyboard was used to drive the motors
- Motor max speed was set close to 1
- The “i” key was pressed for about 2 1/4 sec and then released
in order to drive both motors together
The captured data stream has an update rate of 20Hz. Inspecting
the data revealed that the values were only changing every
six data points, resulting in a very “quantized” plot. In order
to reduce this, I downsampled the left motor’s data by a factor of
six, and then ran it through a cubic spline fit to smooth it.
I left the right motor’s data in raw form as a sanity check on the
smoothing.
The plot reveals three behaviors that give us problems:.
First, before starting, we hear some low-level “chatter” in the wheels. This can plainly be seen in the
raw data, although the smoothing tends to hide it.
Second, Upon acceleration, there is a noticeable “hump” in the curve, confirming my
visual observation of a “hesitation” when starting motion. This is not consistent on
every run. Something odd is definitely going on there.
And lastly, the deceleration side of the curve is definitely
steeper than the acceleration side, with no “soft landing” at
the end. Our application has a rather tall superstructure on top of the magni,
and, even with a max speed of only 0.3, this abrupt deceleration actually causes
the rear wheels to lift off of the ground, causing us concern that it will tip over!
We have seen these behaviors with both the V40 and V43 firmware, under either Kinetic or Noetic images. I have also reduced the “P” value down to 2500 with similar results.
Has anyone else observed these anomalies?
Is this a problem in the FW, in the ubiquity_motor node, or in our setup?