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
Attached my current Env and training script
It throws me an error: AttributeError: 'JetBotEnv' object has no attribute 'observation_spaces'
``
However, when i remove the following (as from my understanding it's used for MAPPO):
self._shared_observation_space = self._compute_shared_observation_space(self._env.observation_spaces)
def _compute_shared_observation_space(self, observation_spaces):
space = next(iter(observation_spaces.values()))
shape = (len(self.possible_agents),) + space.shape
return gymnasium.spaces.Box(low=np.stack([space.low for _ in self.possible_agents], axis=0),
high=np.stack([space.high for _ in self.possible_agents], axis=0),
dtype=space.dtype,
shape=shape)
I get this error:
Traceback (most recent call last): File "torch_isaacsim_jetbot_ippo.py", line 75, in <module> models[agent_name]["policy"] = Policy(env.observation_space(agent_name), env.action_space(agent_name), device) File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/base.py", line 254, in observation_space return self.observation_spaces[agent] File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/pettingzoo_envs.py", line 41, in observation_spaces return {uid: self._env.observation_space(uid) for uid in self.possible_agents} File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/pettingzoo_envs.py", line 41, in <dictcomp> return {uid: self._env.observation_space(uid) for uid in self.possible_agents} TypeError: 'Box' object is not callable
Please let me know what im doing wrong here :)
Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to expand the current example in https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_rl_stable_baselines.html to become 2 robots Jetbot and Jebot1 to move to each box of their own
Attached my current Env and training script
It throws me an error: AttributeError: 'JetBotEnv' object has no attribute 'observation_spaces'
``
However, when i remove the following (as from my understanding it's used for MAPPO):
I get this error:
Traceback (most recent call last): File "torch_isaacsim_jetbot_ippo.py", line 75, in <module> models[agent_name]["policy"] = Policy(env.observation_space(agent_name), env.action_space(agent_name), device) File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/base.py", line 254, in observation_space return self.observation_spaces[agent] File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/pettingzoo_envs.py", line 41, in observation_spaces return {uid: self._env.observation_space(uid) for uid in self.possible_agents} File "/home/marty/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/api/omni.isaac.jetbot/skrl_example/src/skrl/skrl/envs/wrappers/torch/pettingzoo_envs.py", line 41, in <dictcomp> return {uid: self._env.observation_space(uid) for uid in self.possible_agents} TypeError: 'Box' object is not callable
Please let me know what im doing wrong here :)
Thanks
Jetbot_IPPO.zip
Beta Was this translation helpful? Give feedback.
All reactions