ignc-research / arena-rosnav

GNU General Public License v2.0
144 stars 54 forks source link

[error] Training on the GPU Server #62

Open AbelSyx opened 2 years ago

AbelSyx commented 2 years ago

Your work is very good. When I follow the tutorial “Training on the GPU Server”, I encountered some problems. Now I execute the following code: python scripts/training/train_agent.py --load pretrained_ppo_mpc --n_envs 24 --eval_log But, It reminds me that the observation space does not match. The detailed error information is as follows:

(sim_3) Stage 1: Spawning 6 static and 0 dynamic obstacles!
/home/server/python_env/rosnav/lib/python3.8/site-packages/gym/spaces/box.py:73: UserWarning: WARN: Box bound precision lowered by casting to float32
  logger.warn(
(sim_4) Stage 1: Spawning 6 static and 0 dynamic obstacles!
Traceback (most recent call last):
  File "scripts/training/train_agent.py", line 217, in <module>
    main()
  File "scripts/training/train_agent.py", line 189, in main
    model = PPO.load(os.path.join(PATHS["model"], AGENT_NAME), env)
  File "/home/server/workspace/arena3D_ws/src/forks/stable-baselines3/stable_baselines3/common/base_class.py", line 628, in load
    check_for_correct_spaces(env, data["observation_space"], data["action_space"])
  File "/home/server/workspace/arena3D_ws/src/forks/stable-baselines3/stable_baselines3/common/utils.py", line 207, in check_for_correct_spaces
    raise ValueError(f"Observation spaces do not match: {observation_space} != {env.observation_space}")
ValueError: Observation spaces do not match: Box([ 0.         0.         0.         0.         0.         0. .............

I hope you can give me some suggestions. Thank you!