Autonomous driving environment for generalization
- Eclipse SUMO: Version 1.15.0
- Install SUMO from https://sumo.dlr.de/docs/Downloads.php.
- Make sure to configure
PYTHONPATHandSUMO_HOMEproperly. On Windows, if installing from an installer, this should have been added automatically. On Linux, modify~/.bashrcwithexport PYTHONPATH=$PYTHONPATH:/usr/share/sumo/tools export SUMO_HOME=/usr/share/sumo
NOTE: idSim assumes conda-forge as the default channel. You should do either of the following:
- Set
conda-forgeas the default channel in.condarc; - Add
--channel conda-forge --override-channelsoption in every idSim-relatedconda {create|install}command.
conda create -n idsim python=3.9 numpy pandas 'shapely>=2' omegaconf typing_extensions 'cython>=3' libbezier
conda activate idsim
pip install . --no-build-isolation
# Or editable install:
# pip install -e . --no-build-isolation --config-settings editable_mode=strict- Run
scripts/generate_scenarios.pyto create scenario files idsim.envs.envcontains a Gymnasium-like environment: CrossRoad
If you are using vscode on Linux, add the following snippet to .vscode/settings.json
Some rare logic error may take a long time to occur once.
To capture this, we use try ... except ... in _step_simulator to dump relevant information.
You could find this information in <system temp folder>/idsim-... folder (the path will be shown in error message).
Inside the folder, the info.pkl pickle file contains config, the latest context and the last run's engine seed.
The sumo_state.xml stores sumo state which may be loaded in sumo-gui for further debugging.
The config and context contain platform-dependent Path object, which prevents loading on a different platform.
To workaround this, monkey-patch e.g.
import pathlib
pathlib.PosixPath = pathlib.WindowsPath # On windowsbefore loading.
Load info.pkl, evaluate info['context'].configuration_file.
Load corresponding sumocfg in sumo-gui, choose Simulation -> Load to load sumo_state.xml.
When debugging Python, simulationStep called after moveToXY could freeze sumo GUI. Either:
- Halt the simulation (either manually or with a SUMO breakpoint) when approaching the instant you want to debug, and single-step in sumo GUI; or
- Already debugging, before ANY interaction with sumo GUI, click
Halt the simulationbutton first
-
Add traffic light observation | Now with a prototype
-
Reward design, mainly collision related
-
Trajectory/lane selection
-
Driving area boundary observation | Via lidar
-
Add surrounding vehicle
-
General & random traffic flow generation | Now with a prototype, improve flow-based, randomness, avoid traffic jam
-
Improve navigation, v_ref, regulation, tls
-
Sensor modeling
-
Fine-grained task requirements: turning direction, etc.
-
Unit test on some fundemantal logics
-
Dump & Replay
-
More general teleport (e.g., keyboard takeover for Experiment) (or REPL) | Basic support, usability blocked by #eclipse/sumo/10974
-
Performance optimization
-
More robust checks | Via shapely
-
Recheck render clean-up logic (e.g. close before step) | Via
singleton_mode -
Test
moveToXYargumentkeepRoute=0b010/0b011| UsekeepRoute=0b011is more suitable -
Investigate sumo load state ego vehicle disappear | Maybe related to
keepRoute=0b010, recheck if happened again -
Subscribe person information (if native collision not working) | Subscribed with libsumo workaround
-
moveToXYedge and lane | Currently unnecessary as we do not have overlapping roads (e.g. bridge) -
Role of
--lateral-resolution| May not be important at present, choosing the same aslane_width -
Investigate huge start/load slowdown after adding pedestrian at 5ba79c2 (220 it/s -> 7.5 it/s) | Seems pedestrian leads to this slowdown
-
Investigate Sumo native collision detection not working, check
--collision.check-junctions| Remote controlled vehicle collision detection not working in junction, see #eclipse/sumo/10952; fixed with eclipse/sumo/3938188 -
Out-of-lane vehicle using moveToXY cause sumo-gui freeze when not calling simulationStep continuously | See #eclipse/sumo/10974
-
| Not a sumo bug,convertRoadwithvClassproduces wrong result near crossingvClassargument passed to wrong locationisGeo -
moveToXY failure at parallel internal junction (prevent 3-way 3-lane intersection) | See #eclipse/sumo/12065, may be released in 1.16.0
{ // ... "python.analysis.extraPaths": [ "/usr/share/sumo/tools" ], // ... }