Home movement of robots
VictorAx
✭
Hello, we're working on a big project where we want our robots to be able to get to their home position in a safe way.
The robots have about three movement procedures each, and a few of them are very long.
In another project I used TrigX to assign numbers to my positions, which worked fine but resulted in a very long reference procedure.
I've also looked into PathRecMoveBwd, but the usage of this may result in collisions where we fetch material from feeders.
How do the rest of you programmers solve problems like this?
0
Comments
-
When possible, I use world zones (and tool I/O when relevant) to choose a different way home based on the current position of the robot.
In complicated or unpredictable situations, I've had to make a human jog into a safe-to-home position before enabling the home button.
0 -
soup said:When possible, I use world zones (and tool I/O when relevant) to choose a different way home based on the current position of the robot.
In complicated or unpredictable situations, I've had to make a human jog into a safe-to-home position before enabling the home button.
1 -
Hello,If your positions are not so close, you can check if current is near each of them.0
-
Hello,the RobotWare Option "Machine Tending" provides a solution for the Homerun by using special move instructions and the use of a homerun strategy, so that the robot drop a part, before it moves to its home position.See page 112 in the manual:BRMicky
0 -
I will share some code I wrote a little while back, you can maybe use it in your recovery strategy.MODULE UtilityVAR string stRobt:=stEmpty;VAR string stClosestPoint;CONST num nMaxRecoverDist:=2000;PERS tooldata tCheck;PERS string stToolName;TASK PERS wobjdata wobjCheck:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];PERS string stWobjName:="wobj0";PROC FindNearestPoint()VAR robtarget pCurrentPosition;VAR num n12Distance:=10000;VAR robtarget checkrobt;VAR datapos block;GetSysData tCheck\ObjectName:=stToolName;GetSysData wobjCheck\ObjectName:=stWobjName;pCurrentPosition:=CRobT(\Tool:=tCheck\WObj:=wobjCheck);SetDataSearch "robtarget"\InMod:="R1_Data";WHILE GetNextSym(stRobt,block\Recursive) DOGetDataVal stRobt\TaskName:="T_ROB1", checkrobt;! Compare current robot position with stored robtarget! If it is less than maximum recovery distance store the name! and distance from current position.IF (Distance(checkrobt.trans,pCurrentPosition.trans) < nMaxRecoverDist) THEN! Check to see if point is within Maximum recovery! but maybe farther than last compared point.! Should update n12Distance if closer point is found.IF Distance(checkrobt.trans,pCurrentPosition.trans) < n12Distance THENn12Distance:=Distance(checkrobt.trans,pCurrentPosition.trans);stClosestPoint:=stRobt;ELSE! Do nothing, point is farther from last found point! within max recover distance nMaxRecoverDist.ENDIFENDIFENDWHILEIF n12Distance >= nMaxRecoverDist THENTPWrite "Nearest taught point is Not Found!!! Caution!!!";TPWrite "Not close enough to a known taught point!!!";TPWrite "Active tool used to check was " + stToolName;TPWrite "Active work object used to check was " + stWobjName;ELSETPWrite "Nearest taught point is: " + stClosestPoint;TPWrite "Distance from current position is: "\Num:=n12Distance;TPWrite "Active tool used to check was " + stToolName;TPWrite "Active work object used to check was " + stWobjName;ENDIFENDPROCENDMODULELee Justice1
-
You can mix @lemster68 solution with that:
FUNC bool IsRobotNear(robtarget pToCheck\PERS tooldata tTool\PERS wobjdata wObj\num nTrans\num nRot)<br> VAR robtarget p_Current;<br> VAR pos pos_Gap;<br> VAR num n_Trans:=10;<br> VAR num n_Rot:=0.1;<br> VAR bool b_Near:=False;<br> VAR orient or_Res;<br> VAR pose pose_Inv:=[[0,0,0],[1,0,0,0]];<br><br> IF Present(nTrans) n_Trans:=nTrans;<br> IF Present(nRot) n_Rot:=nRot;<br> !<br> p_Current:=CRobT(\Tool?tTool\WObj?wObj);<br> b_Near:=(Distance(p_Current.trans,pToCheck.trans) < n_Trans);<br> !<br> pose_Inv.rot:=pToCheck.rot;<br> pose_Inv:=PoseInv(pose_Inv);<br> or_Res:=pose_Inv.rot * p_Current.rot;<br> !<br> b_Near:=b_Near AND Abs(EulerZYX(\X,or_Res))<n_Rot<br> AND Abs(EulerZYX(\Y,or_Res))<n_Rot<br> AND Abs(EulerZYX(\Z,or_Res))<n_Rot;<br> RETURN b_Near;<br> ENDFUNC
0 -
lemster68 said:I will share some code I wrote a little while back, you can maybe use it in your recovery strategy.This!MODULE Utility
VAR string stRobt:=stEmpty;
VAR string stClosestPoint;
CONST num nMaxRecoverDist:=50;
PERS tooldata tCheck;
PERS string stToolName;
PERS wobjdata wobjCheck:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
VAR string stWobjName;
FUNC robtarget FindNearestPoint(string actMod)
VAR robtarget pCurrentPosition;
VAR num n12Distance:=10000;
VAR robtarget checkrobt;
VAR datapos block;
VAR robtarget RetPos;
GetSysData tCheck\ObjectName:=stToolName;
GetSysData wobjCheck\ObjectName:=stWobjName;
pCurrentPosition:=CRobT(\Tool:=tCheck\WObj:=wobjCheck);
SetDataSearch "robtarget"\InMod:=actMod;
WHILE GetNextSym(stRobt,block\Recursive) DO
GetDataVal stRobt\TaskName:="T_ROB1", checkrobt;
! Compare current robot position with stored robtarget
! If it is less than maximum recovery distance store the name
! and distance from current position.
IF (Distance(checkrobt.trans,pCurrentPosition.trans) < nMaxRecoverDist) THEN
! Check to see if point is within Maximum recovery
! but maybe farther than last compared point.
! Should update n12Distance if closer point is found.
IF Distance(checkrobt.trans,pCurrentPosition.trans) < n12Distance THEN
n12Distance:=Distance(checkrobt.trans,pCurrentPosition.trans);
stClosestPoint:=stRobt;
RetPos:=checkrobt;
ELSE
! Do nothing, point is farther from last found point
! within max recover distance nMaxRecoverDist.
ENDIF
ENDIF
ENDWHILE
RETURN RetPos;
ENDFUNC
ENDMODULECombined with thisMoveJ FindNearestPoint(lastmod),vmax,fine,tCheck\WObj:=wobjCheck;Where lastmod is a string I assign the name of in the corresponding module.Thanks!!
0 -
In one of my current projects I am using world zones. The robot will be operating in four different areas. I have given each area a “Home” position and its own world zone. I have set the world zone up so it is just a small distance from fixtures. If the robot needs to home from outside the world zone and possibly too close to a fixture, I am directing the user to jog the robot into the world zone. When the robot is in the world zone I will then get it to MOVEL in one axis away from the fixture and until the world zone digital output turns off. From here I should then be in a position that I can move to the areas home position. I have chosen area home positions that the robot can easily move between. I have not fully tested this method as of yet just putting it up here as a suggested homing method and open for improvements..0
-
Cool, glad to help. But vmax in a recovery is quite confident, to say the least.Lee Justice1
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 783 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings