Added
- Added Minimum FrameRate tests to measure the fps for `smart.step()` method. See Issue 455.
- Added a ROS wrapper/driver example to wrap SMARTS in a ROS (v1) node.
- Added the ability to pass an optional `time_delta_since_last_step` to SMARTS' `step()` function
to support variable timesteps for co-simulation.
- Added `step_count` and `elapsed_sim_time` to the `Observation` class. See PR 974 and Issues 884 and 918.
- Added `dt` to `Observation` class to inform users of the observations of the variable timestep.
- Added the ability to externally update SMARTS state via a new privileged-access `ExternalProvider`.
- Allow specifying "-latest" as a version suffix for zoo locator strings.
- Added Base CI and dependencies requirement tests for the "darwin" platform (MacOS).
- Extended Imitation Learning codebase to allow importing traffic histories from the Waymo motion dataset and replay in a SMARTS simulation. See PR 1060.
- Added options for dealing with noise when inferring headings while importing traffic history data. See PR 1219.
- Added `ros` extension rule to `setup.py`.
- Added a script to allow users to hijack history vehicles dynamically through a trigger event. See PR 1088.
- Added a `-y` option to `utils/setup/install_deps.sh` to accept installation by default. See issue 1081.
- Added `ParallelEnv` class and a corresponding example to simulate multiple SMARTS environments in parallel, with synchronous or asynchronous episodes.
- Added `smarts.core.utils.import_utils` to help with the dynamic import of modules.
- Added `single_agent` env wrapper and unit test. The wrapper converts a single-agent SMARTS environment's step and reset output to be compliant with gym spaces.
- Added `rgb_image` env wrapper and unit test. The wrapper filters SMARTS environment observation and returns only top-down RGB image as observation.
- Extended the `RoadMap` API to support `OpenDRIVE` map format in `smarts/core/opendrive_road_network.py`. Added 3 new scenarios with `OpenDRIVE` maps. See PR 1186.
- Added a "ReplayAgent" wrapper to allow users to rerun an agent previously run by saving its configurations and inputs. See Issue 971.
- Added `smarts.core.provider.ProviderRecoveryFlags` as flags to determine how `SMARTS` should handle failures in providers. They are as follows:
- `NOT_REQUIRED`: Not needed for the current step. Error causes skip of provider if it should recover but cannot or should not recover.
- `EPISODE_REQUIRED`: Needed for the current episode. Results in episode ending if it should recover but cannot or should not recover.
- `EXPERIMENT_REQUIRED`: Needed for the experiment. Results in exception if it should recover but cannot or should not recover.
- `ATTEMPT_RECOVERY`: Provider should attempt to recover from the exception or disconnection.
- Added recovery options for providers in `smarts.core.provider.Provider`. These include:
- Add `recover()` method to providers to attempt to recover from errors and disconnection.
- Add `connected` property to providers to check if the provider is still connected.
- Added recovery options to `smarts.core.smarts.SMARTS.add_provider()`
- Add `recovery_flags` argument to configure the recovery options if the provider disconnects or throws an exception.
- Added `driving_in_traffic` reinforcement learning example. An ego agent is trained using DreamerV2 to drive as far and as fast as possible in heavy traffic, without colliding or going off-road.
- Added `smarts.core.smarts.SMARTSDestroyedError` which describes use of a destroyed `SMARTS` instance.
Changed
- `test-requirements` github action job renamed to `check-requirements-change` and only checks for requirements changes without failing.
- Moved examples tests to `examples` and used relative imports to fix a module collision with `aiohttp`'s `examples` module.
- Made changes to log sections of the scenario step in `smarts.py` to help evaluate smarts performance problems. See Issue 661.
- Introducted `RoadMap` class to abstract away from `SumoRoadNetwork`
and allow for (eventually) supporting other map formats. See Issue 830 and PR 1048.
This had multiple cascading ripple effects (especially on Waypoint generation and caching,
Missions/Plans/Routes and road/lane-related sensors). These include:
- Removed the `AgentBehavior` class and the `agent_behavior` parameter to `AgentInterface`.
- Moved the definition of `Waypoint` from `smarts.core.mission_planner` to `smarts.core.road_map`.
- Moved the definition of `Mission` and `Goal` classes from `smarts.core.scenario` to `smarts.core.plan`.
- Added `MapSpec` to the SStudio DSL types and introduced a simple builder pattern for creating `RoadMap` objects.
- Changed the type hint for `EgoVehicleObservation`: it returns a numpy array (and always has).
- Raised a warning message for building scenarios without `map.net.xml` file. See PR 1161.
- Updated `smarts/env/hiway_env.py` to support `OpenDRIVE` maps so that the `SMARTS` object is instantiated without the `SUMO` traffic provider and social agents. See PR 1215.
- Public `SMARTS` methods will throw `smarts.core.smarts.SMARTSDestroyedError` if `SMARTS.destroy()` has previously been called on the `SMARTS` instance.
Fixed
- Fix lane vector for the unique cases of lane offset >= lane's length. See PR 1173.
- Logic fixes to the `_snap_internal_holes` and `_snap_external_holes` methods in `smarts.core.sumo_road_network.py` for crude geometry holes of sumo road map. Re-adjusted the entry position of vehicles in `smarts.sstudio.genhistories.py` to avoid false positive events. See PR 992.
- Prevent `test_notebook.ipynb` cells from timing out by increasing time to unlimited using `/metadata/execution/timeout=65536` within the notebook for regular uses, and `pytest` call with `--nb-exec-timeout 65536` option for tests. See for more details: "https://jupyterbook.org/content/execute.html#setting-execution-timeout" and "https://pytest-notebook.readthedocs.io/en/latest/user_guide/tutorial_intro.html#pytest-fixture".
- Stop `multiprocessing.queues.Queue` from throwing an error by importing `multiprocessing.queues` in `envision/utils/multiprocessing_queue.py`.
- Prevent vehicle insertion on top of ignored social vehicles when the `TrapManager` defaults to emitting a vehicle for the ego to control. See PR 1043
- Prevent `TrapManager`from trapping vehicles in Bubble airlocks. See Issue 1064.
- Social-agent-buffer is instantiated only if the scenario requires social agents
- Mapped Polygon object output of Route.geometry() to sequence of coordinates.
- Updated deprecated Shapely functionality.
- Fixed the type of `position` (pose) fields emitted to envision to match the existing type hints of `tuple`.
- Properly detect whether waypoint is present in mission route, while computing distance travelled by agents with missions in TripMeterSensor.
- Fixed `test_notebook` timeout by setting `pytest --nb-exec-timeout 65536`.
Deprecated
- The `timestep_sec` property of SMARTS is being deprecated in favor of `fixed_timesep_sec`
for clarity since we are adding the ability to have variable time steps.
Removed
- Remove `ray_multi_instance` example when running `make sanity-test`
- Removed deprecated fields from `AgentSpec`: `policy_builder`, `policy_params`, and `perform_self_test`.
- Removed deprecated class `AgentPolicy` from `agent.py`.
- Removed `route_waypoints` attribute from `smarts.core.sensors.RoadWaypoints`.