Comparing current joint positions to a joint target using "ReadMotor"
Hi,
in order to validate safe move we want to compare the robots current joint values against the joint target its trying to get to. Im currently reading each joint value using ReadMotor but not sure how to convert the radians to the degrees shown in the joint values. I though it would have been a simple conversion process but the number do not tie up.
Code being used;
This gets the radians of each motor.
in order to validate safe move we want to compare the robots current joint values against the joint target its trying to get to. Im currently reading each joint value using ReadMotor but not sure how to convert the radians to the degrees shown in the joint values. I though it would have been a simple conversion process but the number do not tie up.
Code being used;
This gets the radians of each motor.
PROC ReadMechUnit()
FOR i FROM 1 TO 6 DO
nMotorAngles{i}:=ReadMotor(\MecUnit:=ROB_1,i);
ENDFOR
ENDPROC
i convert the robtarget to jointarget here.
jAllMotorAngles:=CalcJointT(pSaveMoveValid1,tool0\WObj:=wobj0);
I now want to compare the values in nMotorAngles with the values in jAllMotorAngles check check if they're the same or not.
i convert the robtarget to jointarget here.
jAllMotorAngles:=CalcJointT(pSaveMoveValid1,tool0\WObj:=wobj0);
I now want to compare the values in nMotorAngles with the values in jAllMotorAngles check check if they're the same or not.
0
Comments
-
You don't want to read the motor angles, they don't necessarily equal the joint angles. Use the function CJointT().Lee Justice0
Categories
- All Categories
- 5.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings