Motion Target without Z rotation

Hi there!

I am currently making the robot move to a specific point in the 3D world by creating a vcMotionTarget object with the position matrix of the component I want it to move to, and then running Controller.moveTo(MotionTarget).
I noticed that in some cases, this rotates A6 (the last axis) much more than I would want to. Is there a way to tell the controller to go to a position matrix with the TCP, but ignore the rotation of that matrix around its Z? I’m sure there is a better way to phrase the question, so I attached a video. There you can see the robot going to a position where the flange is pointing up. I would like the robot to go to that position, but with minimum rotation of A6.

forum_1 (1)

Thanks!

Hi,

I haven’t checked the exact specifics but in the software you can change the robot configuration. The object “vcMotionTarget” also has configuration mode where you can swap this around, perhaps this could solve the issue when you check different configurations?

br,
Lefa

1 Like

There’s no direct way to disable one DOF on the target matrix. Maybe the easiest way in this case would be to override motion target’s 6th joint value with current value. That recalculates matrix and should keep 6th axis stationary on that motion. Code snippet below should do the trick

jvs = MotionTarget.JointValues
jvs[5] = Controller.Joints[5].CurrentValue  # assuming robot is at previous position when this code is executed
MotionTarget.JointValues = jvs
Controller.moveTo(MotionTarget)

There are other ways to manipulate target matrices to reduce degree of freedoms for robot motions. This is done for example on some delta robot models on eCat. Deltas often have 3 or 4 DOFs and target matrix Z is forced to be vertical and X and Y are horizontal. You can do this sort of manipulation with vector cross product. Here’s a snippet from ABB IRB 360-1/1600 python kinematics:

# Force X and Y axes on root XY plane
# tool0_in_root is target matrix
VZ = vcVector.new(0, 0, 1)
N = tool0_in_root.N
N.Z = 0
N.normalize()
O = VZ ^ N
tool0_in_root.N = N
tool0_in_root.O = O
tool0_in_root.A = VZ
tool0_in_root.uniform()

At the start of snippet target matrix orientation is unrestricted. Its N (X) vector is projected to XY-plane (Z=0). It is normalized and then N and vertical vector VZ are used to build O (Y) vector with a cross product. By the nature of cross product this forces O to be on XY-plane as well. Finally vectors N, O and VZ are assigned to the matrix. uniform() call assures that matrix is orthonormal but it’s just a safety measure and in theory it should be unnecessary.

Here’s a visualization of the previous snippet’s target matrix orientation before and after the snippet:
image

-k

3 Likes