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
d5903853
Commit
d5903853
authored
6 years ago
by
Matthias Grob
Browse files
Options
Downloads
Patches
Plain Diff
mc_pos_control: shut down vertical thrust with ground contact
parent
98148aad
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
src/modules/mc_pos_control/mc_pos_control_main.cpp
+8
-16
8 additions, 16 deletions
src/modules/mc_pos_control/mc_pos_control_main.cpp
with
8 additions
and
16 deletions
src/modules/mc_pos_control/mc_pos_control_main.cpp
+
8
−
16
View file @
d5903853
...
...
@@ -1105,23 +1105,15 @@ MulticopterPositionControl::update_smooth_takeoff(const float &z_sp, const float
void
MulticopterPositionControl
::
limit_thrust_during_landing
(
vehicle_local_position_setpoint_s
&
setpoint
)
{
if
(
_vehicle_land_detected
.
ground_contact
)
{
// Set thrust in xy to zero
setpoint
.
thrust
[
0
]
=
0.0
f
;
setpoint
.
thrust
[
1
]
=
0.0
f
;
_control
.
resetIntegralXY
();
// set yaw-sp to current yaw
setpoint
.
yaw
=
_states
.
yaw
;
}
if
(
_vehicle_land_detected
.
maybe_landed
)
{
// set yaw-sp to current yaw
setpoint
.
yaw
=
_states
.
yaw
;
// we set thrust to zero
// this will help to decide if we are actually landed or not
if
(
_vehicle_land_detected
.
ground_contact
||
_vehicle_land_detected
.
maybe_landed
)
{
// we set thrust to zero, this will help to decide if we are actually landed or not
setpoint
.
thrust
[
0
]
=
setpoint
.
thrust
[
1
]
=
setpoint
.
thrust
[
2
]
=
0.0
f
;
_control
.
resetIntegralXY
();
//reuqired to prevent integrator from increasing
_control
.
resetIntegralZ
();
//reuqired to prevent integrator from increasing
// set yaw-sp to current yaw to avoid any corrections
setpoint
.
yaw
=
_states
.
yaw
;
// prevent any integrator windup
_control
.
resetIntegralXY
();
_control
.
resetIntegralZ
();
}
}
...
...
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