get_pose() function problem
Closed this issue · 3 comments
I have a problem about get_pose() . Does anyone know how to use the value I get from this function. I
will get Tra: , Rot: , Qtn: The type of this function is core.rigidtransform....... , so I can't use the value I get for doing some calculate. Hope someone can help me to solve this problem. Thanks a lot!!
Can you provide any more details about your problem? What are you trying to do?
Here is an API reference for autolab_core.RigidTransform. You can get the translation and rotation specifying the 6 degrees of freedom for the state of a rigid body in 3D. For example:
pose = RigidTransform(from_frame='gripper', to_frame='base')
pose.translation # numpy 3-vector for the gripper center with respect to the robot base
pose.quaternion # numpy 4-vector for the gripper orientation with respect to the robot base specified as a WXYZ quaternion
pose.rotation # numpy 3x3 orthonormal matrix with determinant 1 that specifies the gripper orientation with respect to the robot base
If I use get_pose() function , I can get the value from the picture show
I am trying the use the value about Tra , Rot , Qtn , but I have no idea how to save the value in a variable .This is my problem.
BTW ,for some reason I didn't install ROS. I'm not sure if it's possible to use complete function without install ROS.
Per Jeff's response above, you can do:
pose = yumi.left.get_pose()
tra = pose.translation
rot = pose.rotation
qtn = pose.quaternion
YuMiPy can operate w/o ROS, so that's fine.