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

Add width and height check for MujocoRenderer #1230

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

Beanpow
Copy link
Contributor

@Beanpow Beanpow commented Oct 23, 2024

Description

The width and height of OffScreenViewer cannot be None otherwise, it will cause the error. Adding a type check before creating the opengl_context could provide more information for debugging.

Fixes #1225

Type of change

Please delete options that are not relevant.

  • Documentation only change (no code changed)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Beanpow
Copy link
Contributor Author

Beanpow commented Oct 23, 2024

@Kallinteris-Andreas could you review this code?

@Beanpow Beanpow marked this pull request as ready for review October 24, 2024 10:26
Copy link
Collaborator

@Kallinteris-Andreas Kallinteris-Andreas left a comment

Choose a reason for hiding this comment

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

will be merged after #1229

gymnasium/envs/mujoco/mujoco_rendering.py Outdated Show resolved Hide resolved
gymnasium/envs/mujoco/mujoco_rendering.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Kallinteris-Andreas Kallinteris-Andreas left a comment

Choose a reason for hiding this comment

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

LGTM I will merge after #1229 , @Beanpow you may need to do a merge then,

@pseudo-rnd-thoughts
Copy link
Member

@Kallinteris-Andreas are you sure we can't merge now?

@Kallinteris-Andreas Kallinteris-Andreas merged commit 137be19 into Farama-Foundation:main Oct 25, 2024
13 checks passed
@Beanpow Beanpow deleted the render_check branch October 25, 2024 13:09
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.

[Proposal] Add the width and height check of the OffScreenViewer
3 participants