Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
6f44b4d3
Commit
6f44b4d3
authored
10 years ago
by
Andreas Antener
Browse files
Options
Downloads
Patches
Plain Diff
remove gazebo plugin command fake, fix some lint warnings
parent
4b65e625
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
integrationtests/demo_tests/manual_input.py
+8
-16
8 additions, 16 deletions
integrationtests/demo_tests/manual_input.py
with
8 additions
and
16 deletions
integrationtests/demo_tests/manual_input.py
+
8
−
16
View file @
6f44b4d3
...
...
@@ -35,7 +35,6 @@
#
# @author Andreas Antener <andreas@uaventure.com>
#
import
sys
import
rospy
from
px4.msg
import
manual_control_setpoint
...
...
@@ -46,17 +45,12 @@ from std_msgs.msg import Header
#
# Manual input control helper
#
# FIXME: this is not the way to do it! ATM it fakes input to iris/command/attitude because else
# the simulator does not instantiate our controller. Probably this whole class will disappear once
# arming works correctly.
#
class
ManualInput
:
class
ManualInput
(
object
):
def
__init__
(
self
):
rospy
.
init_node
(
'
test_node
'
,
anonymous
=
True
)
self
.
pubMcsp
=
rospy
.
Publisher
(
'
iris/manual_control_setpoint
'
,
manual_control_setpoint
,
queue_size
=
10
)
self
.
pubOff
=
rospy
.
Publisher
(
'
iris/offboard_control_mode
'
,
offboard_control_mode
,
queue_size
=
10
)
self
.
pubAtt
=
rospy
.
Publisher
(
'
iris/command/attitude
'
,
CommandAttitudeThrust
,
queue_size
=
10
)
self
.
pub_mcsp
=
rospy
.
Publisher
(
'
iris/manual_control_setpoint
'
,
manual_control_setpoint
,
queue_size
=
10
)
self
.
pub_off
=
rospy
.
Publisher
(
'
iris/offboard_control_mode
'
,
offboard_control_mode
,
queue_size
=
10
)
def
arm
(
self
):
rate
=
rospy
.
Rate
(
10
)
# 10hz
...
...
@@ -81,9 +75,7 @@ class ManualInput:
rospy
.
loginfo
(
"
zeroing
"
)
time
=
rospy
.
get_rostime
().
now
()
pos
.
timestamp
=
time
.
secs
*
1e6
+
time
.
nsecs
/
1000
self
.
pubMcsp
.
publish
(
pos
)
# Fake input to iris commander
self
.
pubAtt
.
publish
(
att
)
self
.
pub_mcsp
.
publish
(
pos
)
rate
.
sleep
()
count
=
count
+
1
...
...
@@ -93,7 +85,7 @@ class ManualInput:
rospy
.
loginfo
(
"
arming
"
)
time
=
rospy
.
get_rostime
().
now
()
pos
.
timestamp
=
time
.
secs
*
1e6
+
time
.
nsecs
/
1000
self
.
pub
M
csp
.
publish
(
pos
)
self
.
pub
_m
csp
.
publish
(
pos
)
rate
.
sleep
()
count
=
count
+
1
...
...
@@ -118,7 +110,7 @@ class ManualInput:
rospy
.
loginfo
(
"
triggering posctl
"
)
time
=
rospy
.
get_rostime
().
now
()
pos
.
timestamp
=
time
.
secs
*
1e6
+
time
.
nsecs
/
1000
self
.
pub
M
csp
.
publish
(
pos
)
self
.
pub
_m
csp
.
publish
(
pos
)
rate
.
sleep
()
count
=
count
+
1
...
...
@@ -147,7 +139,7 @@ class ManualInput:
rospy
.
loginfo
(
"
setting offboard mode
"
)
time
=
rospy
.
get_rostime
().
now
()
mode
.
timestamp
=
time
.
secs
*
1e6
+
time
.
nsecs
/
1000
self
.
pub
O
ff
.
publish
(
mode
)
self
.
pub
_o
ff
.
publish
(
mode
)
rate
.
sleep
()
count
=
count
+
1
...
...
@@ -169,7 +161,7 @@ class ManualInput:
rospy
.
loginfo
(
"
triggering offboard
"
)
time
=
rospy
.
get_rostime
().
now
()
pos
.
timestamp
=
time
.
secs
*
1e6
+
time
.
nsecs
/
1000
self
.
pub
M
csp
.
publish
(
pos
)
self
.
pub
_m
csp
.
publish
(
pos
)
rate
.
sleep
()
count
=
count
+
1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment