Variable Waypoint computed with PoseTrans

PolyScope 5.21

I ran into a problem trying to compute a variable position using a transformation of -50mm Z offset (p[0,0,-0.05,0,0,0]). The robot stops at the MoveJ to the waypoint with an error indicating that it failed to compute the inverse kinematic solution for the pose. The new position is reachable since I can just jog the robot in -Z relative to TCP by 50mm. I’ve used the same variable position and posetrans() assignment statement in other parts of the program and it works fine.
The idea is to reduce the number of taught positions in a program.

Anyone seen this problem and found a solution?

Another gripe is why can’t I move to a variable position using the teach pendant to verify that it is reachable.

Feature requests:
Step through program line by line and watch variables.
pApproach=PoseTrans(pTarget, pOffsetZ50) //view new value of pApproach
MoveJ(pApproach)
PoseTranslate() function to translate a pose without any rotation.

What’s the exact syntax you’re trying for your transformation?

You can’t move to the variable position because it isn’t calculated until runtime. Really as far as the robot is concerned the variables don’t even EXIST until the program is run. It would be nice if it computed that stuff without running though.

Stepping through the program line by line is possible currently. Tap any line number to insert a breakpoint then use the second from the right Play button to step 1 line at a time:

pApproach=PoseTrans(pTarget, pOffsetZ50) //view new value of pApproach

Not sure what you’re asking for there. Unless you just want this visible BEFORE runtime, which again, the input parameters won’t necessarily have value until runtime so neither would the result. This is viewable when running the program

MoveJ(pApproach)

This is a variable move. Not sure what else to say about it other than it already exists lol

PoseTranslate() function to translate a pose without any rotation.

Here’s the function I have written for exactly this. I put it in my main URCAP so it’s always accessible. Otherwise just include a script file at the top of the job with this inside it.

def shiftRelativeToFeature(x_offset, y_offset, z_offset, feature, poseToShift):
  return pose_trans(feature, pose_add(pose_trans(pose_inv(feature), poseToShift), p[x_offset, y_offset, z_offset,0,0,0]))
end

Takes x,y,and z offsets in METERS and applies a shift along 'feature’s orientation to the ‘poseToShift’ that you pass it.