Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recording Tool pose with respect to robot's frame in a text file
I am successfully able to record joint angles of my robot's movement to a text file using the macro provided. But I would like to record the pose of my Tool with respect to my robot's reference frame. The script I used is attached 

str(robot.Joints().tolist()) is replaced by str(robot.Pose().tolist())

When I run the following script, I get the following output for the first and second time stamp as example

0.0, -0.719945730144482, -2.918800016718072e-16, -0.6940303636345666, 0.0

0.05308723449707031, -0.719945730144482, -2.918800016718072e-16, -0.6940303636345666, 0.0

This does not look correct, I should be getting a 4x4 matrix?

Secondly, I require the tool pose to be given with respect to the robot's base reference frame and in the format XYZABC. How do I modify the code to do this?

.txt   robotpose.txt (Size: 604 bytes / Downloads: 38)
A pose is a Mat object (Matrix) and you can print it as is to obtain the 4x4 matrix.

You can also convert it to Euler angles and use the XYZWPR instead.


# print the pose as a 4x4 matrix:

# print the pose as XYZWPR values:

Users browsing this thread:
1 Guest(s)