Skip to content

Commit

Permalink
extra vid frames (#86)
Browse files Browse the repository at this point in the history
* extra vid frames

* good to go
  • Loading branch information
NishanthJKumar authored Nov 2, 2023
1 parent c4e38c0 commit 980026d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions predicators/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from typing import List, Optional, Sequence, Tuple

import dill as pkl
import numpy as np

from predicators import utils
from predicators.approaches import ApproachFailure, ApproachTimeout, \
Expand Down Expand Up @@ -391,6 +392,14 @@ def _run_testing(env: BaseEnv, approach: BaseApproach) -> Metrics:
total_suc_time += (solve_time + exec_time)
make_video = CFG.make_test_videos
video_file = f"{save_prefix}__task{test_task_idx+1}.mp4"
if CFG.env == "behavior": # pragma: no cover
assert isinstance(env, BehaviorEnv)
# Step the environment with a dummy action a few
# times so that video making doesn't get abruptly
# cut off.
for _ in range(25):
env.igibson_behavior_env.step(
np.zeros(env.igibson_behavior_env.action_space.shape))
else:
if not caught_exception:
log_message = "Policy failed to reach goal"
Expand Down

0 comments on commit 980026d

Please sign in to comment.