-
Notifications
You must be signed in to change notification settings - Fork 178
Implemented Avl_automation Enhancements #79
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
base: main
Are you sure you want to change the base?
Conversation
…piler' since the more robust surface definition is not compatible with the old yaml version This new tool helps make the simulation more accurate by importing from QGC the parameters and adding them to the gazebo sim This tool is not complete and turns Gazebo parameters back to a .param file for QGC
Copied an actual error from the gazebo output to better show and explain why do errors appear on the first simulation run
README was updated to reflect this change
Jaeyoung-Lim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
-
Could you separate the two features to two different PRs?
-
I am not sure if I understand correctly the QGC2ROMFS feature. Wouldnt this be agnostic to the simulator used, and simply a separate tool for px4? Why is this useful for gazebo?
|
Hi @Jaeyoung-Lim, Thank you for your reply. I’ve only used Gazebo Classic, so I hadn’t considered the versatility of QGC2ROMFS across different simulators. As long as the parameter definition format remains consistent across all simulators, then yes! Both QGC2ROMFS and ROMFS2QGC will have a PR submitted to PX4, with only the updated AVL_automation remaining specific to Gazebo. |
tools/.vscode/c_cpp_properties.json
Outdated
| } | ||
| ], | ||
| "version": 4 | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove vscode artifacts from the PR
|
@Filipe-Cavalheiro There seems to be vscode artifacts and pycache submitted as part of the PR. After these are removed, I can review the PR |
|
Hi @Jaeyoung-Lim,
To be completely honest, I do believe that the AVL automation with multiple control surfaces per wing is functional. However, I haven’t been able to create a YAML file for AVL that I’m fully satisfied with. This is mainly because aerodynamics are outside my area of expertise so I believe that my definition of the wings (easy_glider4) is not totally correct. |
|
Assuming this changes the way the AVL tool is run, would be great if we could have a docs update after this merges: https://docs.px4.io/main/en/sim_gazebo_gz/tools_avl_automation.html#advanced-lift-drag-avl-automation-tool |
Previously, the parser incorrectly assumed that the second aileron in AVL output should be inverted for differential control. However, AVL only outputs values for one of the symmetric control surfaces, requiring manual inversion if needed (e.g., for ailerons). The parser has been updated to invert the *first* aileron instead. This fix corrects control behavior in Gazebo/QGroundControl simulations, particularly for the Easy Glider 4 model, which now responds as expected under autonomous control. Note: This fix is based on simulation results only; no real-world flight tests have been conducted to validate the parser/model accuracy.
|
Hi @hamishwillee, I have finally also discovered what was wrong with the parser and fixed it, the easy glider 4 now works as expected, further details located in the commit Fix aileron inversion logic in AVL output parser. As always, any changes needed to get this push through are more than welcome. |
|
Thanks. I'm on holiday. If no one else gets to this, I will check it out in 2 weeks. |
| @@ -0,0 +1,335 @@ | |||
| #!/usr/bin/env | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference with this and the original avl_out_parse_0_0.py? Shouldn't they be one file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main difference between this and the original avl_out_parse_0_0.py is that the new version includes some variable name changes and updates to how the received data is parsed for Gazebo. Specifically, this commit corrects the inversion order of the ailerons in the simulation, which was necessary for proper behavior in Gazebo.
If it's deemed better for clarity and maintenance, we can remove avl_out_parse_0_0.py entirely and just use the updated version going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that it is not even clear what have changed between the two PRs making it hard to review. If you think it is an improvement please change the file.
|
|
||
| # Call main function of avl parse script to parse the generated AVL files. | ||
| avl_out_parse.main(plane_name,frame_type,AR,mac,ref_pt_x,ref_pt_y,ref_pt_z,num_ctrl_surfaces,area,ctrl_surface_order,inputs.avl_path) | ||
| avl_out_parse_0_0.main(plane_name,frame_type,AR,mac,ref_pt_x,ref_pt_y,ref_pt_z,num_ctrl_surfaces,area,ctrl_surface_order,inputs.avl_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this file renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are two versions of the parser, the original input parser currently relies on the original output parser. However, this setup no longer makes sense—the updated output parser should always be used instead. Therefore, the deprecated avl_out_parse_0_0.py and input_avl_parse_0_0.py will be removed to avoid redundancy and ensure consistency.
This two files were removed since they have been update to a new version avl_out_parser_1_0.py and avl_input_parser_1_0.py There were also a avl_input_parser_1_0.py missplaced in the /gz/ folder, the plane_example_0 was also updated to work corretly with the new parser
|
Hi all, For simplicity's sake, the 0_0 versions of both the input and output parsers have been removed. Both examples—plane_example_0 and easy_glider4—work as intended with the updated parsers. |
Two new tools were implemented and one was updated
Summary
This pull request introduces two new tools and an update to Avl_automation, aiming to improve simulation accuracy and enhance aerodynamic modeling.
New Tool: QGC2ROMFS_parameters
New Tool: ROMFS2QGC_parameters (In Development)
Updated Tool: Avl_automation
Feedback & Next Steps
Any feedback is appreciated to ensure a smooth integration of these improvements. Let me know if anything needs adjustment!