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

[Bug] Invalid Parameter Value and Dependency for MPC_XY_VEL_ALL, MPC_XY_VEL_MAX, and MPC_XY_CRUISE #24171

Open
hapi2test opened this issue Jan 6, 2025 · 0 comments

Comments

@hapi2test
Copy link

Describe the bug

The parameter_reference shows that the valid range for MPC_XY_VEL_ALL is [-20, 20]. However, when I set MPC_XY_VEL_ALL to 0, the drone becomes stuck, and both MPC_XY_VEL_MAX and MPC_XY_CRUISE are automatically set to 0.

Additionally, when I change MPC_XY_VEL_ALL back to its default value of -10, the values of MPC_XY_VEL_MAX and MPC_XY_CRUISE remain stuck at 0, preventing any movement.

This behavior seems to be unintended and results in the drone being immobilized without any error messages or warnings.

To Reproduce

param set MPC_XY_VEL_ALL 0

Expected behavior

When setting an invalid parameter value such as param set MPC_XY_VEL_ALL 0, it would be helpful if the software could reject this value and display a warning message, for example:
"The valid range is [-20, 0) and (0, 20], 0 is not accepted."

Additionally, it might be beneficial to include the dependencies between MPC_XY_VEL_ALL, MPC_XY_VEL_MAX, and MPC_XY_CRUISE in the parameter reference. When modifying MPC_XY_VEL_ALL, I would expect the drone to respond accordingly. It would be great if there could be a prompt such as:
"Please update MPC_XY_VEL_MAX first, followed by MPC_XY_CRUISE."

Alternatively, if an inconsistency is detected, it would be helpful if the system could automatically adjust all three parameters (MPC_XY_VEL_ALL, MPC_XY_VEL_MAX, and MPC_XY_CRUISE) to their default values to ensure proper operation.

Screenshot / Media

image
image
image

Flight Log

https://review.px4.io/plot_app?log=7816c751-0f60-4108-860b-a2d20f4f4c7f

Software Version

HW arch: PX4_SITL
PX4 git-hash: fd2b3ae
PX4 version: 1.15.0 80 (17760384)
PX4 git-branch: main
OS: Linux
OS version: Release 5.15.0 (84869375)
Build datetime: Oct 10 2024 20:00:28
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.4.0
PX4GUID: 1006554d49534954414c44494e4f30303030
UNKNOWN MCU

Flight controller

No response

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant