huawei-noah / SMARTS

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

Set constant initial position of agents for a chosen scenario #1472

Closed zangobot closed 1 year ago

zangobot commented 2 years ago

High Level Description We would like to setup the initial position of reinforcement learning agents inside a chosen scenario, so that simulations always start in the same way from one run to the other.

Desired SMARTS version 0.6.1rc1

Operating System Ubuntu, Docker

Problems We are unable to browse the documentation and code to find the intended behavior.

sah-huawei commented 2 years ago

Hello @zangobot : Have you tried passing the ego_missions argument when creating your Scenario within your scenario.py?

For one example of this, you can look at scenario.py in the 4lane_t scenario. (See scenarios/sumo/intersections/4lane_t.)

It may also be helpful to know that the full set of options/types you are able to use within a scenario.py is documented in smarts/sstudio/types.py. Or, if you'd prefer to browse the docstrings there s html using a web browser, you can follow the instructions in the README.md file in the docs folder.

Please let us know more if these instructions do not work for you. I am unclear about what you meant when you wrote that you were "... unable to browse the documentation and code...". If there's a problem generating the doc files, maybe we can help you work around it.

zangobot commented 1 year ago

Sorry, I did not test it yet, but I don't know when I could do it right now. It is better to close the issue now as you did, thank you again!