36 __author__ =
'Antons Rebguns' 37 __copyright__ =
'Copyright (c) 2010-2011 Antons Rebguns' 40 __maintainer__ =
'Antons Rebguns' 41 __email__ =
'anton@email.arizona.edu' 50 from dynamixel_controllers.srv
import SetSpeed
51 from dynamixel_controllers.srv
import TorqueEnable
52 from dynamixel_controllers.srv
import SetComplianceSlope
53 from dynamixel_controllers.srv
import SetComplianceMargin
54 from dynamixel_controllers.srv
import SetCompliancePunch
55 from dynamixel_controllers.srv
import SetTorqueLimit
57 from std_msgs.msg
import Float64
58 from dynamixel_msgs.msg
import MotorStateList
59 from dynamixel_msgs.msg
import JointState
62 def __init__(self, dxl_io, controller_namespace, port_namespace):
104 raise NotImplementedError
114 self.joint_state_pub.unregister()
115 self.motor_states_sub.unregister()
116 self.command_sub.unregister()
117 self.speed_service.shutdown(
'normal shutdown')
118 self.torque_service.shutdown(
'normal shutdown')
119 self.compliance_slope_service.shutdown(
'normal shutdown')
122 raise NotImplementedError
125 raise NotImplementedError
128 raise NotImplementedError
131 raise NotImplementedError
134 raise NotImplementedError
137 raise NotImplementedError
164 raise NotImplementedError
167 raise NotImplementedError
169 def rad_to_raw(self, angle, initial_position_raw, flipped, encoder_ticks_per_radian):
170 """ angle is in radians """ 172 angle_raw = angle * encoder_ticks_per_radian
174 return int(round(initial_position_raw - angle_raw
if flipped
else initial_position_raw + angle_raw))
176 def raw_to_rad(self, raw, initial_position_raw, flipped, radians_per_encoder_tick):
177 return (initial_position_raw - raw
if flipped
else raw - initial_position_raw) * radians_per_encoder_tick
def raw_to_rad(self, raw, initial_position_raw, flipped, radians_per_encoder_tick)
def process_set_compliance_punch(self, req)
def set_compliance_slope(self, slope)
def process_set_compliance_margin(self, req)
def set_torque_enable(self, torque_enable)
def process_set_torque_limit(self, req)
def process_set_speed(self, req)
def process_command(self, msg)
def process_torque_enable(self, req)
def set_compliance_margin(self, margin)
def process_motor_states(self, state_list)
def process_set_compliance_slope(self, req)
def __init__(self, dxl_io, controller_namespace, port_namespace)
def __ensure_limits(self)
def set_speed(self, speed)
def rad_to_raw(self, angle, initial_position_raw, flipped, encoder_ticks_per_radian)
def set_compliance_punch(self, punch)
def set_torque_limit(self, max_torque)
compliance_marigin_service