feat: Implement 3D flight animation methods using Vedo (Issue #523)#909
Open
GuilhermeAsura wants to merge 18 commits into
Open
feat: Implement 3D flight animation methods using Vedo (Issue #523)#909GuilhermeAsura wants to merge 18 commits into
GuilhermeAsura wants to merge 18 commits into
Conversation
Member
|
@GuilhermeAsura could you please fix tests and linters on CI? |
Author
I'm on it! |
- Ported methods from legacy 'animate_flight' branch - Adapted to new Flight class structure (removed postProcess) - Added vedo as optional dependency Co-authored-by: Patrick Sampaio
4a29817 to
aebdf6a
Compare
Member
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
the code coverall looks good, but needs refactor.
We can still add it to the next release (this month)
- Ported methods from legacy 'animate_flight' branch - Adapted to new Flight class structure (removed postProcess) - Added vedo as optional dependency Co-authored-by: Patrick Sampaio
Member
|
Before we merge this PR, some points should be addressed:
|
- Implemented 3D flight trajectory and attitude animations in the Flight plots layer. - Added methods `animate_trajectory` and `animate_rotate` to visualize rocket flight. - Included validation for animation inputs and error handling for missing STL files. - Updated documentation to reflect new animation features and installation requirements. - Added optional dependency for `vedo` in `requirements-optional.txt`. - Created a default STL model for the rocket. - Removed outdated animation verification tests and replaced them with unit tests for new animation methods.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #909 +/- ##
===========================================
+ Coverage 80.27% 81.16% +0.89%
===========================================
Files 104 113 +9
Lines 12769 14658 +1889
===========================================
+ Hits 10250 11897 +1647
- Misses 2519 2761 +242 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9 tasks
…ion_methods # Conflicts: # CHANGELOG.md
Member
|
I am working on this one locally |
Reference vedo classes directly instead of capitalized local aliases (invalid-name), drop useless returns, and silence too-many-statements on the animate methods to match the file convention. Lint now scores 10/10 and ruff is clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Keep the PR scoped to the animation feature; requests/pytz pinning was unrelated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
Currently, the
Flightclass lacks built-in methods for 3D visualization of the simulation results. Users wishing to visualize the rocket's trajectory or attitude must export data and use external tools or write custom scripts. This addresses Issue #523.New behavior
This PR integrates 3D visualization capabilities directly into the
Flightclass using thevedolibrary.Key Changes:
Flight:animate_trajectory(file_name, start, stop, time_step): Visualizes the 6-DOF translation of the rocket relative to the ground.animate_rotate(file_name, start, stop, time_step): Visualizes the specific attitude (rotation) of the rocket during flight.vedoas an optional dependency inpyproject.tomlunder the[animation]key.pip install rocketpy[animation].vedoand raise a descriptiveImportErrorwith installation instructions if it is missing.animate_flightbranch to match the currentFlightclass structure (e.g., removing deprecatedpostProcesscalls).Breaking change
Additional information
Acknowledgements
This feature was originally developed by Patrick Sampaio in the
animate_flightbranch. This PR adapts that work to the moderndevelopbranch structure and newer RocketPy architecture.Verification
A modular verification suite was added in
tests/animation_verification/to generate a dummy 3D model and test the invocation of the animation methods.