On Tuesday evening we had our first test of the new S.A.R.T. Series M robot with all systems functioning at the same time. During our tests we noticed some of the arm positions caused unnecessary strain on the servos, so we tightened the maximum servo ranges to prevent damage. This meant that some of the original values for the preset positions now lay outside of the allowed positions set in the Maestro Control Centre, resulting in an infinite loop. While this could be avoided entirely in Sights 2, the end-of-life nature of Sights 1 called for a quicker, hackier fix – such as simply changing the magic numbers in the arm position presets.

But how do we convert the positions we have control over in the Maestro Control Centre to positions the servo library can interpret? These two different methods of control use differing, often nonsensical units.

maestro.py, the library that Alex’s new arm servo controller makes use of, describes the units in use like so:

Well that clears things up.

So to find out exactly what this meant, a man by the name of Connor had an idea.

At first I wasn’t sure whether this would work. It would require maintaining two connections to the motor controller, which isn’t always possible with hardware like this. This is necessary because after replugging the Maestro servo controller, the servo positions are read usually read as 0 until they are moved again – and of course, if you move the servo to a new position, you can’t read what the old position was.

Fortunately, it seems that you can make two different connections to the motor controller. Here it is connected to both the Maestro Control Centre as well as maestro.py in Python.

This is a great way to design arm position presets using Maestro controller and confirm their position as reported by the library we’re using, or indeed, any other library that may use its own idea of target position. It also became clear that the relationship between the Maestro Control Centre software and the Python servo library is a factor of four, meaning we don’t need to break out the laptop for future conversions. However, this process may be useful for different servo controllers or different Python libraries, or even other control software.

As for Sights 1, Alex is working on a slider control system similar to the Maestro Control Centre “status” page, which in addition to allowing us to control the arm manually, will also report the current position in order to create arm position presets.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.