Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
w
+
Functions
_
a
c
d
e
f
g
l
m
n
o
p
q
r
s
t
u
w
+
Variables
_
a
c
d
f
g
i
l
m
n
p
r
s
t
Typedefs
Enumerations
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
+
Enumerator
k
m
s
Related Functions
+
Files
File List
+
File Members
+
All
a
b
c
g
i
m
p
r
s
u
Functions
Variables
Typedefs
Macros
Examples
src
mavros
command.py
Go to the documentation of this file.
1
# -*- coding: utf-8 -*-
2
# vim:set ts=4 sw=4 et:
3
#
4
# Copyright 2014,2015 Vladimir Ermakov.
5
#
6
# This file is part of the mavros package and subject to the license terms
7
# in the top-level LICENSE file of the mavros repository.
8
# https://github.com/mavlink/mavros/tree/master/LICENSE.md
9
10
__all__ = (
11
'long'
,
12
'int'
,
13
'arming'
,
14
'set_home'
,
15
'takeoff'
,
16
'land'
,
17
'trigger_control'
,
18
)
19
20
import
rospy
21
import
mavros
22
23
from
mavros_msgs.srv
import
CommandLong, CommandInt, CommandBool, CommandHome, CommandTOL, CommandTriggerControl, CommandTriggerInterval
24
25
26
def
_get_proxy
(service, type):
27
return
rospy.ServiceProxy(
mavros.get_topic
(
'cmd'
, service), type)
28
29
30
long =
None
31
int =
None
32
arming =
None
33
set_home =
None
34
takeoff =
None
35
land =
None
36
trigger_control =
None
37
38
39
def
_setup_services
():
40
global
long, int, arming, set_home, takeoff, land, trigger_control
41
long =
_get_proxy
(
'command'
, CommandLong)
42
int =
_get_proxy
(
'command_int'
, CommandInt)
43
arming =
_get_proxy
(
'arming'
, CommandBool)
44
set_home =
_get_proxy
(
'set_home'
, CommandHome)
45
takeoff =
_get_proxy
(
'takeoff'
, CommandTOL)
46
land =
_get_proxy
(
'land'
, CommandTOL)
47
trigger_control =
_get_proxy
(
'trigger_control'
, CommandTriggerControl)
48
trigger_interval =
_get_proxy
(
'trigger_interval'
, CommandTriggerInterval)
49
50
51
# register updater
52
mavros.register_on_namespace_update
(_setup_services)
mavros.command._get_proxy
def _get_proxy(service, type)
Definition:
command.py:26
mavros.get_topic
def get_topic(args)
Definition:
__init__.py:49
mavros.register_on_namespace_update
def register_on_namespace_update(cb)
Definition:
__init__.py:41
mavros.command._setup_services
def _setup_services()
Definition:
command.py:39
mavros
Author(s): Vladimir Ermakov
autogenerated on Tue Jun 13 2023 02:17:50