Replies: 2 comments 8 replies
-
|
It seems that the slowdown you are experiencing might be due to the use of the # If you are currently using this line:
# env = safety_gymnasium.make('SafetyPointCircle0-v0', render_mode='human')
# Replace it with this:
env = safety_gymnasium.make('SafetyPointCircle0-v0')This change should help in running the environment without rendering, which typically speeds up the process. Let us know if this resolves the issue or if you need further assistance! |
Beta Was this translation helpful? Give feedback.
-
|
Additionally, I noticed that your title mentions 'reconstruction'. I'm wondering if you're experiencing slow reset speeds. This is due to the design mechanism of the Navigation environment's code. However, currently, most Navigation environments do not encounter 'Terminated=True', meaning they would only reset once every 1000 steps. In a 1e6 step scenario, this would amount to only about 1000 resets. At present, this impact on performance is not critical, but we do plan to gradually optimize it in future versions. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,I'm a new beginner of the safety_gymnasium,and I'm starting with this code:
import safety_gymnasium
env = safety_gymnasium.make('SafetyPointCircle0-v0', render_mode='human')
obs, info = env.reset()
Set seeds
obs, _ = env.reset(seed=0)
terminated, truncated = False, False
ep_ret, ep_cost = 0, 0
while True:
assert env.observation_space.contains(obs)
act = env.action_space.sample()
assert env.action_space.contains(act)
# modified for Safe RL, added cost
obs, reward, cost, terminated, truncated, info = env.step(act)
ep_ret += reward
ep_cost += cost
if terminated or truncated:
observation, info = env.reset()
However, I found that the running speed of this code is extremely slow compared to the environment in gymnasium. Is there any solution or is this phenomenon normal?
Beta Was this translation helpful? Give feedback.
All reactions