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 testing for human rendering, default_cam_config option in kwargs for customization #94

Conversation

elliottower
Copy link
Contributor

@elliottower elliottower commented Jun 16, 2023

Addresses an issue raised in #90

We could also add something that tests video recording like in #15 just to ensure things still work, but probably not as important (ensuring human rendering works in this PR is much more important imo).

Only downside is some things need manual validation to see if the rendering kwargs actually do the right thing, and if the scene is frozen, but at the very least this ensures that the human rendering does work and that the args go through correctly, and makes it extremely easy for us to go through and check that things work (for example for troubleshooting the gymnasium mujoco rendering issue we hypothesized in that issue)

Got a little distracted digging into the mujoco rendering and then saw that you can specify the default_cam_config, so I tried that and thought well this is probably something users would want to be able to control, so I added that as well. Fixed a few little nitpicks like missing periods in the docstrings as well.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue), Depends on # (pull request)

Type of change

Please delete options that are not relevant.

  • 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

Screenshots

Please attach before and after screenshots of the change if applicable.
To upload images to a PR -- simply drag and drop or copy paste.

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • 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

"distance,elevation",
[(2.0, -45), (10.0, -45), (1.0, -45), (2.0, 45), (10.0, 45), (1.0, 45)],
)
def test_render_human_default_cam_config(distance, elevation):

Choose a reason for hiding this comment

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

Im a bit confused by this test, what are we testing and how?
We are not testing that any value is equal to something or an event happens.
Just that some code runs with particular kwargs, no where testing that this does an expected thing

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.

2 participants