Update
This commit is contained in:
parent
e9fbdffa78
commit
d9698bd4e4
@ -11,12 +11,11 @@ if __name__ == '__main__':
|
|||||||
while not rospy.is_shutdown():
|
while not rospy.is_shutdown():
|
||||||
try:
|
try:
|
||||||
(trans,rot) = listener.lookupTransform('left_gripper', 'base', rospy.Time(0))
|
(trans,rot) = listener.lookupTransform('left_gripper', 'base', rospy.Time(0))
|
||||||
print((trans, rot))
|
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
|
||||||
# except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
|
continue
|
||||||
except: continue
|
|
||||||
|
|
||||||
Translation = [trans.x , trans.y , trans.z]
|
Translation = [trans[0] , trans[1] , trans[2]]
|
||||||
Quaternion = [rot.x , rot.y , rot.z, rot.w]
|
Quaternion = [rot[0] , rot[1] , rot[2], rot[3]]
|
||||||
Angles = tf.transformations.euler_from_quaternion([rot.x , rot.y ,
|
Angles = tf.transformations.euler_from_quaternion([rot.x , rot.y ,
|
||||||
rot.z, rot.w])
|
rot.z, rot.w])
|
||||||
print("Translation: ", Translation)
|
print("Translation: ", Translation)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user