Hello,
I have a project where the xarm5 follows a position (3d vector coming from other applications via OSC) in absolute coordinate space in realtime using arm.set_mode(7). This works very well for movements where roll/pitch/yaw are staying at the default value:
# postion pos being an array with the vector coordinates
arm.set_position(x=pos[0], y=pos[1], z=pos[2], roll=-180,
pitch=0, yaw=0, speed=speed, wait=False)
Now I want to add a rotation to the toolhead. However, working with roll/pitch/yaw in absolute space gets me in trouble pretty fast. Can I break up the movement into an absolute positional move and a relative rotation like so:
# postion pos being an array with the vector coordinates
arm.set_position(x=pos[0], y=pos[1], z=pos[2], speed=speed, wait=False)
# postion rpy being an array with the rpy values
arm.set_position(roll=rpy[0], pitch=rpy[1], yaw=rpy[2], speed=speed, relative=True, wait=False)
Am I missing something? Unfortunately I don’t have a working xarm in front of me right now. I thought I’d need more advanced inverse kinematics to do that but then I saw this VR Controlled Robotic Arm - xArm7 and it seems to be possible to do everything I need with what the API offers.
Basically the functionality of what’s shown in the video is what I’m after.
Due to the robot configuration, for xArm5, the actual flexible degrees of freedom of linear and circular motions in Cartesian space is 4, which means you need to make sure the end flange is level during TCP movement with xArm5.
Hi Minna, thanks for the reply. We have multiple xArm5, so I need to find a solution that works with what we have. Could you point me in the right direction regarding the joint motion?
If I want to do set_servo_angle I need to use get_inverse_kinematics to translate my pose into servo angles, right?
But then I have the same problem I had before: I need to pass the full pose into inverse kinematics: position and rpy. Isn’t it possible with the API to say: keep the toolhead position but change the pitch value and the api figures out the motion planning?
Thanks Minna,
ok, I understand some of it. But in your first post you suggested I can try to use joint motion instead. Do you mean without tracking the exact position? Like in the API examples?