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.
What
PyFlyt/core/utils/camera_recorder.py(exported asPyFlyt.core.CameraRecorder) saves a drone's existingCameraas a posed image sequence:Also:
examples/core/11_camera_recording.py,tests/test_camera_recorder.py, and a docs page under Core.Why
Posed RGB(-D) sequences are the standard input for visual odometry / SLAM evaluation, NeRF / Gaussian splatting and action-conditioned world-model training. This lets PyFlyt produce them directly.
Design notes
Camera. The pose is recovered by invertingcamera.view_mat, so it follows every camera option (gimbal, tilt, position offset, tracking camera) with no duplicated logic.Cameraitself is unchanged.(W/2, H/2 - 1)rather than((W-1)/2, (H-1)/2)(measured). The recorder always renders withER_TINY_RENDERER, so intrinsics are identical withrender=True/False, and the shift is corrected inintrinsics.txt.zlib/structfrom the standard library.Tests
tests/test_camera_recorder.py(7 tests):use_camerais rejected; a short flight yields one valid PNG per pose with increasing timestamps.pytest tests/test_core.py tests/test_camera_recorder.py: 18 passed. black / isort / flake8 / pydocstyle / codespell / pyright (1.1.347) clean on the new files.Two things I noticed (not changed here, happy to open issues)
camera_angle_degreestilts the camera down (optical-axis z-component is −0.342 at +20°), while theCameradocstring describes it as an up-tilt.