Closed qianyi-sun closed 1 year ago
What I know about this is that it occurs when there are already sensors on a vehicle and the sensor and there is an attempt to add the same sensor again.
I suppose this could be fixed by allowing multiple sensors of the same type on a vehicle and then indexing the sensor by the interface & sensor.class. I believe solving this requires addressing #1997.
We note that there is a conflict caused by using VehicleIndex.start_agent_observation
followed by VehicleIndex.switch_control_to_agent
The first sensor additions are done here:
~/SMARTS/examples/control/chase_via_points.py(99)<module>()
-> main(
~/SMARTS/examples/control/chase_via_points.py(73)main()
-> observations = env.reset()
~/SMARTS/examples/rl/platoon/.venv/lib/python3.8/site-packages/gym/wrappers/order_enforcing.py(16)reset()
-> return self.env.reset(**kwargs)
~/SMARTS/smarts/env/hiway_env.py(311)reset()
-> observations = self._smarts.reset(scenario)
~/SMARTS/smarts/core/smarts.py(447)reset()
-> return self._reset(scenario, start_time)
~/SMARTS/smarts/core/smarts.py(510)_reset()
-> observations_for_ego, _, _, _ = self.step({})
~/SMARTS/smarts/core/smarts.py(257)step()
-> return self._step(agent_actions, time_delta_since_last_step)
~/SMARTS/smarts/core/smarts.py(325)_step()
-> actor_capture_manager.step(self)
~/SMARTS/smarts/core/id_actor_capture_manager.py(91)step()
-> vehicle: Optional[Vehicle] = self._take_existing_vehicle(
~/SMARTS/smarts/core/actor_capture_manager.py(113)_take_existing_vehicle()
-> vehicle = sim.switch_control_to_agent(
~/SMARTS/smarts/core/smarts.py(653)switch_control_to_agent()
-> self.vehicle_index.start_agent_observation(
~/SMARTS/smarts/core/utils/cache.py(136)wrapper()
-> return func(self, *args, **kwargs)
~/SMARTS/smarts/core/vehicle_index.py(375)start_agent_observation()
-> Vehicle.attach_sensors_to_vehicle(
~/SMARTS/smarts/core/vehicle.py(466)attach_sensors_to_vehicle()
-> sensor_manager.add_sensor_for_actor(vehicle.id, sensor_name, sensor)
> ~/SMARTS/smarts/core/sensor_manager.py(257)add_sensor_for_actor()
The second set of sensor additions are done here:
~/SMARTS/examples/control/chase_via_points.py(99)<module>()
-> main(
~/SMARTS/examples/control/chase_via_points.py(73)main()
-> observations = env.reset()
~/SMARTS/examples/rl/platoon/.venv/lib/python3.8/site-packages/gym/wrappers/order_enforcing.py(16)reset()
-> return self.env.reset(**kwargs)
~/SMARTS/smarts/env/hiway_env.py(311)reset()
-> observations = self._smarts.reset(scenario)
~/SMARTS/smarts/core/smarts.py(447)reset()
-> return self._reset(scenario, start_time)
~/SMARTS/smarts/core/smarts.py(510)_reset()
-> observations_for_ego, _, _, _ = self.step({})
~/SMARTS/smarts/core/smarts.py(257)step()
-> return self._step(agent_actions, time_delta_since_last_step)
~/SMARTS/smarts/core/smarts.py(325)_step()
-> actor_capture_manager.step(self)
~/SMARTS/smarts/core/id_actor_capture_manager.py(91)step()
-> vehicle: Optional[Vehicle] = self._take_existing_vehicle(
~/SMARTS/smarts/core/actor_capture_manager.py(113)_take_existing_vehicle()
-> vehicle = sim.switch_control_to_agent(
~/SMARTS/smarts/core/smarts.py(656)switch_control_to_agent()
-> vehicle = self.vehicle_index.switch_control_to_agent(
~/SMARTS/smarts/core/utils/cache.py(136)wrapper()
-> return func(self, *args, **kwargs)
~/SMARTS/smarts/core/vehicle_index.py(441)switch_control_to_agent()
-> return self._switch_control_to_agent_recreate(
~/SMARTS/smarts/core/vehicle_index.py(629)_switch_control_to_agent_recreate()
-> self._enfranchise_agent(
~/SMARTS/smarts/core/utils/cache.py(136)wrapper()
-> return func(self, *args, **kwargs)
~/SMARTS/smarts/core/vehicle_index.py(704)_enfranchise_agent()
-> Vehicle.attach_sensors_to_vehicle(
> ~/SMARTS/smarts/core/vehicle.py(466)attach_sensors_to_vehicle()
-> sensor_manager.add_sensor_for_actor(vehicle.id, sensor_name, sensor)
~/SMARTS/smarts/core/sensor_manager.py(257)add_sensor_for_actor()
High Level Description
When running simulation with Argoverse scenarios, during the simulation in some of the scenarios, there's noisy warning appears such as the following, example scenario and corresponding data is attached. scenario_pack.zip
Version
up to date with
master
branchSteps to reproduce the bug
Unzip the attached file, modify the scenario path in the
scenario.py
and start the simulation byscl run
commandSystem info
No response
Error logs and screenshots
Impact (If known)
it doesnt block anything, just a bit messy in the terminal