You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm a user looking to use ManiSkill for RL for bimanual manipulation. I'm just testing recording episodes when executing a random policy for the 'TwoRobotPickCube-v1' task like so (following the quickstart notebook):
# to make it look a little more realistic, we will enable shadows which make the default lighting cast shadows
env = gym.make("TwoRobotPickCube-v1", num_envs=4, render_mode="rgb_array", enable_shadow=True)
env = RecordEpisode(
env,
"./videos", # the directory to save replay videos and trajectories to
# on GPU sim we record intervals, not by single episodes as there are multiple envs
# each 100 steps a new video is saved
max_steps_per_video=100
)
# step through the environment with random actions
obs, _ = env.reset()
for i in range(100):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
# env.render_human() # will render with a window if possible
env.close()
from IPython.display import Video
Video("./videos/0.mp4", embed=True, width=640) # Watch the replay
But I run into the following issue:
Traceback (most recent call last):
File "/athenahomes/joo/4yp/rma4rma/troubleshooting/test_mani_skill3.py", line 61, in <module>
obs, _ = env.reset()
^^^^^^^^^^^
File "/users/joo/miniconda3/envs/4YP/lib/python3.11/site-packages/mani_skill/utils/wrappers/record.py", line 367, in reset
action=common.to_numpy(common.batch(action.repeat(self.num_envs, 0))),
^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'repeat'
The text was updated successfully, but these errors were encountered:
hm this is due to the default dictionary action space.
I've seen multiple issues around the fact the action space typically needs to be flattened before use for most algorithms / workflows that I am considering making flat the default.
The dictionary action space was originally designed to support multi agent RL setups.
Hi, I'm a user looking to use ManiSkill for RL for bimanual manipulation. I'm just testing recording episodes when executing a random policy for the 'TwoRobotPickCube-v1' task like so (following the quickstart notebook):
But I run into the following issue:
The text was updated successfully, but these errors were encountered: