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
6a937784
Commit
6a937784
authored
6 years ago
by
Mohammed Kabir
Committed by
Lorenz Meier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ekf2 : update to use new navigation limits architechture
parent
8299f571
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/modules/ekf2/ekf2_main.cpp
+16
-3
16 additions, 3 deletions
src/modules/ekf2/ekf2_main.cpp
src/modules/ekf2/ekf2_params.c
+0
-11
0 additions, 11 deletions
src/modules/ekf2/ekf2_params.c
with
16 additions
and
14 deletions
src/modules/ekf2/ekf2_main.cpp
+
16
−
3
View file @
6a937784
...
...
@@ -322,7 +322,6 @@ private:
(
ParamExtInt
<
px4
::
params
::
EKF2_OF_QMIN
>
)
_flow_qual_min
,
///< minimum acceptable quality integer from the flow sensor
(
ParamExtFloat
<
px4
::
params
::
EKF2_OF_GATE
>
)
_flow_innov_gate
,
///< optical flow fusion innovation consistency gate size (STD)
(
ParamExtFloat
<
px4
::
params
::
EKF2_OF_RMAX
>
)
_flow_rate_max
,
///< maximum valid optical flow rate (rad/sec)
// sensor positions in body frame
(
ParamExtFloat
<
px4
::
params
::
EKF2_IMU_POS_X
>
)
_imu_pos_x
,
///< X position of IMU in body frame (m)
...
...
@@ -470,7 +469,6 @@ Ekf2::Ekf2():
_flow_noise_qual_min
(
_params
->
flow_noise_qual_min
),
_flow_qual_min
(
_params
->
flow_qual_min
),
_flow_innov_gate
(
_params
->
flow_innov_gate
),
_flow_rate_max
(
_params
->
flow_rate_max
),
_imu_pos_x
(
_params
->
imu_pos_body
(
0
)),
_imu_pos_y
(
_params
->
imu_pos_body
(
1
)),
_imu_pos_z
(
_params
->
imu_pos_body
(
2
)),
...
...
@@ -903,6 +901,9 @@ void Ekf2::run()
_ekf
.
setOpticalFlowData
(
optical_flow
.
timestamp
,
&
flow
);
}
// Save sensor limits reported by the optical flow sensor
_ekf
.
set_optical_flow_limits
(
optical_flow
.
max_flow_rate
,
optical_flow
.
min_ground_distance
,
optical_flow
.
max_ground_distance
);
ekf2_timestamps
.
optical_flow_timestamp_rel
=
(
int16_t
)((
int64_t
)
optical_flow
.
timestamp
/
100
-
(
int64_t
)
ekf2_timestamps
.
timestamp
/
100
);
}
...
...
@@ -931,6 +932,9 @@ void Ekf2::run()
_ekf
.
setRangeData
(
range_finder
.
timestamp
,
range_finder
.
current_distance
);
// Save sensor limits reported by the rangefinder
_ekf
.
set_rangefinder_limits
(
range_finder
.
min_distance
,
range_finder
.
max_distance
);
ekf2_timestamps
.
distance_sensor_timestamp_rel
=
(
int16_t
)((
int64_t
)
range_finder
.
timestamp
/
100
-
(
int64_t
)
ekf2_timestamps
.
timestamp
/
100
);
}
...
...
@@ -1127,12 +1131,21 @@ void Ekf2::run()
_ekf
.
get_velNE_reset
(
&
lpos
.
delta_vxy
[
0
],
&
lpos
.
vxy_reset_counter
);
// get control limit information
_ekf
.
get_ekf_ctrl_limits
(
&
lpos
.
vxy_max
,
&
lpos
.
limit_hagl
);
_ekf
.
get_ekf_ctrl_limits
(
&
lpos
.
vxy_max
,
&
lpos
.
vz_max
,
&
lpos
.
hagl_min
,
&
lpos
.
hagl_max
);
// convert NaN to zero
if
(
!
PX4_ISFINITE
(
lpos
.
vxy_max
))
{
lpos
.
vxy_max
=
0.0
f
;
}
if
(
!
PX4_ISFINITE
(
lpos
.
vz_max
))
{
lpos
.
vz_max
=
0.0
f
;
}
if
(
!
PX4_ISFINITE
(
lpos
.
hagl_min
))
{
lpos
.
hagl_min
=
0.0
f
;
}
if
(
!
PX4_ISFINITE
(
lpos
.
hagl_max
))
{
lpos
.
hagl_max
=
0.0
f
;
}
// publish vehicle local position data
_vehicle_local_position_pub
.
update
();
...
...
This diff is collapsed.
Click to expand it.
src/modules/ekf2/ekf2_params.c
+
0
−
11
View file @
6a937784
...
...
@@ -738,17 +738,6 @@ PARAM_DEFINE_INT32(EKF2_OF_QMIN, 1);
*/
PARAM_DEFINE_FLOAT
(
EKF2_OF_GATE
,
3
.
0
f
);
/**
* Optical Flow data will not fused if the magnitude of the flow rate > EKF2_OF_RMAX.
* Control loops will be instructed to limit ground speed such that the flow rate produced by movement over ground is less than 50% of EKF2_OF_RMAX.
*
* @group EKF2
* @min 1.0
* @unit rad/s
* @decimal 2
*/
PARAM_DEFINE_FLOAT
(
EKF2_OF_RMAX
,
2
.
5
f
);
/**
* Terrain altitude process noise - accounts for instability in vehicle height estimate
*
...
...
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