Not Enough Documentation For Dynamixel IO Package

Poppy is an amazing project but the dynxamixel IO library has somewhat less documentation and is kind of abstract.

http://poppy-project.github.io/pypot/pypot.dynamixel.html#pypot.dynamixel.io.DxlIO

For example, in the function .set_moving_speed and .get_present speed the units for these are not defined. I was able to set the max speed for my MX64 by sending my_motor.set_moving_speed(300), any value above that would give a constant output on the .get_motor_speed command (I can show the graph and code if required).

So herein lies my question, what are the units of these functions and what would be the conversion to RPM ? Or do they accept the same values as MX64 data sheet (e-manual), but I have tried giving input till 1023 and detected that speed doesn’t change after 300.

For a similar function, such as .set_goal_position , exact angle limits and values are provided by documentation as "The motors are handled in degrees where 0 is considered the central point of the motor turn. For the MX motors, the end points are -180° and 180°. For the AX and RX motors, these end points are -150° to 150°. "

at http://poppy-project.github.io/pypot/dynamixel.html.

Similar explanation of units if set_moving_speed and get_present_speed commands would be greatly appreciated as it would help people who have just started working with dynamixel motors.(MX64, in my case).

Thanks in advance.

Here is the code:

import itertools
import numpy
import time
import matplotlib.pyplot as plt
import pypot.dynamixel

read_angles = []
read_vel = []
tim = []
set_vel = []

ports = pypot.dynamixel.get_available_ports()
print ‘available ports:’, ports

if not ports:
raise IOError(‘No port available.’)

port = ports[0]
print ‘Using the first on the list’, port

dxl_io = pypot.dynamixel.DxlIO(port)
print ‘Connected!’

ids = [1]

dxl_io.enable_torque(ids)
dxl_io.set_joint_mode(ids)
dxl_io.set_goal_position({ids[0]:0})
print dxl_io.get_present_position(ids)
time.sleep(1)
print dxl_io.get_mode(ids)

dxl_io.set_wheel_mode(ids)

start = time.time()
for i in range(1500):
set_vel.append(i)
dxl_io.set_moving_speed({ids[0]:i})
read_angles.append(dxl_io.get_present_position(ids))
read_vel.append(dxl_io.get_present_speed(ids))
tim.append(time.time())
print i

end = time.time()

dxl_io.set_moving_speed({ids[0]:0})

time_total = end - start
print time_total

plt.plot(tim, read_vel)
plt.plot(tim, set_vel)
plt.show()

And here is the photo of the Speed vs Time graph:
Green - Given inputs
Blue - Reading from the dynamixel MX64

Pypot tends to use the ISU. In your case the speed is in degree per second. The easiest way to find out is to directly look at the conversion module source code.

Due to a lack of time, everything is not fully documented in pypot. Yet, as this an open source project, feel free to contribute by improving the doc!

Alternatively you can set up convert to False in the DxlIO methods and use the dynamixel units.

This topic was automatically closed after 24 hours. New replies are no longer allowed.