Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
b
c
d
f
g
i
l
m
n
p
r
s
t
+
Functions
c
d
f
g
i
m
n
s
t
Variables
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
c
d
f
h
i
l
n
o
p
r
s
t
v
x
y
z
Functions
+
Variables
c
d
f
h
i
l
n
p
r
s
t
v
x
y
z
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
l
m
n
o
p
r
s
t
v
w
x
y
z
+
Functions
_
c
f
g
h
l
m
n
o
p
r
s
w
+
Variables
_
a
b
c
d
f
g
l
m
n
o
p
r
s
t
v
w
x
y
z
Enumerations
Enumerator
Macros
test
basic.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
rospy
3
import
pytest
4
from
mavros_msgs.msg
import
State
5
from
clover
import
srv
6
7
@pytest.fixture()
8
def
node
():
9
return
rospy.init_node(
'clover_test'
, anonymous=
True
)
10
11
def
test_state
(node):
12
state = rospy.wait_for_message(
'mavros/state'
, State, timeout=10)
13
assert
state.connected ==
False
14
assert
state.armed ==
False
15
assert
state.guided ==
False
16
assert
state.mode ==
''
17
18
def
test_simple_offboard_services_available
():
19
rospy.wait_for_service(
'get_telemetry'
, timeout=5)
20
rospy.wait_for_service(
'navigate'
, timeout=5)
21
rospy.wait_for_service(
'navigate_global'
, timeout=5)
22
rospy.wait_for_service(
'set_position'
, timeout=5)
23
rospy.wait_for_service(
'set_velocity'
, timeout=5)
24
rospy.wait_for_service(
'set_attitude'
, timeout=5)
25
rospy.wait_for_service(
'set_rates'
, timeout=5)
26
rospy.wait_for_service(
'land'
, timeout=5)
27
28
def
test_web_video_server
(node):
29
import
urllib2
30
urllib2.urlopen(
"http://localhost:8080"
).read()
basic.test_simple_offboard_services_available
def test_simple_offboard_services_available()
Definition:
basic.py:18
basic.node
def node()
Definition:
basic.py:8
basic.test_web_video_server
def test_web_video_server(node)
Definition:
basic.py:28
basic.test_state
def test_state(node)
Definition:
basic.py:11
clover
Author(s): Oleg Kalachev
, Artem Smirnov
autogenerated on Mon Feb 28 2022 22:08:29