Repository navigation
Conversation
This branch has not been deployed
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.
Uploading through the GitHub website. Make branch
fix/camera-and-wind-exampleswith the first upload, then upload the rest to the same branch, one folder at a time, with these commit messages. Each upload replaces the existing file.examples/core/04_camera.py:examples: fix camera example for camera_angle_degreesexamples/core/10_custom_wind.py:examples: fix custom wind example for np.random.GeneratorPyFlyt/core/abstractions/base_wind_field.py:core: use standard_normal in the WindFieldClass docstring exampledocs_source/documentation/core/wind.md:docs: document np_random as an np.random.Generatordocs_source/documentation/core/abstractions/base_drone.md:docs: document np_random as an np.random.Generator on the drone pageDescription
Two of the core examples fail on the current code.
examples/core/04_camera.py(#71) still passescamera_angle, whichQuadXrenamed tocamera_angle_degrees:camera_angle_degrees.examples/core/10_custom_wind.pycallsself.np_random.randn(). The Aviary passes wind fields annp.random.Generator(np.random.default_rng()), which has norandn, so the example fails on its first step:standard_normal(wind.shape).WindFieldClassdocstring, which the wind docs page shows as the custom wind example, so that line is updated too.np_randomasnp.random.RandomState. They now saynp.random.Generator, which matches the type hints inWindFieldClassandDroneClass.Fixes #71
Testing
Run on Linux under xvfb with Python 3.12, numpy 1.26.4, pybullet 3.2.7 and matplotlib, with
plt.show()saving the figure:examples/coreonmaster.04_camera.pyand10_custom_wind.pyfailed with the errors above, and the other eight ran to completion. With this PR, both run to completion:10_custom_wind.pyruns all 1000 steps.pyright, which reports gymnasium 1.4spaces.Dicttyping errors in other files onmastertoo.