Commit ce15fa78 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

First working version

parent 79e67cc7
from .channel import Channel
from .channel import Protocol1
from .channel import Protocol2
#!/usr/bin/python3
import dynamixel_sdk as sdk
import serial.tools
import serial.tools.list_ports
class Channel:
def __init__(self, speed, serial_number=None, device=None):
if serial_number != None and device != None:
raise Exception('Either serial_number or port should be specified')
# Hackish way to check baud-rate
if sdk.PortHandler.getCFlagBaud(None, speed) < 0:
raise Exception('Baud rate error "%d"' % speed)
# Scan available USB devices
devices = {}
for v,p,s,d in [ (p.vid, p.pid, p.serial_number, p.device)
for p
in serial.tools.list_ports.comports() ]:
devices[s] = d
pass
if serial_number and serial_number in devices:
port = devices[serial_number]
pass
elif device and device in devices.values():
port = device
pass
elif len(devices) == 1:
port = list(devices.values())[0]
print("Warning, defaulting to: ", devices)
else:
raise Exception(f'Select one of: {devices}')
self.port_handler = sdk.PortHandler(port)
if not self.port_handler.openPort():
raise Exception("self.port_handler.openPort()")
if not self.port_handler.setBaudRate(speed):
raise Exception(f"self.port_handler.setBaudRate({speed})")
# Check id (i.e. FT2H2W9I)...
self._protocol = {}
pass
def protocol(self, protocol):
if protocol in self._protocol:
return self._protocol[protocol]
else:
self._protocol[protocol] = protocol(self.port_handler)
return self._protocol[protocol]
def add(self, device):
print('Add', device)
pass
pass
class Protocol1:
pass
class Protocol2:
def __init__(self, port_handler):
self.port_handler = port_handler
self.packet_handler = sdk.PacketHandler(2.0)
pass
def read(self, servo, row):
if row.size == 1:
value, comm_result, error = self.packet_handler.read1ByteTxRx(
self.port_handler, servo._id, row.address)
pass
elif row.size == 2:
value, comm_result, error = self.packet_handler.read2ByteTxRx(
self.port_handler, servo._id, row.address)
pass
elif row.size == 4:
value, comm_result, error = self.packet_handler.read4ByteTxRx(
self.port_handler, servo._id, row.address)
pass
else:
raise Exception('Invalid size', row)
if comm_result != 0:
raise Exception("Comunication error", comm_result)
if error != 0:
raise Exception("Servo error", error)
return value
def write(self, servo, row, value):
if row.size == 1:
comm_result, error = self.packet_handler.write1ByteTxRx(
self.port_handler, servo._id, row.address, value)
pass
elif row.size == 2:
comm_result, error = self.packet_handler.write2ByteTxRx(
self.port_handler, servo._id, row.address, value)
pass
elif row.size == 4:
comm_result, error = self.packet_handler.write4ByteTxRx(
self.port_handler, servo._id, row.address, value)
pass
else:
raise Exception('Invalid size', row)
if comm_result != 0:
raise Exception("Comunication error", comm_result)
if error != 0:
raise Exception("Servo error", error)
pass
pass
from dynamixel.servo import Servo, Row, IndirectRow
import dynamixel.protocol
class 2XC430_W250(Servo):
EEPROM = [
Row(name='model_number', address=0, size=2, default=1160),
Row(name='model_information', address=2, size=4, default=None),
Row(name='firmware_version', address=6, size=1, default=None),
Row(name='id', address=7, size=1, default=None),
Row(name='baud_rate', address=8, size=1, default=1),
Row(name='return_delay_time', address=9, size=1, default=250),
Row(name='drive_mode', address=10, size=1, default=0),
Row(name='operating_mode', address=11, size=1, default=3),
Row(name='secondary_id', address=12, size=1, default=255),
Row(name='protocol_type', address=13, size=1, default=2),
Row(name='homing_offset', address=20, size=4, default=0),
Row(name='moving_threshold', address=24, size=4, default=10),
Row(name='temperature_limit', address=31, size=1, default=80),
Row(name='max_voltage_limit', address=32, size=2, default=160),
Row(name='min_voltage_limit', address=34, size=2, default=60),
Row(name='pwm_limit', address=36, size=2, default=885),
Row(name='velocity_limit', address=44, size=4, default=275),
Row(name='max_position_limit', address=48, size=4, default=4095),
Row(name='min_position_limit', address=52, size=4, default=0),
Row(name='shutdown', address=63, size=1, default=52)
]
RAM = [
Row(name='torque_enable', address=64, size=1, default=0),
Row(name='led', address=65, size=1, default=0),
Row(name='status_return_level', address=68, size=1, default=2),
Row(name='registered_instruction', address=69, size=1, default=0),
Row(name='hardware_error_status', address=70, size=1, default=0),
Row(name='velocity_i_gain', address=76, size=2, default=1920),
Row(name='velocity_p_gain', address=78, size=2, default=100),
Row(name='position_d_gain', address=80, size=2, default=0),
Row(name='position_i_gain', address=82, size=2, default=0),
Row(name='position_p_gain', address=84, size=2, default=700),
Row(name='feedforward_2nd_gain', address=88, size=2, default=0),
Row(name='feedforward_1st_gain', address=90, size=2, default=0),
Row(name='bus_watchdog', address=98, size=1, default=0),
Row(name='goal_pwm', address=100, size=2, default=None),
Row(name='goal_velocity', address=104, size=4, default=None),
Row(name='profile_acceleration', address=108, size=4, default=0),
Row(name='profile_velocity', address=112, size=4, default=0),
Row(name='goal_position', address=116, size=4, default=None),
Row(name='realtime_tick', address=120, size=2, default=None),
Row(name='moving', address=122, size=1, default=0),
Row(name='moving_status', address=123, size=1, default=0),
Row(name='present_pwm', address=124, size=2, default=None),
Row(name='present_load', address=126, size=2, default=None),
Row(name='present_velocity', address=128, size=4, default=None),
Row(name='present_position', address=132, size=4, default=None),
Row(name='velocity_trajectory', address=136, size=4, default=None),
Row(name='position_trajectory', address=140, size=4, default=None),
Row(name='present_input_voltage', address=144, size=2, default=None),
Row(name='present_temperature', address=146, size=1, default=None),
IndirectRow(name='indirect_address', addresses=[range(168, 224, 2), range(578, 634, 2)], size=2),
IndirectRow(name='indirect_data', addresses=[range(224, 252), range(634, 662)], size=1)
]
PROTOCOL = dynamixel.protocol.Protocol2
def __init__(self, id):
super(2XC430_W250, self).__init__(
id=id, eeprom=self.EEPROM, ram=self.RAM, protocol=self.PROTOCOL)
from dynamixel.servo import Servo, Row, IndirectRow
import dynamixel.protocol
class 2XL430_W250_T(Servo):
EEPROM = [
Row(name='model_number', address=0, size=2, default=1090),
Row(name='model_information', address=2, size=4, default=None),
Row(name='firmware_version', address=6, size=1, default=None),
Row(name='id', address=7, size=1, default=None),
Row(name='baud_rate', address=8, size=1, default=1),
Row(name='return_delay_time', address=9, size=1, default=250),
Row(name='drive_mode', address=10, size=1, default=0),
Row(name='operating_mode', address=11, size=1, default=3),
Row(name='secondary_id', address=12, size=1, default=255),
Row(name='protocol_type', address=13, size=1, default=2),
Row(name='homing_offset', address=20, size=4, default=0),
Row(name='moving_threshold', address=24, size=4, default=10),
Row(name='temperature_limit', address=31, size=1, default=72),
Row(name='max_voltage_limit', address=32, size=2, default=140),
Row(name='min_voltage_limit', address=34, size=2, default=60),
Row(name='pwm_limit', address=36, size=2, default=885),
Row(name='velocity_limit', address=44, size=4, default=250),
Row(name='max_position_limit', address=48, size=4, default=4095),
Row(name='min_position_limit', address=52, size=4, default=0),
Row(name='shutdown', address=63, size=1, default=52)
]
RAM = [
Row(name='torque_enable', address=64, size=1, default=0),
Row(name='led', address=65, size=1, default=0),
Row(name='status_return_level', address=68, size=1, default=2),
Row(name='registered_instruction', address=69, size=1, default=0),
Row(name='hardware_error_status', address=70, size=1, default=0),
Row(name='velocity_i_gain', address=76, size=2, default=1800),
Row(name='velocity_p_gain', address=78, size=2, default=100),
Row(name='position_d_gain', address=80, size=2, default=2000),
Row(name='position_i_gain', address=82, size=2, default=0),
Row(name='position_p_gain', address=84, size=2, default=640),
Row(name='feedforward_2nd_gain', address=88, size=2, default=0),
Row(name='feedforward_1st_gain', address=90, size=2, default=0),
Row(name='bus_watchdog', address=98, size=1, default=0),
Row(name='goal_pwm', address=100, size=2, default=None),
Row(name='goal_velocity', address=104, size=4, default=None),
Row(name='profile_acceleration', address=108, size=4, default=0),
Row(name='profile_velocity', address=112, size=4, default=0),
Row(name='goal_position', address=116, size=4, default=None),
Row(name='realtime_tick', address=120, size=2, default=None),
Row(name='moving', address=122, size=1, default=0),
Row(name='moving_status', address=123, size=1, default=0),
Row(name='present_pwm', address=124, size=2, default=None),
Row(name='present_load', address=126, size=2, default=None),
Row(name='present_velocity', address=128, size=4, default=None),
Row(name='present_position', address=132, size=4, default=None),
Row(name='velocity_trajectory', address=136, size=4, default=None),
Row(name='position_trajectory', address=140, size=4, default=None),
Row(name='present_input_voltage', address=144, size=2, default=None),
Row(name='present_temperature', address=146, size=1, default=None),
IndirectRow(name='indirect_address', addresses=[range(168, 224, 2), range(578, 634, 2)], size=2),
IndirectRow(name='indirect_data', addresses=[range(224, 252), range(634, 662)], size=1)
]
PROTOCOL = dynamixel.protocol.Protocol2
def __init__(self, id):
super(2XL430_W250_T, self).__init__(
id=id, eeprom=self.EEPROM, ram=self.RAM, protocol=self.PROTOCOL)
from dynamixel.servo import Servo, Row, IndirectRow
import dynamixel.protocol
from dynamixel.servo import Servo
from dynamixel.servo import Row, RWRow, IndirectRow
from dynamixel.channel import Protocol1
class AX_12A(Servo):
EEPROM = [
Row(name='model_number', address=0, size=2, default=12),
Row(name='firmware_version', address=2, size=1, default=None),
Row(name='id', address=3, size=1, default=1),
Row(name='baud_rate', address=4, size=1, default=1),
Row(name='return_delay_time', address=5, size=1, default=250),
Row(name='cw_angle_limit', address=6, size=2, default=0),
Row(name='ccw_angle_limit', address=8, size=2, default=1023),
Row(name='temperature_limit', address=11, size=1, default=70),
Row(name='min_voltage_limit', address=12, size=1, default=60),
Row(name='max_voltage_limit', address=13, size=1, default=140),
Row(name='max_torque', address=14, size=2, default=1023),
Row(name='status_return_level', address=16, size=1, default=2),
Row(name='alarm_led', address=17, size=1, default=36),
Row(name='shutdown', address=18, size=1, default=36)
]
RAM = [
Row(name='torque_enable', address=24, size=1, default=0),
Row(name='led', address=25, size=1, default=0),
Row(name='cw_compliance_margin', address=26, size=1, default=1),
Row(name='ccw_compliance_margin', address=27, size=1, default=1),
Row(name='cw_compliance_slope', address=28, size=1, default=32),
Row(name='ccw_compliance_slope', address=29, size=1, default=32),
Row(name='goal_position', address=30, size=2, default=None),
Row(name='moving_speed', address=32, size=2, default=None),
Row(name='torque_limit', address=34, size=2, default=None),
Row(name='present_position', address=36, size=2, default=None),
Row(name='present_speed', address=38, size=2, default=None),
Row(name='present_load', address=40, size=2, default=None),
Row(name='present_voltage', address=42, size=1, default=None),
Row(name='present_temperature', address=43, size=1, default=None),
Row(name='registered', address=44, size=1, default=0),
Row(name='moving', address=46, size=1, default=0),
Row(name='lock', address=47, size=1, default=0),
Row(name='punch', address=48, size=2, default=32)
]
PROTOCOL = dynamixel.protocol.Protocol1
EEPROM = {
'model_number': Row(name='model_number', address=0, size=2, default=12),
'firmware_version': Row(name='firmware_version', address=2, size=1, default=None),
'id': RWRow(name='id', address=3, size=1, default=1),
'baud_rate': RWRow(name='baud_rate', address=4, size=1, default=1),
'return_delay_time': RWRow(name='return_delay_time', address=5, size=1, default=250),
'cw_angle_limit': RWRow(name='cw_angle_limit', address=6, size=2, default=0),
'ccw_angle_limit': RWRow(name='ccw_angle_limit', address=8, size=2, default=1023),
'temperature_limit': RWRow(name='temperature_limit', address=11, size=1, default=70),
'min_voltage_limit': RWRow(name='min_voltage_limit', address=12, size=1, default=60),
'max_voltage_limit': RWRow(name='max_voltage_limit', address=13, size=1, default=140),
'max_torque': RWRow(name='max_torque', address=14, size=2, default=1023),
'status_return_level': RWRow(name='status_return_level', address=16, size=1, default=2),
'alarm_led': RWRow(name='alarm_led', address=17, size=1, default=36),
'shutdown': RWRow(name='shutdown', address=18, size=1, default=36)
}
RAM = {
'torque_enable': RWRow(name='torque_enable', address=24, size=1, default=0),
'led': RWRow(name='led', address=25, size=1, default=0),
'cw_compliance_margin': RWRow(name='cw_compliance_margin', address=26, size=1, default=1),
'ccw_compliance_margin': RWRow(name='ccw_compliance_margin', address=27, size=1, default=1),
'cw_compliance_slope': RWRow(name='cw_compliance_slope', address=28, size=1, default=32),
'ccw_compliance_slope': RWRow(name='ccw_compliance_slope', address=29, size=1, default=32),
'goal_position': RWRow(name='goal_position', address=30, size=2, default=None),
'moving_speed': RWRow(name='moving_speed', address=32, size=2, default=None),
'torque_limit': RWRow(name='torque_limit', address=34, size=2, default=None),
'present_position': Row(name='present_position', address=36, size=2, default=None),
'present_speed': Row(name='present_speed', address=38, size=2, default=None),
'present_load': Row(name='present_load', address=40, size=2, default=None),
'present_voltage': Row(name='present_voltage', address=42, size=1, default=None),
'present_temperature': Row(name='present_temperature', address=43, size=1, default=None),
'registered': Row(name='registered', address=44, size=1, default=0),
'moving': Row(name='moving', address=46, size=1, default=0),
'lock': RWRow(name='lock', address=47, size=1, default=0),
'punch': RWRow(name='punch', address=48, size=2, default=32)
}
PROTOCOL = Protocol1
def __init__(self, id):
super(AX_12A, self).__init__(
id=id, eeprom=self.EEPROM, ram=self.RAM, protocol=self.PROTOCOL)
def __init__(self, channel, id):
super(AX_12A, self).__init__(channel=channel, id=id)
from dynamixel.servo import Servo, Row, IndirectRow
import dynamixel.protocol
from dynamixel.servo import Servo
from dynamixel.servo import Row, RWRow, IndirectRow
from dynamixel.channel import Protocol1
class AX_12W(Servo):
EEPROM = [
Row(name='model_number', address=0, size=2, default=300),
Row(name='firmware_version', address=2, size=1, default=None),
Row(name='id', address=3, size=1, default=1),
Row(name='baud_rate', address=4, size=1, default=1),
Row(name='return_delay_time', address=5, size=1, default=250),
Row(name='cw_angle_limit', address=6, size=2, default=0),
Row(name='ccw_angle_limit', address=8, size=2, default=1023),
Row(name='temperature_limit', address=11, size=1, default=70),
Row(name='min_voltage_limit', address=12, size=1, default=60),
Row(name='max_voltage_limit', address=13, size=1, default=140),
Row(name='max_torque', address=14, size=2, default=1023),
Row(name='status_return_level', address=16, size=1, default=2),
Row(name='alarm_led', address=17, size=1, default=36),
Row(name='shutdown', address=18, size=1, default=36)
]
RAM = [
Row(name='torque_enable', address=24, size=1, default=0),
Row(name='led', address=25, size=1, default=0),
Row(name='cw_compliance_margin', address=26, size=1, default=4),
Row(name='ccw_compliance_margin', address=27, size=1, default=4),
Row(name='cw_compliance_slope', address=28, size=1, default=64),
Row(name='ccw_compliance_slope', address=29, size=1, default=64),
Row(name='goal_position', address=30, size=2, default=None),
Row(name='moving_speed', address=32, size=2, default=None),
Row(name='torque_limit', address=34, size=2, default=None),
Row(name='present_position', address=36, size=2, default=None),
Row(name='present_speed', address=38, size=2, default=None),
Row(name='present_load', address=40, size=2, default=None),
Row(name='present_voltage', address=42, size=1, default=None),
Row(name='present_temperature', address=43, size=1, default=None),
Row(name='registered', address=44, size=1, default=0),
Row(name='moving', address=46, size=1, default=0),
Row(name='lock', address=47, size=1, default=0),
Row(name='punch', address=48, size=2, default=32)
]
PROTOCOL = dynamixel.protocol.Protocol1
EEPROM = {
'model_number': Row(name='model_number', address=0, size=2, default=300),
'firmware_version': Row(name='firmware_version', address=2, size=1, default=None),
'id': RWRow(name='id', address=3, size=1, default=1),
'baud_rate': RWRow(name='baud_rate', address=4, size=1, default=1),
'return_delay_time': RWRow(name='return_delay_time', address=5, size=1, default=250),
'cw_angle_limit': RWRow(name='cw_angle_limit', address=6, size=2, default=0),
'ccw_angle_limit': RWRow(name='ccw_angle_limit', address=8, size=2, default=1023),
'temperature_limit': RWRow(name='temperature_limit', address=11, size=1, default=70),
'min_voltage_limit': RWRow(name='min_voltage_limit', address=12, size=1, default=60),
'max_voltage_limit': RWRow(name='max_voltage_limit', address=13, size=1, default=140),
'max_torque': RWRow(name='max_torque', address=14, size=2, default=1023),
'status_return_level': RWRow(name='status_return_level', address=16, size=1, default=2),
'alarm_led': RWRow(name='alarm_led', address=17, size=1, default=36),
'shutdown': RWRow(name='shutdown', address=18, size=1, default=36)
}
RAM = {
'torque_enable': RWRow(name='torque_enable', address=24, size=1, default=0),
'led': RWRow(name='led', address=25, size=1, default=0),
'cw_compliance_margin': RWRow(name='cw_compliance_margin', address=26, size=1, default=4),
'ccw_compliance_margin': RWRow(name='ccw_compliance_margin', address=27, size=1, default=4),
'cw_compliance_slope': RWRow(name='cw_compliance_slope', address=28, size=1, default=64),
'ccw_compliance_slope': RWRow(name='ccw_compliance_slope', address=29, size=1, default=64),
'goal_position': RWRow(name='goal_position', address=30, size=2, default=None),
'moving_speed': RWRow(name='moving_speed', address=32, size=2, default=None),
'torque_limit': RWRow(name='torque_limit', address=34, size=2, default=None),
'present_position': Row(name='present_position', address=36, size=2, default=None),
'present_speed': Row(name='present_speed', address=38, size=2, default=None),
'present_load': Row(name='present_load', address=40, size=2, default=None),
'present_voltage': Row(name='present_voltage', address=42, size=1, default=None),
'present_temperature': Row(name='present_temperature', address=43, size=1, default=None),
'registered': Row(name='registered', address=44, size=1, default=0),
'moving': Row(name='moving', address=46, size=1, default=0),
'lock': RWRow(name='lock', address=47, size=1, default=0),
'punch': RWRow(name='punch', address=48, size=2, default=32)
}
PROTOCOL = Protocol1
def __init__(self, id):
super(AX_12W, self).__init__(
id=id, eeprom=self.EEPROM, ram=self.RAM, protocol=self.PROTOCOL)
def __init__(self, channel, id):
super(AX_12W, self).__init__(channel=channel, id=id)
from dynamixel.servo import Servo, Row, IndirectRow
import dynamixel.protocol
from dynamixel.servo import Servo
from dynamixel.servo import Row, RWRow, IndirectRow
from dynamixel.channel import Protocol1
class AX_18A(Servo):
EEPROM = [
Row(name='model_number', address=0, size=2, default=18),
Row(name='firmware_version', address=2, size=1, default=None),
Row(name='id', address=3, size=1, default=1),
Row(name='baud_rate', address=4, size=1, default=1),
Row(name='return_delay_time', address=5, size=1, default=250),
Row(name='cw_angle_limit', address=6, size=2, default=0),
Row(name='ccw_angle_limit', address=8, size=2, default=1023),
Row(name='temperature_limit', address=11, size=1, default=75),
Row(name='min_voltage_limit', address=12, size=1, default=60),
Row(name='max_voltage_limit', address=13, size=1, default=140),
Row(name='max_torque', address=14, size=2, default=983),
Row(name='status_return_level', address=16, size=1, default=2),
Row(name='alarm_led', address=17, size=1, default=36),
Row(name='shutdown', address=18, size=1, default=36)
]
RAM = [
Row(name='torque_enable', address=24, size=1, default=0),
Row(name='led', address=25, size=1, default=0),
Row(name='cw_compliance_margin', address=26, size=1, default=1),
Row(name='ccw_compliance_margin', address=27, size=1, default=1),
Row(name='cw_compliance_slope', address=28, size=1, default=32),
Row(name='ccw_compliance_slope', address=29, size=1, default=32),
Row(name='goal_position', address=30, size=2, default=None),
Row(name='moving_speed', address=32, size=2, default=None),
Row(name='torque_limit', address=34, size=2, default=None),
Row(name='present_position', address=36, size=2, default=None),
Row(name='present_speed', address=38, size=2, default=None),
Row(name='present_load', address=40, size=2, default=None),
Row(name='present_voltage', address=42, size=1, default=None),
Row(name='present_temperature', address=43, size=1, default=None),
Row(name='registered', address=44, size=1, default=0),
Row(name='moving', address=46, size=1, default=0),
Row(name='lock', address=47, size=1, default=0),
Row(name='punch', address=48, size=2, default=32)
]
PROTOCOL = dynamixel.protocol.Protocol1
EEPROM = {
'model_number': Row(name='model_number', address=0, size=2, default=18),
'firmware_version': Row(name='firmware_version', address=2, size=1, default=None),
'id': RWRow(name='id', address=3, size=1, default=1),
'baud_rate': RWRow(name='baud_rate', address=4, size=1, default=1),
'return_delay_time': RWRow(name='return_delay_time', address=5, size=1, default=250),
'cw_angle_limit': RWRow(name='cw_angle_limit', address=6, size=2, default=0),
'ccw_angle_limit': RWRow(name='ccw_angle_limit', address=8, size=2, default=1023),
'temperature_limit': RWRow(name='temperature_limit', address=11, size=1, default=75),
'min_voltage_limit': RWRow(name='min_voltage_limit', address=12, size=1, default=60),
'max_voltage_limit': RWRow(name='max_voltage_limit', address=13, size=1, default=140),
'max_torque': RWRow(name='max_torque', address=14, size=2, default=983),
'status_return_level': RWRow(name='status_return_level', address=16, size=1, default=2),
'alarm_led': RWRow(name='alarm_led', address=17, size=1, default=36),
'shutdown': RWRow(name='shutdown', address=18, size=1, default=36)
}
RAM = {
'torque_enable': RWRow(name='torque_enable', address=24, size=1, default=0),
'led': RWRow(name='led', address=25, size=1, default=0),
'cw_compliance_margin': RWRow(name='cw_compliance_margin', address=26, size=1, default=1),
'ccw_compliance_margin': RWRow(name='ccw_compliance_margin', address=27, size=1, default=1),
'cw_compliance_slope': RWRow(name='cw_compliance_slope', address=28, size=1, default=32),
'ccw_compliance_slope': RWRow(name='ccw_compliance_slope', address=29, size=1, default=32),
'goal_position': RWRow(name='goal_position', address=30, size=2, default=None),
'moving_speed': RWRow(name='moving_speed', address=32, size=2, default=None),
'torque_limit': RWRow(name='torque_limit', address=34, size=2, default=None),
'present_position': Row(name='present_position', address=36, size=2, default=None),
'present_speed': Row(name='present_speed', address=38, size=2, default=None),
'present_load': Row(name='present_load', address=40, size=2, default=None),
'present_voltage': Row(name='present_voltage', address=42, size=1, default=None),
'present_temperature': Row(name='present_temperature', address=43, size=1, default=None),
'registered': Row(name='registered', address=44, size=1, default=0),
'moving': Row(name='moving', address=46, size=1, default=0),
'lock': RWRow(name='lock', address=47, size=1, default=0),
'punch': RWRow(name='punch', address=48, size=2, default=32)
}
PROTOCOL = Protocol1
def __init__(self, id):
super(AX_18A, self).__init__(
id=id, eeprom=self.EEPROM, ram=self.RAM, protocol=self.PROTOCOL)
def __init__(self, channel, id):
super(AX_18A, self).__init__(channel=channel, id=id)
from dynamixel.servo import Servo
from dynamixel.servo import Row, RWRow, IndirectRow
from dynamixel.channel import Protocol2