Problem with Robot Controller GoalPosition

Hi,
I’m new to this forum and to Ax12a’s. I have a strange bug. I’m using the robot controller with a config for the first time, and I can get the motors to display their names and positions, but when I call the m.goal_position function, the program simply does not turn the motors. There’s no error, but the servos just don’t move. Why could that be?

Also, what exactly does “sync_read” and “orientation”: direct/indirect mean? And I’m guessing “offset” means the servos go to that position when the program starts?

Thanks so much in advance,
Will

Code:

my_config = {
‘controllers’: {
‘my_dxl_controller’: {
‘sync_read’: False,
‘attached_motors’: [‘leg1’],
‘port’: ‘/dev/ttyACM0’
}
},
‘motorgroups’: {
‘leg1’: [‘knee1’],
},
‘motors’: {
‘knee1’: {
‘orientation’: ‘indirect’,
‘type’: ‘AX-12’,
‘id’: 1,
‘angle_limit’: [-90.0, 90.0],
‘offset’: 0.0
}
}
}

import pypot.robot
robot = pypot.robot.from_config(my_config)

for m in robot.motors:
print(m.name, m.id, m.present_position)

   # I tried alternatives like m.goal_position = -50 and nothing would move the servo
   m.goal_position = m.present_position + 20  

time.sleep(3)

robot.close()

See https://github.com/poppy-project/pypot/issues/228

1 Like