Home› Programming
Discussion
Back to discussions page
jensss
Posts: 23 Apprentice
script code that corrects its own position |
42 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
1 comment |

in Programming
Dear
For my thesis I should be able to do the following. no idea if this is possible.
Our robot is soldering components. The person should indicate the different points. If the points are indicated manually, not every point is set at the same height. That is why it is not the same distance to go from the point above the component to the point where soldering is required. this makes it difficult to pre-program this. all the places where soldering is required are at the same height.
For this I would like to make a piece of script code that calculates the height itself. the person indicates point 1, 2, 3. these 3 different points are stored. the cobot corrects the 3 points itself so that it stops at the same height at every place. this way every point is the same distance from the component.
hopefully it's clear what I mean
thank you in advance
Best Answer
-
matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
All you need to do is have a static Z coordinate that you want to use, then substitute that into the waypoint.var defaultZ = 0.005 //5 mm up in the base coordinate system var waypoint1_var = waypoint_1 //must assign static waypoints to a variable first, if you are already using variable waypoints skip, the name here would be the name of static pose you want to use var waypoint2_var = waypoint_2 var waypoint3_var = waypoint_3 waypoint1_var[2] = defaultZ waypoint2_var[2] = defaultZ waypoint3_var[2] = defaultZ //now use the variable waypoints in your move commands