Log position of robot
frebo449
✭
Hello!
I have a question about how to log the position of an IRB 1400 robot. We are two students who are using this robot to simulate a helicopter and collecting data to estimate the pose using camera and IMU in our master theisis project. To evaluate how good our estimates are we have to know our "true" position which is the robot. How can we do this? Can you do it without RobotStudio or do you have to use it? Maybe you can just log down the position to a file on a USB? Can you get information of at wich time the data was collected?
/Mvh Fredrik
I have a question about how to log the position of an IRB 1400 robot. We are two students who are using this robot to simulate a helicopter and collecting data to estimate the pose using camera and IMU in our master theisis project. To evaluate how good our estimates are we have to know our "true" position which is the robot. How can we do this? Can you do it without RobotStudio or do you have to use it? Maybe you can just log down the position to a file on a USB? Can you get information of at wich time the data was collected?
/Mvh Fredrik
0
Comments
-
Hello,
Yes, this could of course be done.You could write from a background task that periodically logs the position of the robot, and writes the positions to a file. Check the CRobT function. You don't have to use RobotStudio.
You can get accurate time measurement by using the clock functions in RAPID, e.g. ClkRead.
Good luck!BR frpa0 -
HiI use this code to get robot position but my robot can stop measurement place so I dont use backround task:VAR iodev iodev1;PROC CurrentPosition()
Open usbdisk1File:="Measurements.DOC", iodev1Append;
Write iodev1, "";
Write iodev1, "Current position"Pos:=CPos()NoNewLine;
Write iodev1, " "NoNewLine;
Write iodev1, CTime()NoNewLine;
Write iodev1, " "NoNewLine;
Write iodev1, CDate();
ENDPROC
BR
Petri0 -
Hello
Thank you very much for your help. We have succeeded to write down position to a file in a USB stick. We solved it by using the functions that frpa recomended and use multitasking to log data while the robot operates. The next problem is get the orientation of the robot and not only the position. "CRobT" saves the pos as a robtarget datatype which consists of two parts, both pos (x,y,z) and orient (q1 q2 q3 q4) but function "Write" can not write this datatype. We used "CRob" instead because it is of datatype pos which "Write" can handle. Maybe you can force robtarget to become another datatype or divide it into pos and orient?
/Fredrik
0 -
Hello,
Please see this example code on how to get the individual values (this actually prints on the TPU, but of course you can write to a file).CONST robtarget p10:=[[1270.00,0.00,1570.00],[0.707107,0,0.707107,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PROC Routine1()
TPWrite NumToStr(p10.trans.x,3);
TPWrite NumToStr(p10.trans.y,3);
TPWrite NumToStr(p10.trans.z,3);
TPWrite NumToStr(p10.rot.q1,3);
TPWrite NumToStr(p10.rot.q2,3);
TPWrite NumToStr(p10.rot.q3,3);
TPWrite NumToStr(p10.rot.q4,3);
ENDPROCBR frpafrpa2010-01-29 16:29:200
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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings