Repository navigation
Record viewport videos with Isaac Lab's video recorder - #1774
Draft
cvolkcvolk wants to merge 1 commit into
Draft
cvolkcvolk wants to merge 1 commit into
cvolkcvolk wants to merge 1 commit into
Conversation
--record_viewport_video has written no video since Arena moved to Isaac Lab 3.0. wrap_env_for_video wrapped the env in gymnasium's RecordVideo, which reads frames from env.render(), and Isaac Lab now returns None there for render_mode="rgb_array". The Run still reported completed. add_viewport_video_recorder adds a VideoRecorderCfg that records the Kit viewer to the env config before the env is made. The env records every step, and env.close() writes the clip. wrap_env_for_video keeps the step timer and the camera recorder. The Kit capture runs through Replicator, so --record_viewport_video now enables camera support and requires --viz kit, which opens no window when DISPLAY is unset. The OSMO task passes --viz kit when it records the viewport. Each rebuild writes viewport-rebuild<i>_0000.mp4. Signed-off-by: Clemens Volk <[email protected]>
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.
Fix
--record_viewport_video, which has written no video since Arena moved to Isaac Lab 3.0. The Kit viewer is now recorded by Isaac Lab'sVideoRecorder, configured on the env config.Why this change?
wrap_env_for_videowrapped the env in gymnasium'sRecordVideo, which reads frames fromenv.render(). In Isaac Lab 3.0,ManagerBasedRLEnv.render()returnsNoneforrender_mode="rgb_array"and points toVideoRecorderCfgonenv_cfg.video_recordersinstead.RecordVideostops with a warning, and the Run still reportscompleted.This affects
experiment_runner.py,policy_runner.py, the OSMOrecord_viewport_videooption, and the review GUI's sim preview, which raisesexpected one viewport video, found 0.What changes?
add_viewport_video_recorderadds aVideoRecorderCfg(source="visualizer:kit")to the env config before the env is made. The env records every step, andenv.close()writes the clip.wrap_env_for_videokeeps only the step timer and the camera recorder.--record_viewport_videorequires--viz kitand asserts it. Kit opens no window whenDISPLAYis unset. The flag also enables camera support, because the Kit visualizer captures frames through Replicator. It does not add the environment's cameras. The OSMO task passes--viz kitwhen it records the viewport.viewport-rebuild<i>_0000.mp4to the Run directory, andpolicy_runner.pywritesviewport_0000.mp4.rl-video-step-0.mp4file that v0.4 never wrote. It now says v0.4 writes no viewport video, and the v0.5 guide lists the fix.Limitations:
KitVisualizer.render_rgb_arrayreturns a blank frame while RTX warms up.sim_steptimer includes the frame captures, because they now run insideenv.step.Validation
pick_and_place_maple_tablewithexperiment_runner.py(45 steps, 45 frames) andpolicy_runner.py(20 steps, 20 frames) in Docker withDISPLAYunset, and checked the frames.