Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The Scenic tool and example scenarios have benefitted from additional code contr
* Abolfazl Karimi
* Kevin Li
* Guillermo López
* Lola Marrero
* Shalin Mehta
* Joel Moriana
* Gaurav Rao
Expand Down
37 changes: 37 additions & 0 deletions docs/new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,43 @@ It also features a new parser enabling clearer error messages, greater language

See :ref:`porting to Scenic 3` for tools to help migrate existing 2D scenarios.

Scenic 3.1.0
------------

Major new features:

* New MetaDrive simulator interface for running Scenic scenarios in MetaDrive (see :mod:`scenic.simulators.metadrive`).

* Added a new experimental sensors API with support for CARLA and MetaDrive (see :ref:`Sensors Reference <sensors>`).

* Extended the :keyword:`record` statement to support saving time-series data directly to files via the ``to`` clause, see :ref:`recordFolder` for details.

* Introduced :ref:`wait for <wait for {scalar} (seconds | steps)>` and :ref:`wait until <wait until {boolean}>`, which work like :ref:`do ... for <do {behavior/scenario}, {...} for {scalar} (seconds | steps)>` and :ref:`do ... until <do {behavior/scenario}, {...} until {boolean}>` but advance the scenario without taking any actions.

Minor new features:

* Improved Scenic support for ``str``/``int``/``float`` conversions and type checking; these names are now reserved and can't be reassigned.

* Added a :prop:`render` property to :class:`~scenic.core.object_types.Object` to let objects opt out of the internal visualizer, and fixed handling of face colors for object meshes.

* Improved visual accuracy in the Newtonian physics simulator and added a ``debugRender`` visualization option (see :mod:`scenic.simulators.newtonian.driving_model`).

* Added support for Python 3.13.

* :class:`~scenic.simulators.carla.actions.SetAutopilotAction` now accepts optional CARLA Traffic Manager settings (ignoring signs/lights/walkers, automatic lane changes, target speed/route, and speed-limit offsets).

* Added pedestrian movement support in the Newtonian physics simulator.

* Expanded tested compatibility with CARLA to include version 0.9.16 (Scenic has been tested with CARLA 0.9.9–0.9.16).

* Added :meth:`Network.shoulderAt <scenic.domains.driving.roads.Network.shoulderAt>` and :meth:`Network.sidewalkAt <scenic.domains.driving.roads.Network.sidewalkAt>`, updated :meth:`Network.elementAt <scenic.domains.driving.roads.Network.elementAt>` to return shoulders and sidewalks, and added a ``showCurbArrows`` option to :meth:`~scenic.domains.driving.roads.Network.show` for visualizing curb orientation in 2D plots.

Notable bug fixes:

* Fixed :meth:`Network.roadDirection <scenic.domains.driving.roads.Network.roadDirection>` and :meth:`Network.nominalDirectionsAt <scenic.domains.driving.roads.Network.nominalDirectionsAt>` so objects on shoulders or inside intersections inherit the correct maneuver heading instead of defaulting to 0.

* Fixed the default :prop:`velocity` of :class:`~scenic.core.object_types.Object` so it now derives from :prop:`speed` and :prop:`orientation`, as previously documented, instead of always being :scenic:`(0, 0, 0)`.

Scenic 3.0.0
------------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scenic"
version = "3.1.0a1"
version = "3.1.0"
description = "The Scenic scenario description language."
authors = [
{ name = "Daniel Fremont" },
Expand Down
2 changes: 2 additions & 0 deletions src/scenic/core/object_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,8 @@ class Object(OrientedPoint):
An optional color (with optional alpha) property that is used by the internal
visualizer, or possibly simulators. All values should be between 0 and 1.
Default value ``None``
render (bool): Whether this object is drawn in Scenic's internal visualizer.
Default value ``True``. Set to ``False`` to hide the object.
velocity (`Vector`; *dynamic*): Velocity in dynamic simulations. Default value is
the velocity determined by :prop:`speed` and :prop:`orientation`.
speed (float; dynamic): Speed in dynamic simulations. Default value 0.
Expand Down
28 changes: 14 additions & 14 deletions src/scenic/simulators/carla/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ def applyTo(self, obj, sim):


class SetAutopilotAction(VehicleAction):
"""Enable or disable CARLA autopilot with optional Traffic Manager settings.

Arguments:
enabled: Enable or disable autopilot (bool)
kwargs: Additional autopilot options such as:
speed: Target speed of the car in m/s (default: None). Mutually exclusive with vehicle_percentage_speed_difference.
vehicle_percentage_speed_difference: Percentage difference between intended speed and the current speed limit. Can be negative to exceed the speed limit.
path: Route for the vehicle to follow (default: None)
ignore_signs_percentage: Percentage of ignored traffic signs (default: 0)
ignore_lights_percentage: Percentage of ignored traffic lights (default: 0)
ignore_walkers_percentage: Percentage of ignored pedestrians (default: 0)
auto_lane_change: Whether to allow automatic lane changes (default: False)
"""

def __init__(self, enabled, **kwargs):
"""
:param enabled: Enable or disable autopilot (bool)
:param kwargs: Additional autopilot options such as:
- speed: Target speed of the car in m/s (default: None). Mutually
exclusive with vehicle_percentage_speed_difference.
- vehicle_percentage_speed_difference: Percentage difference between
intended speed and the current speed limit. Can be negative to
exceed the speed limit.
- path: Route for the vehicle to follow (default: None)
- ignore_signs_percentage: Percentage of ignored traffic signs (default: 0)
- ignore_lights_percentage: Percentage of ignored traffic lights (default: 0)
- ignore_walkers_percentage: Percentage of ignored pedestrians (default: 0)
- auto_lane_change: Whether to allow automatic lane changes (default: False)
"""
if not isinstance(enabled, bool):
raise TypeError("Enabled must be a boolean.")

Expand Down
5 changes: 4 additions & 1 deletion src/scenic/simulators/newtonian/driving_model.scenic
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Vehicles support the basic actions and behaviors from the driving domain.

A path to a map file for the scenario should be provided as the ``map`` global parameter;
see the driving domain's documentation for details.

Global Parameters:
debugRender (bool): If ``True``, enables a debug view that draws simple
polygons for objects in the Newtonian window. Default is ``False``.
"""

from scenic.simulators.newtonian.model import *
Expand Down Expand Up @@ -73,4 +77,3 @@ class Debris:
"""Abstract class for debris scattered randomly in the workspace."""
position: new Point in workspace
yaw: Range(0, 360) deg

Loading