point_test.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 
4 import roslib
5 roslib.load_manifest('tf')
6 import rospy, tf
7 from geometry_msgs.msg import PointStamped
8 from math import *
9 
10 pub = rospy.Publisher('point_test', PointStamped)
11 rospy.init_node('point_test')
12 r = rospy.Rate(10)
14 
15 count = 0;
16 while not rospy.is_shutdown():
17  t = count/10.0
18  br.sendTransform((3*sin(t/10),3*cos(t/10),sin(t/20)),
19  tf.transformations.quaternion_from_euler(0,0,0),
20  rospy.Time.now(),
21  "/map", "/point")
22  msg = PointStamped();
23  msg.header.frame_id = "/point"
24  msg.header.stamp = rospy.Time.now();
25  msg.point.x = 2*sin(t);
26  msg.point.y = 2*cos(t);
27  msg.point.z = 0;
28  print(msg)
29  pub.publish(msg);
30  r.sleep()
31  count += 1;
32 


jsk_rviz_plugins
Author(s): Kei Okada , Yohei Kakiuchi , Shohei Fujii , Ryohei Ueda
autogenerated on Thu Jun 1 2023 02:45:58