Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CPS-VO
mavros
Commits
6cddae0f
Commit
6cddae0f
authored
Mar 08, 2016
by
francois
Browse files
moved rc to rc_override_control()
parent
6cbb75e9
Changes
1
Show whitespace changes
Inline
Side-by-side
mavros_extras/scripts/mavteleop
View file @
6cddae0f
...
...
@@ -99,8 +99,6 @@ rc_channels = {
'throttle'
:
RCChan
(
'throttle'
,
2
,
0.0
)
}
rc
=
OverrideRCIn
()
# must be global to retain mode value
def
arm
(
args
,
state
):
try
:
command
.
arming
(
value
=
state
)
...
...
@@ -134,11 +132,12 @@ def rc_override_control(args):
v
.
load_param
()
rc_modes
=
RCMode
.
load_param
()
rc
=
OverrideRCIn
()
override_pub
=
rospy
.
Publisher
(
mavros
.
get_topic
(
"rc"
,
"override"
),
OverrideRCIn
,
queue_size
=
10
)
def
joy_cb
(
joy
):
global
rc
global
rc
# must be global to retain mode value
# get axes normalized to -1.0..+1.0 RPY, 0.0..1.0 T
roll
=
get_axis
(
joy
,
'roll'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment