Closed ll7 closed 2 years ago
...
2022-03-02 09:41:13,450 [DEBUG] stabel_baselines3 env_checker
/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/site-packages/stable_baselines3/common/env_checker.py:131: UserWarning: Your observation has an unconventional shape (neither an image, nor a 1D vector). We recommend you to flatten the observation to have only a 1D vector or use a custom policy to properly process the data.
f"Your observation {key} has an unconventional shape (neither an image, nor a 1D vector). "
2022-03-02 09:41:13,455 [DEBUG] spawning walker at Location(x=392.470001, y=19.920038, z=0.300000)
2022-03-02 09:41:13,456 [DEBUG] created walker.pedestrian.0012
2022-03-02 09:41:13,456 [DEBUG] distance from spawn point: 392.975341796875
WARNING: sensor object went out of the scope but the sensor is still alive in the simulation: Actor 200 (sensor.camera.semantic_segmentation)
2022-03-02 09:41:13,457 [DEBUG] created sensor.camera.semantic_segmentation
2022-03-02 09:41:13,457 [DEBUG] render per default during init
2022-03-02 09:41:13,457 [DEBUG] rendering
2022-03-02 09:41:13,461 [DEBUG] tick in reset
2022-03-02 09:41:13,461 [DEBUG] taking step
Backend QtAgg is interactive backend. Turning interactive mode on.
2022-03-02 09:41:13,529 [DEBUG] === creating observation ===
2022-03-02 09:41:13,534 [DEBUG] image saved to disk
2022-03-02 09:41:13,534 [DEBUG] === observation created ===
2022-03-02 09:41:13,587 [DEBUG] === creating observation ===
2022-03-02 09:41:13,593 [DEBUG] image saved to disk
2022-03-02 09:41:13,594 [DEBUG] === observation created ===
Traceback (most recent call last):
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/luttkule/.vscode-insiders/extensions/ms-python.python-2022.0.1814523869/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/home/luttkule/.vscode-insiders/extensions/ms-python.python-2022.0.1814523869/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
run()
File "/home/luttkule/.vscode-insiders/extensions/ms-python.python-2022.0.1814523869/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/luttkule/git/carla-rl/carla-test/test_carla_env.py", line 49, in <module>
main()
File "/home/luttkule/git/carla-rl/carla-test/test_carla_env.py", line 43, in main
env_checker.check_env(env)
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/site-packages/stable_baselines3/common/env_checker.py", line 283, in check_env
_check_returned_values(env, observation_space, action_space)
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/site-packages/stable_baselines3/common/env_checker.py", line 172, in _check_returned_values
_check_obs(obs, observation_space, "step")
File "/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/site-packages/stable_baselines3/common/env_checker.py", line 110, in _check_obs
assert isinstance(obs, np.ndarray), f"The observation returned by `{method_name}()` method must be a numpy array"
AssertionError: The observation returned by `step()` method must be a numpy array
Problem was the sequence of the return values of the step function. has to be observation, reward, done, info.
see https://stable-baselines3.readthedocs.io/en/master/guide/custom_env.html
new problem
2022-03-02 12:04:51,054 [DEBUG] stabel_baselines3 env_checker
/home/luttkule/anaconda3/envs/carla-rl-py37-c13/lib/python3.7/site-packages/stable_baselines3/common/env_checker.py:131: UserWarning: Your observation has an unconventional shape (neither an image, nor a 1D vector). We recommend you to flatten the observation to have only a 1D vector or use a custom policy to properly process the data.
f"Your observation {key} has an unconventional shape (neither an image, nor a 1D vector). "
2022-03-02 12:04:51,059 [DEBUG] spawning walker at Location(x=395.959991, y=249.429993, z=0.300000)
2022-03-02 12:04:51,076 [DEBUG] created walker.pedestrian.0012
WARNING: sensor object went out of the scope but the sensor is still alive in the simulation: Actor 220 (sensor.camera.semantic_segmentation)
change init to create walker and sensor and reset to only move the walker to a new location.