Home e-Manual

Quadruped Robot

I have 12-XL43, 4-2XL430 and U2D2 which is connected to Pi4.currently i am building a quadruped robot using python language.
The issue I am facing is

  1. I need to use position control in degree unit but in example code it is given in encoder value.
    2.and also for few motor i need it in velocity mode and for that i am not able to understand the control table.

You can easily convert between the encoder value and degree using the constant below.

degree = 0.08789 * encoder value

For example, 180(°) / 0.08789 = 2048.01456 = (int) 2048

Each DYNAMIXEL model has its own Operating Mode, and XL430-W250 has 4 different modes.

The address of Operating Mode data is 11 and it use 1byte data as below.
image
So writing 1 to Address 11 while Torque is turned off(but the power is on) will set your DYNAMIXEL to Velocity Control mode.

For example,

dxl_comm_result, dxl_error = packetHandler.write1ByteTxRx(portHandler, DXL_ID, 11, 1)
if dxl_comm_result != COMM_SUCCESS:
    print("%s" % packetHandler.getTxRxResult(dxl_comm_result))
elif dxl_error != 0:
    print("%s" % packetHandler.getRxPacketError(dxl_error))
else:
    print("DYNAMIXEL has been successfully set to Velocity Mode")
1 Like

@Thelegend47 - You may want to check out this video also to see the different ways to set Position Control for the XL-430 actuators. The demos were in TASK codes, but the concepts illustrated may still be useful for your project.

Thank you, I have tried that and it is working.
and one last question, how do you ping load acting on motor joint.

Thank you.it is working