Skip to content

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Apr 25, 2025

Solved Problem

While looking into what would be necessary to command the gimbal back to neutral automatically very close to ground I found that the internal interface for that is not as straight forward as I hoped and instead it's necessary to go through a complicated MAVLink protocol dance in every spot within PX4 that wants to do that.

As part of studying that I came across these pieces which I really at least want to refactor for clarity to enable further improvements.

Solution

  • Flight Task Auto crawl speed is not compliant with the parameter naming convention (1. commit)
  • More clear MPC_LAND_ALT3 parameter description
  • Make navigator function publish_vehicle_cmd consume a reference instead of a pointer and rename it to publish_vehicle_command.
  • Follow convention to name messages to publish according to the message name instead of some cryptic abbrevated version.
  • Explicitly write float/double literals

Documentation I only adjusted the english version. There seem to be multiple different english versions in other language subdirectories, I still don't understand why such outdated non-translated versions exist.

Changelog Entry

Cleanup: Navigator: Vehicle command refactor, FlightTaskAuto: parameter clarification

Test coverage

It's refactoring except for the reference instead of pointer but if the previous version was ever called with a nullptr it would have hardfaulted.

@MaEtUgR MaEtUgR force-pushed the maetugr/parameter-vehicle-command-refactor branch from 705dcdf to c895e96 Compare April 25, 2025 12:22
@MaEtUgR MaEtUgR force-pushed the maetugr/parameter-vehicle-command-refactor branch from c895e96 to b2de5d7 Compare April 25, 2025 12:23
Copy link

No flaws found

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Apr 25, 2025

@sfuhrer Thanks for having a look. According to your request I split the individual changes into separate commits. Please let me know if there's anything else I should address 🙏

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.

Thanks for the extreme diligence in updating all the docs as well!

@sfuhrer sfuhrer merged commit 8e89906 into main Apr 25, 2025
68 of 70 checks passed
@sfuhrer sfuhrer deleted the maetugr/parameter-vehicle-command-refactor branch April 25, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants