7 rospy.init_node(
"attention_pose_set")
8 pub = rospy.Publisher(
"/attention_clipper/input/box_array", BoundingBoxArray)
11 while not rospy.is_shutdown():
12 boxes = BoundingBoxArray()
13 theta = math.fmod(theta + 0.1, math.pi * 2)
15 box.header.stamp = rospy.Time.now()
16 box.header.frame_id =
"camera_link" 17 box.pose.orientation.w = 1
18 box.pose.position.x = 0.8 * math.cos(theta)
19 box.pose.position.y = 0.8 * math.sin(theta)
20 box.pose.position.z = 0.1
21 box.dimensions.x = 0.1
22 box.dimensions.y = 0.1
23 box.dimensions.z = 0.1
25 box2.header.stamp = rospy.Time.now()
26 box2.header.frame_id =
"camera_link" 27 box2.pose.orientation.w = 1
28 box2.pose.position.x = 0.8 * math.cos(theta)
29 box2.pose.position.y = 0.8 * math.sin(theta)
30 box2.pose.position.z = -0.1
31 box2.dimensions.x = 0.1
32 box2.dimensions.y = 0.1
33 box2.dimensions.z = 0.1
34 boxes.boxes = [box, box2]
35 boxes.header.frame_id =
"camera_link" 36 boxes.header.stamp = rospy.Time.now()