fix show error of cartpolev1
This commit is contained in:
@@ -79,9 +79,14 @@ class BraxEnv(RLEnv):
|
||||
|
||||
print("Total reward: ", reward)
|
||||
|
||||
imgs = image.render_array(
|
||||
sys=self.env.sys, trajectory=state_histories, height=height, width=width, camera="track"
|
||||
)
|
||||
try:
|
||||
imgs = image.render_array(
|
||||
sys=self.env.sys, trajectory=state_histories, height=height, width=width, camera="track"
|
||||
)
|
||||
except ValueError:
|
||||
imgs = image.render_array(
|
||||
sys=self.env.sys, trajectory=state_histories, height=height, width=width
|
||||
)
|
||||
|
||||
if output_type == "rgb_array":
|
||||
imgs = np.array(imgs)
|
||||
|
||||
Reference in New Issue
Block a user