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

ENH: rocket drawing #419

Merged
merged 8 commits into from
Oct 7, 2023
Merged

ENH: rocket drawing #419

merged 8 commits into from
Oct 7, 2023

Conversation

Gui-FernandesBR
Copy link
Member

Pull request type

  • Code changes (bugfix, features)
  • Code maintenance (refactoring, formatting, tests)
  • ReadMe, Docs and GitHub updates
  • Other (please describe):

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest --runslow) have passed locally

Current behavior

We know that sometimes it is hard to check if we have correctly defined the rocket before simulating it.
Also, sometimes we just need to ensure that our rocket looks good on RocketPy.

New behavior

Just added a method to draw the entire rocket. You can already try the Rocket.draw() method.

Here the first example:
image

Breaking change

  • Yes
  • No

Additional information

Some comments on the reviewing process:

  • We still need to test the code under different scenarios.
  • I currently don't know if by any chance we could create an unit test that will check if the plot was created correct. Instead, we keep just checking if the method is called without raising any errors.
  • Waiting the review to elaborate some more specific tests, accepting suggestions meanwhile.

@Gui-FernandesBR Gui-FernandesBR added the Enhancement New feature or request, including adjustments in current codes label Sep 25, 2023
@Gui-FernandesBR Gui-FernandesBR added this to the EuRoC 2023 milestone Sep 25, 2023
@Gui-FernandesBR Gui-FernandesBR linked an issue Sep 25, 2023 that may be closed by this pull request
rocketpy/plots/rocket_plots.py Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/rocket/rocket.py Show resolved Hide resolved
@Gui-FernandesBR
Copy link
Member Author

Have you ever wondered if there is something better than "spectacular"?
Well, @MateusStano have found it.

Great Work!! I've been able to debug some rockets thanks to the new implementations.

The only flaw I could find so far is the position of the legend, this is a problem with matplotlib in general.
Avoiding legend overlap is sort of annoying task.

image

@Gui-FernandesBR
Copy link
Member Author

  • we get the following error if the user do not set the rail buttons:

image

Copy link
Member Author

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

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

I would approve if I wasn't the PR's author

@Gui-FernandesBR Gui-FernandesBR merged commit 3b065f7 into develop Oct 7, 2023
9 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the enh/rocket-drawing branch October 9, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let's Rocket.draw it so we can double check our parameters
5 participants