I would like to make a move relative to a waypoint. The offsets will be setup as variables. The idea is to call a moveL command referencing the waypoint then adding the offset to that waypoint.
Waypoint_1 is set and calibrated
Variable: Offset_1 = [10,50,0,0,0,0]
MoveL Relative to Waypoint_1 with Offset_1
I don’t believe there is a way of doing this in polyscope commands, you would have to use URScript.
Use the script file from you program which contains Waypoint_1, to find it’s coordinates, then write something like:
There are a couple of ways of finding the script file of a program.if you are using URSim, then simply open the .script file from the robot’s programs folder in a text editor.
If you’re on a real robot, then open a blank program, add a “Script Code” command, press “Edit” then “Open” and you’ll see the script files of all your programs.
Thanks, but this only seems to work in the base co-ordinate system, its not offsetting in the plane the waypoint is thought in. So If I have a waypoint thought in a feature plane and I want to offset 10mm in the x direction of that plane, Im struggling.
Its super easy with other robots. I know I’m missing something obvious.
Ok I think I understand my issue, but would like to run it by anyone with prior experience.
I was training all my waypoints at the top of the program in an “If” clause that would never run. I would train each point in a MoveJ in the Feature plane they were related to, then link these throughout the program and use a Move in the plane they were trained in.
This seems to be the route cause of my issue. I need to have the waypoint I want to offset trained in the Base Feature. I then need to pose_trans my offsets w.r.t the frame and add these to the Base trained waypoint, then do a moveJ in the base frame.
I was trying to do all my moves in the relative feature plane the point was trained in. This had some wild results. Doing it all in base seems to work.
My only issue is it duplicates a point trained in a custom feature plane, this is done for calibration purposes, so all points in a feature plane can be adjusted based on a 3 point calibration.
One work around would be that you could find the offset in reference to the feature pose, subtract that found pose data from the feature pose, and then add the difference (the newly found offset) to the pose you are originally wanting to offset.
@dan.oconnor did you ever get this to work? I’m having this problem as well and its extremely frustrating because other robots make this so simple. Can you share any code?
So here you pass in an x, y, and z offset, then pass it which Feature you want to use as the direction, then finally pass the pose you are shifting. In the original use case, they would have supplied 10 for x, 50 for y, and 0 for z. Then a Feature (could be Base, could be Plane_1, etc) and finally they would have passed “Waypoint_1_p”. This function returns this result as a Pose allowing you to MoveL to the result. Just remember it’s all in METERS, so the original post with values of 10 and 50 are unreasonable.
@eric.feldmann hit the nail on the head, thats essentially what I ended up doing with a Plane. It would be so easy to add a quick feature to the GUI to do this. Other robots have either a simple command or a GUI feature, UR makes this nessesity a struggle.