Main Page
Namespaces
Classes
Files
File List
File Members
test
files
scripts
check_librealsense_installed.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
"""
3
@file check_librealsense_installed.py
4
"""
5
import
os
6
import
sys
7
import
commands
8
import
unittest
9
import
rospy
10
import
rostest
11
12
PKG =
'realsense_camera'
13
NAME =
'check_librealsense_installed'
14
LIB =
'librealsense.so'
15
16
17
class
CheckLibrealsenseInstalled
(unittest.TestCase):
18
"""
19
@class CheckLibrealsenseInstalled
20
"""
21
22
def
setUp
(self):
23
"""
24
@fn setUp
25
@param self
26
@return
27
"""
28
self.
success
=
False
29
30
def
test_basic_librealsense_installaton
(self):
31
"""verify that librealsense library has been installed
32
@fn test_basic_librealsense_installaton
33
@param self
34
@return
35
"""
36
rospy.init_node(NAME, anonymous=
True
, log_level=rospy.INFO)
37
38
ros_version = commands.getoutput(
"rosversion -d"
)
39
if
os.path.exists(
'/opt/ros/'
+ ros_version +
'/lib/'
+ LIB) ==
True
\
40
or
os.path.exists(
'/opt/ros/'
+ ros_version +
41
'/lib/x86_64-linux-gnu/'
+ LIB) ==
True
:
42
self.
success
=
True
43
44
self.assert_(self.
success
, str(self.
success
))
45
46
if
__name__ ==
'__main__'
:
47
rostest.rosrun(PKG, NAME, CheckLibrealsenseInstalled, sys.argv)
check_librealsense_installed.CheckLibrealsenseInstalled.success
success
Definition:
check_librealsense_installed.py:28
check_librealsense_installed.CheckLibrealsenseInstalled.setUp
def setUp(self)
Definition:
check_librealsense_installed.py:22
check_librealsense_installed.CheckLibrealsenseInstalled
Definition:
check_librealsense_installed.py:17
check_librealsense_installed.CheckLibrealsenseInstalled.test_basic_librealsense_installaton
def test_basic_librealsense_installaton(self)
Definition:
check_librealsense_installed.py:30
realsense_camera
Author(s): Rajvi Jingar
, Reagan Lopez
, Matt Hansen
, Mark Horn
autogenerated on Mon Jun 10 2019 14:40:37