You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/simulators.rst
+14-4
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,16 @@ See the individual entries for details on each interface's capabilities and how
16
16
Currently Supported
17
17
===================
18
18
19
-
Built-in MetaDrive Simulator
19
+
MetaDrive (Optional)
20
20
----------------------------
21
21
22
-
Scenic includes the `MetaDrive <https://metadriverse.github.io/metadrive/>`_ simulator as a built-in tool, enabling users to describe dynamic simulations of vehicles, pedestrians, and traffic scenarios without the need for separate installation.
22
+
Scenic supports integration with the `MetaDrive <https://metadriverse.github.io/metadrive/>`_ simulator as an optional dependency,
23
+
enabling users to describe dynamic simulations of vehicles, pedestrians, and traffic scenarios.
24
+
If your system supports it, you can install it with:
25
+
26
+
.. code-block:: console
27
+
28
+
pip install scenic[metadrive]
23
29
24
30
Scenic supports both 2D and 3D rendering modes for MetaDrive simulations.
25
31
2D rendering is available on all systems, providing a top-down view.
@@ -29,12 +35,16 @@ These issues are expected to be addressed in the next version of MetaDrive.
29
35
30
36
Scenic uses OpenDRIVE maps, while MetaDrive relies on SUMO maps. Scenic provides corresponding SUMO maps for OpenDRIVE maps under the :file:`assets/maps/CARLA` directory.
31
37
Additionally, you can convert your own OpenDRIVE maps to SUMO maps using the `netconvert <https://sumo.dlr.de/docs/Networks/Import/OpenDRIVE.html/>`_ tool.
38
+
To avoid setting the SUMO map manually, name it the same as your OpenDRIVE file.
39
+
Otherwise, specify it explicitly with:
40
+
41
+
.. code-block:: console
42
+
43
+
--param sumo_map your_map.net.xml
32
44
33
45
The simulator is compatible with scenarios written using Scenic's :ref:`driving_domain`.
34
46
For more information, refer to the documentation of the `scenic.simulators.metadrive` module.
35
47
36
-
Examples using the MetaDrive interface can be found in the :file:`examples/metadrive directory`.
Copy file name to clipboardExpand all lines: docs/tutorials/dynamics.rst
+13-4
Original file line number
Diff line number
Diff line change
@@ -396,8 +396,18 @@ You can see all of the above syntax in action by running some of our examples of
396
396
scenarios. We have examples written for the CARLA and LGSVL driving simulators, and those
397
397
in :file:`examples/driving` in particular are designed to use Scenic's abstract
398
398
:ref:`driving domain <driving_domain>` and so work in either of these simulators, as well
399
-
as Scenic's built-in MetaDrive and Newtonian physics simulator. While the Newtonian simulator is convenient
400
-
for testing and simple experiments, we recommend using MetaDrive for more realistic driving scenarios. You can find details on these simulators and how to install them on
399
+
as Scenic's built-in Newtonian physics simulator and MetaDrive simulator. While the Newtonian simulator is convenient
400
+
for testing and simple experiments, we recommend using MetaDrive for more realistic driving scenarios.
401
+
402
+
MetaDrive support is **optional**. If your system supports MetaDrive, you can install it separately using:
403
+
404
+
.. code-block:: console
405
+
406
+
pip install scenic[metadrive]
407
+
408
+
If MetaDrive is **not available**, we recommend using the Newtonian simulator instead.
409
+
410
+
You can find details on these simulators and how to install them on
401
411
our :ref:`simulators` page.
402
412
403
413
Let's try running
@@ -414,7 +424,7 @@ To run dynamic simulations, add the :option:`--simulate` option (:option:`-S` fo
414
424
Since this scenario is not written for a particular simulator, you'll need to specify
415
425
which one you want by using the :option:`--model` option (:option:`-m` for short) to
416
426
select the corresponding Scenic :term:`world model`: for example, to use the Metadrive simulator we could add
417
-
``--model scenic.simulators.metadrive.model`` and include the ``--param sumo_map`` option with the corresponding SUMO map for the OpenDRIVE map you are using.
427
+
``--model scenic.simulators.metadrive.model``.
418
428
It's also a good idea to put a time bound on the simulations, which we can do using the :option:`--time` option.
419
429
420
430
.. code-block:: console
@@ -423,7 +433,6 @@ It's also a good idea to put a time bound on the simulations, which we can do us
0 commit comments