Closed asantanna-applied closed 2 years ago
Thank you, _sync will synchronize the reported position to the recorded value sent last time, but if the last motion command is non-blocking, then you want to perform relative motion at this time (or you did not specify all joint values (or X/y/ z/roll/pitch/yaw value)) will be problematic. The value of last_used_angles will be updated synchronously when the robot arm is in a normal state when it is reported for the first time
This occurred after several commands in normal state. I think it was the first joint command though. What should I do to make sure values are correct before issuing the joint command? Doing a relative command of all zeros forces resync?
I was having a problem with set_servo_angle() where it looked like the robot was just doing something random. I tracked down the problem to last_used_angles being uninitialized. I fixed my SDK with a call to _sync() as seen below. I probably should have forked the repo and all that but this was so tiny a change I figured it wasn't worth it ... sorry ... :-)
xarm/x3/xarm.py (line 312)