Program displacement
Rookie
✭✭
Hi All,
I have a problem making a program displacement. Let me try to explain:
I have a robtarget with a rot of [0,-1,0,0]. On a main computer a displacement is made of -90 degrees on Y-ax this position. with a posemult this rot is changed. So far so good; if a make the displacement -80 everything goes well; when the displacemend <-83 it all goes wrong. The robot goes to a different position.
Here is a part of the code:
! - Get XYZ translations opposite to the current position
Xpp:=pPositions{OffsetPosition}.trans.x;
Ypp:=pPositions{OffsetPosition}.trans.y;
Zpp:=pPositions{OffsetPosition}.trans.z;
! - Get the wanted rotation opposite to the current rotation
Point.rot:=pPositions{OffsetPosition}.rot;
! - Get the current rotation of the used robtarget
BasePos.rot:=ORIENTZYX(EulerZYX(,basePosition.rot),EulerZYX(Y,basePosition.rot),EulerZYX(X,basePosition.rot));
! -Calculate the final rotation
FinalPos:=PoseMult(BasePos,Point);
! - Build the final robtarget
Position:=Offs(basePosition,Xpp,Ypp,Zpp);
Position.rot:=FinalPos.rot;
Please let me know your thoughts
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings