Smarts

Latest version: v2.0.1

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.7.0rc0

Added
- Added a basic background traffic ("social vehicle") provider as an alternative to the SUMO traffic simulator. This can be selected using the new `"engine"` argument to `Traffic` in Scenario Studio.
- Added a `multi-scenario-v0` environment which can build any of the following scenario, namely, `1_to_2lane_left_turn_c`, `1_to_2lane_left_turn_t`, `3lane_merge_multi_agent`, `3lane_merge_single_agent`, `3lane_cruise_multi_agent`, `3lane_cruise_single_agent`, `3lane_cut_in`, and `3lane_overtake`. Additional scenarios can also be built by supplying the paths to the scenario directories.
- Added ego's mission details into the `FormatObs` wrapper.
- Added `SmartsLaneChangingModel` and `SmartsJunctionModel` to types available for use with the new smarts traffic engine within Scenario Studio.
- Added option to `AgentInterface` to include traffic signals (lights) in `EgoVehicleObservation` objects.
- Added the ability to hover over vehicles and roadmap elements in Envision to see debug info.

Deprecated
- Deprecated a few things related to traffic in the `Scenario` class, including the `route` argument to the `Scenario` initializer, the `route`, `route_filepath` and `route_files_enabled` properties, and the `discover_routes()` static method. In general, the notion of "route" (singular) here is being replaced with "`traffic_specs`" (plural) that allow for specifying traffic controlled by the SMARTS engine as well as Sumo.
- `waymo_browser.py` has been deprecated in favour of the scl waymo command line tools.

Changed
- Add `lane_offset` to `Waypoint` class and `lane_postion` to both `EgoVehicleObservation` and `VehicleObservation` classes to expose the reference-line (a.k.a. Frenet) coordinate system.
- Traffic history vehicles can now be hijacked within a bubble. They will be relinquished to the SMARTS background traffic provider upon exiting the bubble.
- Changed the name of the `Imitation` action space to `Direct`.
- Removed `endless_traffic` option from `SumoTrafficSimulator` and instead added `repeat_route` to `Flow` type in Scenario Studio.
- Renamed `examples/observation_collection_for_imitation_learning.py` to `examples/traffic_histories_to_observations.py`.
- Renamed `examples/history_vehicles_replacement_for_imitation_learning.py` to `examples/traffic_histories_vehicle_replacement.py`.
- `SumoTrafficSimulation` will now try to hand-off the vehicles it controls to the new SMARTS background traffic provider by default if the Sumo provider crashes.
- SMARTS now gives an error about a suspected lack of junction edges in sumo maps on loading of them.
- Scenario build artifacts are now cached and built incrementally, meaning that subsequent builds (without the `clean` option) will only build the artifacts that depend on the changed DSL objects
- All build artifacts are now in a local `build/` directory in each scenario's directory
- The `allow_offset_map` option has been removed. This must now be set in a `MapSpec` object in the scenario.py if this option is needed
- All scenarios must have a `scenario.py`, and must call `gen_scenario()`, rather than the individual `gen_` functions, which are now private

Removed
- Removed support for deprecated json-based and YAML formats for traffic histories.
- Removed time and distance to collision values from `FormatObs` wrapper as the current implementation's correctness was in doubt.

Fixed
- Fixed bug where `yaw_rate` was always reported as 0.0 (Issue 1481).
- Modified `FrameStack` wrapper to support agents which start at a later time in the simulation.
- Truncated all waypoint paths returned by `FormatObs` wrapper to be of the same length. Previously, variable waypoint-path lengths caused inhomogenous shape error in numpy array.
- Fixed a bug where traffic providers would leak across instances due to the ~~(awful design decision of python)~~ reference types defaults in arguments sharing across instances.
- Fixed minor bugs causing some Waymo maps not to load properly.
- Fixed a bug where `Vehicle.bounding_box` was mirrored over Y causing on shoulder events to fire inappropriately.
- Fixed an issue where the ego and neighbour vehicle observation was returning `None` for the nearby `lane_id`, `lane_index`, and `road_id`. These now default to constants `off_lane`, `-1`, and `off_road` respectively.
- Fixed a bug where bubble agents would stick around and to try to get observations even after being disassociated from a vehicle.
- Fixed a bug with the `TripMeterSensor` that was not using a unit direction vector to calculate trip distance against current route.
- Fixed issues with Envision. The playback bar and realtime mode now work as expected.
- Fixed a bug where traffic history vehicles would not get traffic signal observations
- Fixed a bug where envision would not work in some versions of python due to nuances of `importlib.resource.path()`.
- Fixed an issue with incorrect vehicle sizes in Envision.

0.6.1

Added
- Added standard intersection environment, `intersection-v0`, for reinforcement learning where agents have to make an unprotected left turn in the presence of traffic.
- Added an online RL example for solving the `intersection-v0` environment, using PPO algorithm from Stable Baselines3 library. An accompanying Colab example is also provided.

Changed
- Updated license to 2022 version.
- SMARTS reset now has a start time option which will skip simulation.
- Since `gym.Space` does not support dataclass, `StdObs` type is changed from a dataclass to a dictionary.

Removed
- Old Stable Baselines3 based example is removed in favour of the new online RL example developed using Stable Baselines3 library.

Fixed
- Additional case added for avoiding off-route if merging early into a lane.
- Unpack utility now unpacks dataclass attributes.
- Trap manager now uses elapsed sim time rather than step delta to associate with time.

0.6.1rc1

Added
- Added example scenario for importing the NGSIM `peachtree` dataset.
- Added example scenario for importing the INTERACTION `merging` dataset
Deprecated
- Using `.yml` files to specify traffic history datasets have been deprecated in favor of using `sstudio.types.TrafficHistoryDataset` objects.
Fixed
- Gracefully handle `EndlessGoal` missions in the MaRL benchmark. Relative goal distance with `EndlessGoal` will be now always be 0.
- Restore `rl-agent` to working order. Version incremented to `1.1.0`.
- Update `rl-agent` wheel.
- Do not auto-shift maps for a scenario that has traffic history.
- Fixed Issue 1321 such that numpy's `sliding_window_view()` is no longer needed for NGSIM traffic histories.
- Fixed NGSIM traffic history import bugs (see Issues 1354 and 1402).

0.6.1rc0

Added
- Added `smarts/waymo/waymo_browser.py`, a text-based utility to explore and export scenarios from the Waymo Motion dataset to SMARTS scenarios.
- Added `get_vehicle_start_time()` method for scenarios with traffic history data. See Issue 1210.
- Added `sb3` reinforcement-learning example. An ego agent is trained using PPO algorithm from Stable Baselines3 library, to drive as far and as fast as possible in heavy traffic, without colliding or going off-road.
- Added `FormatObs` wrapper which converts SMARTS observations to gym-compliant RL-friendly vectorized observations and returns `StdObs`.
- Added `Pose.as_position2d()` method which converts the pose to an [x,y] position array.
- Added `EventConfiguration` dataclass in the agent interface to allow users to configure the conditions in which events are triggered
- Extended the `RoadMap` API to support `Waymo` map format in `smarts/core/waymo_map.py`.
- Added scenarios for "importing" the i80 and us101 NGSIM trajectory history datasets
- Added an observation adapter that makes the observation ego-centric: `smarts.core.utils.ego_centric_observation_adapter`.
- Added math utility `world_position_from_ego_frame` which allows converting from an ego frame to world frame.
- Added math utility `wrap_value` which constrains a float between a `min` and `max` by wrapping around every time the value exceeds `max` or falls below `min`.
- Added ego-centric adapter utility `smarts.core.utils.adapters.ego_centric_adapters.get_egocentric_adapters(action_space)` which provides an ego-centric pair of observation and action adapters that are used together to provide an ego-centric interface.
Changed
- If more than one qualifying map file exists in a the `map_spec.source` folder, `get_road_map()` in `default_map_builder.py` will prefer to return the default files (`map.net.xml` or `map.xodr`) if they exist.
- Moved the `smarts_ros` ROS node from the `examples` area into the `smarts.ros` module so that it can be distributed with SMARTS packages.
- Use `Process` to replace `Thread` to speed up the `scl scenario build-all --clean <scenario_dir>` runtime.
- Modified the repository's front page to be more informative and better organised.
- Added an option to `Scenario.scenario_variations()` to make the iterator not yield a cycle.
Deprecated
- Moved the `AgentSpec` class out of `smarts.core.agent` to `smarts.zoo.agent_spec`.
Fixed
- Fixed a secondary exception that the `SumoTrafficSimulation` will throw when attempting to close a TraCI connection that is closed by an error.
- Ensure that `smarts.core.coordinates.Pose` attribute `position` is an [x, y, z] numpy array, and attribute `orientation` is a quaternion length 4 numpy array.
- Update social vehicle pose in Bullet when no active agents are present.
- Fix suppression of `stderr` and `stdout` on `ipython` platforms via `suppress_output(..)`.
Removed
- Removed the unconditional import of `Renderer` from `smarts/core/vehicle.py` to make `Panda3D` optional dependency regression. See Issue 1310.
Security

0.6.0

Added
- Added `get_vehicle_start_time()` method for scenarios with traffic history data. See Issue 1210.
- Added `sb3` reinforcement-learning example. An ego agent is trained using PPO algorithm from Stable Baselines3 library, to drive as far and as fast as possible in heavy traffic, without colliding or going off-road.
- Added `FormatObs` wrapper which converts SMARTS observations to gym-compliant RL-friendly vectorized observations and returns `StdObs`.
- Added `Pose.as_position2d()` method which converts the pose to an [x,y] position array.
- Added `EventConfiguration` dataclass in the agent interface to allow users to configure the conditions in which events are triggered
- Added scenarios for "importing" the i80 and us101 NGSIM trajectory history datasets
Changed
- If more than one qualifying map file exists in a the `map_spec.source` folder, `get_road_map()` in `default_map_builder.py` will prefer to return the default files (`map.net.xml` or `map.xodr`) if they exist.
- Moved the `smarts_ros` ROS node from the `examples` area into the `smarts.ros` module so that it can be distributed with SMARTS packages.
- Use `Process` to replace `Thread` to speed up the `scl scenario build-all --clean <scenario_dir>` runtime.
- Modified the repository's front page to be more informative and better organised.
Deprecated
- Moved the `AgentSpec` class out of `smarts.core.agent` to `smarts.zoo.agent_spec`.
Fixed
- Fixed a secondary exception that the `SumoTrafficSimulation` will throw when attempting to close a TraCI connection that is closed by an error.
- Ensure that `smarts.core.coordinates.Pose` attribute `position` is an [x, y, z] numpy array, and attribute `orientation` is a quaternion length 4 numpy array.
- Update social vehicle pose in Bullet when no active agents are present.
- Document missing action space type `ActionSpaceType.TargetPose`.
Removed
- Removed the unconditional import of `Renderer` from `smarts/core/vehicle.py` to make `Panda3D` optional dependency regression. See Issue 1310.
Security

0.5.1.post1

Fixed
- Fixed an issue involving relative imports in `examples/rllib/rllib.py`.
- Fixed an issue with uncapped `opencv` causing an error within `ray.rllib`.
- Fixed a longstanding issue that did not allow camera observations unless you had windowing.

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.