5 from geometry_msgs.msg
import Pose
8 rospy.init_node(
"test_torus")
9 p = rospy.Publisher(
"test_torus", TorusArray)
12 while not rospy.is_shutdown():
13 torus_array = TorusArray()
15 torus1.header.frame_id =
"base_link" 16 torus1.large_radius = 4
17 torus1.small_radius = 1
21 p1.orientation.x = math.sqrt(0.5)
22 p1.orientation.y = math.sqrt(0.5)
26 torus2.header.frame_id =
"base_link" 27 torus2.large_radius = 5
28 torus2.small_radius = 1
32 p2.orientation.z = math.sqrt(0.5)
33 p2.orientation.y = math.sqrt(0.5)
36 torus_array.header.frame_id =
"base_link" 38 torus_array.toruses.append(torus1)
39 torus_array.toruses.append(torus2)
41 p.publish(torus_array)