Main Page
Namespaces
Classes
Files
File List
File Members
test
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
9
class
PointCloudToPCD
():
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):
25
def
test_point_clout_to_pcd
(self):
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)
test_pointcloud_to_pcd.PointCloudToPCD.__init__
def __init__(self)
Definition:
test_pointcloud_to_pcd.py:10
test_pointcloud_to_pcd.PointCloudToPCD
Definition:
test_pointcloud_to_pcd.py:9
test_pointcloud_to_pcd.PointCloudToPCD.test_data_path
test_data_path
Definition:
test_pointcloud_to_pcd.py:11
test_pointcloud_to_pcd.TestPointCloudToPCD.test_point_clout_to_pcd
def test_point_clout_to_pcd(self)
Definition:
test_pointcloud_to_pcd.py:25
test_pointcloud_to_pcd.PointCloudToPCD.check_pcd_generate
def check_pcd_generate(self)
Definition:
test_pointcloud_to_pcd.py:14
test_pointcloud_to_pcd.PointCloudToPCD.time_limit
time_limit
Definition:
test_pointcloud_to_pcd.py:12
test_pointcloud_to_pcd.TestPointCloudToPCD
Definition:
test_pointcloud_to_pcd.py:24
jsk_pcl_ros_utils
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:15