Hello, I need to move my robots TCP relative to a feature using URScript.
For example, I need to move the TCP 0.2 meters in the Z direction relative to the feature.
I have tried using example b here. It’s close to what I want but I need to move based on where the TCP currently is.
I have tried using the URScript here to get the current TCP relative to the feature but I cannot get it to work the way I need.
I should be able to figure it out if I can get the TCP pose relative to the feature but I haven’t been successful in getting that.
Thank you in advance for the help!
I have solved it, here is my solution:
/* Code */
PoseRelativeToFeature = pose_trans(pose_inv(FeaturePose), get_actual_tcp_pose())
MoveTCPRelativeToFeature = pose_add(PoseRelativeToFeature, p[0.1, 0, 0, 0, 0, 0]))
movel(pose_trans(FeaturePose, MoveTCPRelativeToFeature))
/* End code */
FeaturePose is the pose for the feature
p[0.1, 0, 0, 0, 0, 0] makes us move 10cm in the X direction of the feature
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.