test_linemod_trainer.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import os.path as osp
4 import unittest
5 
6 import rospy
7 import rostest
8 
9 
10 class TestLINEMODTrainer(unittest.TestCase):
11 
13  linemod_path = osp.expanduser(rospy.get_param('~linemod_path'))
14  pcd_path = osp.expanduser(rospy.get_param('~pcd_path'))
15  yaml_path = osp.expanduser(rospy.get_param('~yaml_path'))
16  timeout = rospy.Duration(rospy.get_param('~timeout', 30.0))
17  rospy.sleep(2.0) # Wait a moment until /clock is published.
18  start = rospy.Time.now()
19  while (rospy.Time.now() - start < timeout and
20  (not osp.exists(linemod_path) or
21  not osp.exists(pcd_path) or
22  not osp.exists(yaml_path))):
23  rospy.sleep(1.0)
24  self.assertTrue(osp.isfile(linemod_path))
25  self.assertTrue(osp.isfile(pcd_path))
26  self.assertTrue(osp.isfile(yaml_path))
27 
28 
29 if __name__ == '__main__':
30  rospy.init_node('test_linemod_trainer')
31  rostest.rosrun(
32  'jsk_pcl_ros', 'test_linemod_trainer', TestLINEMODTrainer)


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:47