Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw_pos_control_l1: move to px4::params #13305

Merged
merged 1 commit into from
Feb 3, 2020
Merged

Conversation

dagar
Copy link
Member

@dagar dagar commented Oct 29, 2019

This is a quick initial pass to update fw_pos_control_l1 param usage. Needs to be reviewed carefully, then tested.

@dagar dagar requested a review from sfuhrer October 29, 2019 01:16
@dagar dagar force-pushed the pr-fw_pos_ctrl_l1_params branch from b56a9a1 to 59ff3ea Compare October 29, 2019 01:47
@dagar dagar force-pushed the pr-fw_pos_ctrl_l1_params branch from 59ff3ea to 117dc43 Compare January 22, 2020 20:35
@dagar dagar requested a review from Jaeyoung-Lim January 22, 2020 20:36
@dagar dagar marked this pull request as ready for review January 22, 2020 20:36
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find anything wrong, but would there be a way to test this properly?

@dagar
Copy link
Member Author

dagar commented Jan 24, 2020

I couldn't find anything wrong, but would there be a way to test this properly?

From the existing CI we can see nothing is blatantly wrong. A quick flight verifying altitude and position control mode as well as catapult/hand launch would fill most of the coverage gaps. Then a pass of the logs to verify the expected limits were maintained, etc.

As for the actual code, other than blatant typos we should carefully review the actual usage of the special cases where the parameter value was converted immediately (eg FW_MAN_R_MAX (degrees/s) -> _parameters.man_roll_max_rad (radians/s)).

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also looks good from my side.

I've further SITL tested it on the standard VTOL a bit. Would also feel comfortable testing it on one of our small VTOLs next week, or should we ping the testing team for that?

_parameter_handles.speedrate_p = param_find("FW_T_SRATE_P");
_parameter_handles.loiter_radius = param_find("NAV_LOITER_RAD");
// if vehicle is vtol these handles will be set when we get the vehicle status
_parameter_handles.airspeed_trans = PARAM_INVALID;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is setting it here to PARAM_INVALID necessary? Isn't it already set correctly above?

Side note: is there actually something preventing us from using the new params API also in the VTOL module? If not then I'm happy helping out with that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, this looks bogus.

Side note: is there actually something preventing us from using the new params API also in the VTOL module? If not then I'm happy helping out with that.

Just time. 😏

@dagar dagar force-pushed the pr-fw_pos_ctrl_l1_params branch from 117dc43 to 36879ba Compare February 3, 2020 01:13
@codecov
Copy link

codecov bot commented Feb 3, 2020

Codecov Report

Merging #13305 into master will decrease coverage by 17.25%.
The diff coverage is 53.92%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #13305       +/-   ##
===========================================
- Coverage   53.53%   36.27%   -17.26%     
===========================================
  Files         605      545       -60     
  Lines       51366    46886     -4480     
===========================================
- Hits        27501    17010    -10491     
- Misses      23865    29876     +6011
Flag Coverage Δ
#mavsdk 36.27% <53.92%> (-0.07%) ⬇️
#python ?
#sitl_mission_FW ?
#sitl_mission_MC_box ?
#sitl_mission_MC_offboard_att ?
#sitl_mission_MC_offboard_pos ?
#sitl_mission_Rover ?
#sitl_mission_VTOL_standard ?
#sitl_mission_VTOL_tailsitter ?
#sitl_python_FW ?
#sitl_python_MC_box ?
#sitl_python_MC_offboard_att ?
#sitl_python_MC_offboard_pos ?
#sitl_python_Rover ?
#sitl_python_VTOL_standard ?
#sitl_python_VTOL_tailsitter ?
#unittest ?
Impacted Files Coverage Δ
...les/fw_pos_control_l1/FixedwingPositionControl.hpp 100% <100%> (ø) ⬆️
...les/fw_pos_control_l1/FixedwingPositionControl.cpp 47.55% <53.46%> (-33.35%) ⬇️
src/systemcmds/tests/test_bezierQuad.cpp 0% <0%> (-100%) ⬇️
src/lib/controllib/BlockLimitSym.cpp 0% <0%> (-100%) ⬇️
src/modules/navigator/mission_block.h 0% <0%> (-100%) ⬇️
src/systemcmds/tests/test_search_min.cpp 0% <0%> (-100%) ⬇️
src/systemcmds/tests/test_hrt.cpp 0% <0%> (-100%) ⬇️
...c/modules/mavlink/mavlink_tests/mavlink_ftp_test.h 0% <0%> (-100%) ⬇️
src/modules/navigator/takeoff.h 0% <0%> (-100%) ⬇️
src/modules/navigator/land.h 0% <0%> (-100%) ⬇️
... and 285 more

@dagar dagar merged commit 3dc23af into master Feb 3, 2020
@dagar dagar deleted the pr-fw_pos_ctrl_l1_params branch February 3, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants