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
bf9a18a2
Commit
bf9a18a2
authored
6 years ago
by
Simone Guscetti
Committed by
Dennis Mannhart
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
FlightTask: Add interface for landing gear
parent
6938b7fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp
+2
-2
2 additions, 2 deletions
src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp
src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp
+15
-0
15 additions, 0 deletions
src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp
with
17 additions
and
2 deletions
src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp
+
2
−
2
View file @
bf9a18a2
...
...
@@ -6,7 +6,8 @@ constexpr uint64_t FlightTask::_timeout;
// First index of empty_setpoint corresponds to time-stamp and requires a finite number.
const
vehicle_local_position_setpoint_s
FlightTask
::
empty_setpoint
=
{
0
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
{
NAN
,
NAN
,
NAN
}};
const
vehicle_constraints_s
FlightTask
::
empty_constraints
=
{
0
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
vehicle_constraints_s
::
GEAR_KEEP
,
{}};
const
vehicle_constraints_s
FlightTask
::
empty_constraints
=
{
0
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
NAN
,
{}};
const
landing_gear_s
FlightTask
::
landing_gear_default_keep
=
{
0
,
landing_gear_s
::
GEAR_KEEP
,
{}};
const
vehicle_trajectory_waypoint_s
FlightTask
::
empty_trajectory_waypoint
=
{
0
,
0
,
{
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
{
0
,
{
NAN
,
NAN
,
NAN
},
{
NAN
,
NAN
,
NAN
},
{
NAN
,
NAN
,
NAN
},
NAN
,
NAN
,
false
,
{
0
,
0
,
0
}},
{
0
,
{
NAN
,
NAN
,
NAN
},
{
NAN
,
NAN
,
NAN
},
{
NAN
,
NAN
,
NAN
},
NAN
,
NAN
,
false
,
{
0
,
0
,
0
}},
...
...
@@ -148,7 +149,6 @@ void FlightTask::_setDefaultConstraints()
_constraints
.
speed_up
=
MPC_Z_VEL_MAX_UP
.
get
();
_constraints
.
speed_down
=
MPC_Z_VEL_MAX_DN
.
get
();
_constraints
.
tilt
=
math
::
radians
(
MPC_TILTMAX_AIR
.
get
());
_constraints
.
landing_gear
=
vehicle_constraints_s
::
GEAR_KEEP
;
_constraints
.
min_distance_to_ground
=
NAN
;
_constraints
.
max_distance_to_ground
=
NAN
;
}
This diff is collapsed.
Click to expand it.
src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp
+
15
−
0
View file @
bf9a18a2
...
...
@@ -45,6 +45,7 @@
#include
<drivers/drv_hrt.h>
#include
<matrix/matrix/math.hpp>
#include
<uORB/Subscription.hpp>
#include
<uORB/topics/landing_gear.h>
#include
<uORB/topics/vehicle_local_position.h>
#include
<uORB/topics/vehicle_local_position_setpoint.h>
#include
<uORB/topics/vehicle_command.h>
...
...
@@ -114,6 +115,13 @@ public:
*/
const
vehicle_constraints_s
&
getConstraints
()
{
return
_constraints
;
}
/**
* Get landing gear position.
* The constraints can vary with task.
* @return landing gear
*/
const
landing_gear_s
&
getGear
()
{
return
_gear
;
}
/**
* Get avoidance desired waypoint
* @return desired waypoints
...
...
@@ -132,6 +140,11 @@ public:
*/
static
const
vehicle_constraints_s
empty_constraints
;
/**
* default landing gear state
*/
static
const
landing_gear_s
landing_gear_default_keep
;
/**
* Empty desired waypoints.
* All waypoints are set to NAN.
...
...
@@ -215,6 +228,8 @@ protected:
*/
vehicle_constraints_s
_constraints
{};
landing_gear_s
_gear
{};
/**
* Desired waypoints.
* Goals set by the FCU to be sent to the obstacle avoidance system.
...
...
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