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
d8cb6bb8
Commit
d8cb6bb8
authored
6 years ago
by
Beat Küng
Committed by
Roman Bapst
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mc_pos_control_params: update jerk params (limits + defaults + description)
parent
22780efc
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/Utility/ManualSmoothingXY.cpp
+1
-1
1 addition, 1 deletion
src/lib/FlightTasks/tasks/Utility/ManualSmoothingXY.cpp
src/modules/mc_pos_control/mc_pos_control_params.c
+27
-13
27 additions, 13 deletions
src/modules/mc_pos_control/mc_pos_control_params.c
with
28 additions
and
14 deletions
src/lib/FlightTasks/tasks/Utility/ManualSmoothingXY.cpp
+
1
−
1
View file @
d8cb6bb8
...
...
@@ -140,7 +140,7 @@ ManualSmoothingXY::_setStateAcceleration(const Vector2f &vel_sp, const Vector2f
// very slow at low speed.
_jerk_state_dependent
=
1e6
f
;
// default
if
(
_jerk_max
.
get
()
>
_jerk_min
.
get
())
{
if
(
_jerk_max
.
get
()
>
_jerk_min
.
get
()
&&
_jerk_min
.
get
()
>
FLT_EPSILON
)
{
_jerk_state_dependent
=
math
::
min
((
_jerk_max
.
get
()
-
_jerk_min
.
get
())
/
_vel_max
*
vel
.
length
()
+
_jerk_min
.
get
(),
_jerk_max
.
get
());
...
...
This diff is collapsed.
Click to expand it.
src/modules/mc_pos_control/mc_pos_control_params.c
+
27
−
13
View file @
d8cb6bb8
...
...
@@ -483,33 +483,47 @@ PARAM_DEFINE_FLOAT(MPC_ACC_UP_MAX, 10.0f);
PARAM_DEFINE_FLOAT
(
MPC_ACC_DOWN_MAX
,
10
.
0
f
);
/**
* Maximum jerk in manual controlled mode for BRAKING to zero.
* If this value is below MPC_JERK_MIN, the acceleration limit in xy and z
* is MPC_ACC_HOR_MAX and MPC_ACC_UP_MAX respectively instantaneously when the
* user demands brake (=zero stick input).
* Otherwise the acceleration limit increases from current acceleration limit
* towards MPC_ACC_HOR_MAX/MPC_ACC_UP_MAX with jerk limit
* Maximum jerk limit
*
* Limit the maximum jerk of the vehicle (how fast the acceleration can change).
* A lower value leads to smoother vehicle motions, but it also limits its
* agility (how fast it can change directions or break).
*
* Setting this to the maximum value essentially disables the limit.
*
* Note: this is only used when MPC_POS_MODE is set to a smoothing mode.
*
* @unit m/s/s/s
* @min 0.
0
* @max
1
5.0
* @min 0.
5
* @max 5
00
.0
* @increment 1
* @decimal 2
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT
(
MPC_JERK_MAX
,
0
.
0
f
);
PARAM_DEFINE_FLOAT
(
MPC_JERK_MAX
,
2
0
.
0
f
);
/**
* Minimum jerk in manual controlled mode for BRAKING to zero
* Velocity-based jerk limit
*
* If this is not zero, a velocity-based maximum jerk limit is used: the applied
* jerk limit linearly increases with the vehicle's velocity between
* MPC_JERK_MIN (zero velocity) and MPC_JERK_MAX (maximum velocity).
*
* This means that the vehicle's motions are smooth for low velocities, but
* still allows fast direction changes or breaking at higher velocities.
*
* Set this to zero to use a fixed maximum jerk limit (MPC_JERK_MAX).
*
* Note: this is only used when MPC_POS_MODE is set to a smoothing mode.
*
* @unit m/s/s/s
* @min 0
.5
* @max
1
0.0
* @min 0
* @max
3
0.0
* @increment 1
* @decimal 2
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT
(
MPC_JERK_MIN
,
1
.
0
f
);
PARAM_DEFINE_FLOAT
(
MPC_JERK_MIN
,
8
.
0
f
);
/**
* Altitude control mode.
...
...
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