test_pointcloud_to_pcd.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import unittest
4 import rospy
5 import roslib.packages
6 import glob
7 import time
8 
10  def __init__(self):
11  self.test_data_path = roslib.packages.get_pkg_dir('jsk_pcl_ros_utils') + '/test_data/sample_pcd_*.pcd'
12  self.time_limit = 360
13 
14  def check_pcd_generate(self):
15  cnt = 0
16  while cnt <= self.time_limit:
17  pcd_files = glob.glob(self.test_data_path)
18  if pcd_files:
19  return True
20  cnt += 1
21  time.sleep(1.0)
22  return False
23 
24 class TestPointCloudToPCD(unittest.TestCase):
26  pcd = PointCloudToPCD()
27  self.assertTrue(pcd.check_pcd_generate())
28 
29 if __name__ == "__main__":
30  import rostest
31  rospy.init_node("pointcloud_to_pcd_test_py")
32  rostest.rosrun("jsk_pcl_ros_utils", "test_pointcloud_to_pcd", TestPointCloudToPCD)


jsk_pcl_ros_utils
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:15