Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 844

Writing a tf broadcaster for frame

$
0
0
hi . i want write a tf broadcaster for link_26 in my urdf . i wrote wrist_tf_broadcaster.py (like [this page](http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20(Python)) in nodes/wrist_tf_broadcaster.py and run launch and rqt and add /link_26/pose/x in rqt . but i have nothing in rqt #!/usr/bin/env python import roslib roslib.load_manifest('wrist') import rospy import tf import turtlesim.msg def handle_turtle_pose(msg, turtlename): br = tf.TransformBroadcaster() br.sendTransform((msg.x, msg.y, 0), tf.transformations.quaternion_from_euler(0, 0, msg.theta), rospy.Time.now(), turtlename, "base_link") if __name__ == '__main__': rospy.init_node('wrist_tf_broadcaster') turtlename = rospy.get_param('~wrist') rospy.Subscriber('/%s/pose' % turtlename, turtlesim.msg.Pose, handle_turtle_pose, turtlename) rospy.spin()

Viewing all articles
Browse latest Browse all 844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>