xArm-Python-SDK icon indicating copy to clipboard operation
xArm-Python-SDK copied to clipboard

XArm not updating joints when being pushed by external forces

Open alonks1234 opened this issue 1 year ago • 4 comments

Hi, when I boot up an xarm and physically push around the robot with my hand, I can move the robot's joints slightly but I do not see the joint positions update to reflect this.

from xarm import XArmAPI

xarm = XArmAPI("192.168.250.232")
xarm.motion_enable(enable=True)
xarm.set_mode(0)
xarm.set_state(state=0)

while True:
    # Push around the robot by hand
    print(xarm.get_servo_angle())  # These are all the same

I can see that the xarm.get_joints_torque() does show the live forces, but I can't get the updated joint angles.

alonks1234 avatar May 05 '23 14:05 alonks1234

@alonks1234 Try specifying the is_real parameter as True get_servo_angle(is_real=True)

vimior avatar May 08 '23 09:05 vimior

Hi @vimior this is not a valid keyword? TypeError: XArmAPI.get_servo_angle() got an unexpected keyword argument 'is_real'

alonks1234 avatar May 11 '23 13:05 alonks1234

@alonks1234 , I've tested on my side and it works fine, I could really see the updated values of the joints arm.get_servo_angle(is_real=True)[1][0:6]

What is your SDK version and firmware versions? I have SDK v1.11.6 and firmware v2.0.

tborgesd avatar May 11 '23 14:05 tborgesd

@alonks1234 Yes, this parameter requires 1.10.0 and above to support. Please upgrade firmware and SDK

vimior avatar May 12 '23 01:05 vimior