Skip to content

Support configurable camera FOV and large observations - #65

Open
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/configurable-camera-rendering
Open

Support configurable camera FOV and large observations#65
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/configurable-camera-rendering

Conversation

@eust-w

@eust-w eust-w commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • add an optional vertical field of view to CameraConfig
  • apply configured FOV values to the MuJoCo camera model
  • expand MuJoCo's offscreen framebuffer before renderer initialization when an
    observation camera requests a larger resolution
  • add rendering regressions for custom FOV and observations wider than the
    default 640-pixel framebuffer

Why

Camera position and orientation are configurable, but field of view currently
is not. In addition, mujoco.Renderer rejects observation widths or heights
larger than model.vis.global_.offwidth or offheight; the default width is
typically 640, so common camera modes such as 848-pixel RGB fail during
environment initialization.

Sizing the framebuffer from the configured cameras keeps existing defaults for
small observations while allowing larger camera streams without requiring XML
changes.

Compatibility

fovy is optional and existing camera metadata remains valid. The framebuffer
only grows when required and is set before both BiGym and observation renderers
are initialized.

Validation

  • pre-commit run --files bigym/utils/observation_config.py bigym/bigym_env.py tests/test_observations.py CHANGELOG.md
  • pytest -q tests/test_observations.py (12 passed)
  • git diff --check

Supersedes #60 after the source branch was renamed to remove the agent/ prefix.

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.

1 participant