7 from std_srvs.srv
import Empty
9 from jsk_recognition_msgs.msg
import BoundingBox
10 from jsk_recognition_msgs.srv
import SaveMesh
11 from jsk_recognition_msgs.srv
import SaveMeshResponse
17 self.
pub = rospy.Publisher(
'~bbox_output', BoundingBox, queue_size=1)
19 rospy.Timer(rospy.Duration(0.1), self.
_cb)
22 self.
box = BoundingBox()
23 self.box.header.stamp = event.current_real
24 self.box.header.frame_id =
'dummy_frame' 25 self.box.pose.position.x = 1.0
26 self.box.pose.position.y = 2.0
27 self.box.pose.position.z = 3.0
28 self.box.pose.orientation.x = 4.0
29 self.box.pose.orientation.y = 5.0
30 self.box.pose.orientation.z = 6.0
31 self.box.pose.orientation.w = 7.0
32 self.box.dimensions.x = 8.0
33 self.box.dimensions.y = 9.0
34 self.box.dimensions.z = 10.0
37 self.pub.publish(self.
box)
43 rospy.Timer(rospy.Duration(1.0), self.
_cb)
46 rospy.wait_for_service(
'~request')
47 req_caller = rospy.ServiceProxy(
'~request', Empty)
48 self.
res = req_caller()
64 assert rospy.get_param(
'~ground_frame_id') == req.ground_frame_id
67 assert self.bbox_publisher.box == req.box
70 return SaveMeshResponse(
True)
73 if __name__ ==
'__main__':
74 rospy.init_node(
'test_save_mesh_server')
76 'jsk_recognition_msgs',
'test_save_mesh_server', TestSaveMeshServer)
def test_save_mesh_server(self)