huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
944 stars 190 forks source link

[Bug Report] traffic_histories_to_observations.py crashes #2005

Closed qianyi-sun closed 1 year ago

qianyi-sun commented 1 year ago

High Level Description

python smarts/dataset/traffic_histories_to_observations.py ~/driving-smarts-2.competition-scenarios/t3/test/0202affc-cf2b-451e-a170-3ededd46e88f_agents_1/ -o ~/driving-smarts-2.competition-scenarios/t3/test/0202affc-cf2b-451e-a170-3ededd46e88f_agents_1/ -v 59981
WARNING:Client:Connection to Envision failed with: [Errno 111] Connection refused.  Try using `--headless` if not using Envision server.
Using configuration from: /home/kyber/SMARTS/smarts/engine.ini
Traceback (most recent call last):
  File "smarts/dataset/traffic_histories_to_observations.py", line 432, in <module>
    recorder.collect(args.vehicles_with_sensors, headless=args.headless)
  File "smarts/dataset/traffic_histories_to_observations.py", line 263, in collect
    self._record_data(
  File "smarts/dataset/traffic_histories_to_observations.py", line 340, in _record_data
    obs, _ = self._smarts.observe_from(list(valid_vehicles), self.agent_interface)
  File "/home/kyber/SMARTS/smarts/core/smarts.py", line 964, in observe_from
    return self.sensor_manager.observe_batch(
  File "/home/kyber/SMARTS/smarts/core/sensor_manager.py", line 145, in observe_batch
    ) = Sensors.observe_vehicle(
  File "/home/kyber/SMARTS/smarts/core/sensors/__init__.py", line 494, in observe_vehicle
    safe_obs, dones, updated_safe_sensors = cls.process_serialization_safe_sensors(
  File "/home/kyber/SMARTS/smarts/core/sensors/__init__.py", line 426, in process_serialization_safe_sensors
    done, events = Sensors._is_done_with_events(
  File "/home/kyber/SMARTS/smarts/core/sensors/__init__.py", line 575, in _is_done_with_events
    done_criteria = interface.done_criteria
AttributeError: 'NoneType' object has no attribute 'done_criteria'
Exception ignored in: <function BulletClient.__del__ at 0x7f232c1c90d0>
Traceback (most recent call last):
  File "/home/kyber/SMARTS/examples/rl/platoon/.venv/lib/python3.8/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
TypeError: catching classes that do not inherit from BaseException is not allowed

Version

latest master branch

Steps to reproduce the bug

No response

System info

No response

Error logs and screenshots

No response

Impact (If known)

No response