Last active
July 26, 2017 02:20
-
-
Save thomasweng15/f527b4465b78ecba53947cdf4dcc7381 to your computer and use it in GitHub Desktop.
Get transform through transformlistener
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
import tf | |
if __name__ == '__main__': | |
rospy.init_node("person_tf_broadcaster") | |
br = tf.TransformBroadcaster() | |
rate = rospy.Rate(10) | |
while not rospy.is_shutdown(): | |
origin = rospy.get_param("/person/origin") | |
quat = rospy.get_param("/person/quaternion") | |
br.sendTransform( | |
(origin['x'], origin['y'], origin['z']), | |
(quat['x'], quat['y'], quat['z'], quat['w']), | |
rospy.Time().now(), | |
"person", | |
"base_link") | |
rate.sleep() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment