Last active
June 24, 2017 00:58
-
-
Save kor01/16f0cb70f4a7a7cf7cfde5c6d8a9c6b6 to your computer and use it in GitHub Desktop.
[tf_add_frame] add a new frame #tf #ros
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 roslib | |
roslib.load_manifest('learning_tf') | |
import rospy | |
import tf | |
if __name__ == '__main__': | |
rospy.init_node('my_tf_broadcaster') | |
br = tf.TransformBroadcaster() | |
rate = rospy.Rate(10.0) | |
while not rospy.is_shutdown(): | |
t = rospy.Time.now().to_sec() * math.pi | |
br.sendTransform((2.0 * math.sin(t), 2.0 * math.cos(t), 0.0), | |
(0.0, 0.0, 0.0, 1.0), | |
rospy.Time.now(), | |
"carrot1", | |
"turtle1") | |
rate.sleep() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment