Skip to content

Update AnimationConfig: remove the static flag and keeping only static_frame_idx#45

Merged
Tviskaron merged 7 commits intoCognitive-AI-Systems:mainfrom
Jiaxi-Huang:main
Jan 18, 2026
Merged

Update AnimationConfig: remove the static flag and keeping only static_frame_idx#45
Tviskaron merged 7 commits intoCognitive-AI-Systems:mainfrom
Jiaxi-Huang:main

Conversation

@Jiaxi-Huang
Copy link
Contributor

Update AnimationConfig:

class AnimationConfig:
    directory: str = 'renders/'
    show_agents: bool = True
    egocentric_idx: typing.Optional[int] = None
    static_frame_idx: typing.Optional[int] = None
    uid: typing.Optional[str] = None
    save_every_idx_episode: typing.Optional[int] = 1
    show_grid_lines: bool = True

Test Code

from pogema import pogema_v0, AnimationMonitor, AnimationConfig

env = AnimationMonitor(pogema_v0())
env.reset()
env = AnimationMonitor(env)
obs, info = env.reset()

terminated = truncated = [False, ...]

while not all(terminated) and not all(truncated):
	# Use random policy to make actions
	obs, reward, terminated, truncated, info = env.step([env.action_space.sample()])

env.save_animation("render-01.svg", AnimationConfig(static_frame_idx=0))
env.save_animation("render-02.svg", AnimationConfig(static_frame_idx=None))
env.save_animation("render-03.svg", AnimationConfig(egocentric_idx=0, static_frame_idx=None))
env.save_animation("render-04.svg", AnimationConfig(egocentric_idx=0, static_frame_idx=0))

@Tviskaron Tviskaron merged commit a09cad4 into Cognitive-AI-Systems:main Jan 18, 2026
7 checks passed
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