Magni Motion Anomalies

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

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?

Thank you for your careful analysis. We will take a look at your data and get back to you. Since I personally am not familiar with your exact configuration, I can’t give any specific fixes. Some other variables I would consider though is where the center of gravity is relative to the front of the robot. Another is the coefficient of friction on the floor. A polished concrete floor would work differently than an outside sidewalk.

Another thing I would check is the mechanical and electrical connections. Especially check if the wheels and casters haven’t worked loose or if the chassis is bent. If the robot is driving straight, this probably isn’t an issue. As always make sure your batteries are charged.

We will be in touch, if you don’t hear back from Ubiquity Robotics by COB Monday, please contact me directly at

Thinking about a little more on a top heavy robot, when you start forward you tilt back with reduces the traction on the front wheels, making them more likely to slip. May explain why acceleration and deceleration curves are different, but I took calculus almost 50 years ago.

This particular plot was done with the wheels up off of the floor in order to simplify things and eliminate as much of our application’s kinematics as possible. Guess I should have noted that in the test conditions. :woozy_face: