Smarts

Latest version: v2.0.1

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

Scan your dependencies

Page 1 of 5

2.0.1

Fixed
- Restored deprecated `debug_log` to benchmark runner.

2.0.0

Added
- Added a utility method `SMARTS.prepare_observe_from()` which allows safely adding sensors to vehicles.
- The following methods now exist explicitly `Vehicle.{add_sensor|detach_sensor|subscribed_to|sensor_property|}`.
- Resources loaded with `load_yaml_config_with_substitution()` now substitute in SMARTS configuration with single squiggle bracket `${}` syntax. This is currently restricted to environment variable names prefixed with `"SMARTS_"`. This extends to benchmark configuration and vehicle configuration.
- Default vehicle definitions can be now modified using `assets:default_vehicle_definitions_list`/`SMARTS_ASSSETS_DEFAULT_VEHICLE_DEFINITIONS_LIST` or by providing a `vehicle_definitions_list.yaml` in the scenario. These vehicle types are related to the `AgentInterface.vehicle_type` attribute.
- New `CustomRender` agent interface option added. This allows using `glsl` fragment scripts to generate images from camera textures and simulation buffers.
- New `ObfuscationMap` agent interface option added. This uses the `OccupancyGridMap` to help generate an image of ground viewable area from the ego vehicle's perspective.
- There is now a centralized `TraCI` server mananger that can be used to prevent port collisions. It can be run using `python smarts.core.utils.sumo_server` and the use of the server can be enabled with `SMARTS_SUMO_TRACI_SERVE_MODE="central"`.
Changed
- `VehicleIndex.build_agent_vehicle()` no longer has `filename` and `surface_patches` parameters.
- The following modules have been renamed: `envision.types` -> `envision.etypes`, `smarts.core.utils.logging` -> `smarts.core.utils.core_logging`, `smarts.core.utils.math` -> `smarts.core.utils.core_math`, `smarts.sstudio.types` -> `smarts.sstudio.sstypes`. For compatibility reasons they can still be imported by their original module name.
- Exposed `traffic:traci_retries`/`SMARTS_TRAFFIC_TRACI_RETRIES` to control how many times the `SumoTrafficSimulation` will try to restart when using default configuration.
- `rllib` is now constrained as `<=2.9,>2.4`.
- The `examples/e12_rllib` training examples `{pg_example|pg_pbt_example}.py` have been changed to `{ppo_example|ppo_pbt_example}.py`. `Policy Gradients (PG)` has been dropped in favor of the more well documented `Proximal Policy Optimization (PPO)`.
- Vehicles can now have sensors added to, overwritten, or replaced outright.
- Logging is now improved to give information about sensor changes in the sensor manager.
- - Renamed `vehicle.urdf` to `sedan.urdf`.
- Environment prefix is now configurable for custom `smarts.core.config()` calls.
- `Vehicle.build_agent_vehicle()` argument `vehicle_filepath` now renamed to `vehicle_dynamics_filepath`.
- Renamed `MACOS` `pybullet` gui utility from `smarts.core.utils.bullet.BulletClient` to `smarts.core.utils.pybullet.BulletClientMACOS`.
- `Vehicle.build_agent_vehicle()` and `Vehicle.build_social_vehicle()` moved to `VehicleIndex`.
- `smarts.core.configuration.Configuration.get_settings()` now uses the `PyYAML` default instead of forcefully casting to `str`.
- Added `AgentInterface.vehicle_class` which allows selection of a dynamics vehicle from the vehicle definitions list file.
- Waypoints now have a `position` property (which will eventually replace `pos`).
- You must now implement `act()` for any agent inheriting from `smarts.core.agent.Agent`.
- `FunctionAgent` is now no longer dynamically defined.
- `Vias.hit_via_points` is now a property.
- `ViaPoint` now has an attribute `hit` which determines if the point has been "collected".
- Dependencies switched back to using `-` instead of `_` (e.g. "camera-obs").
Deprecated
- Module `smarts.core.models` is now deprecated in favour of `smarts.assets`.
- Deprecated a few things related to vehicles in the `Scenario` class, including the `vehicle_filepath`, `tire_parameters_filepath`, and `controller_parameters_filepath`. The functionality is now handled through the vehicle definitions.
- `AgentInterface.vehicle_type` is now deprecated with potential to be restored.
Fixed
- The performance of SUMO roadmap queries using `SumoRoadNetwork.{nearest_lanes|nearest_lane|offset_along_lane}()` have been greatly improved for long lanes.
- `SumoTrafficSimulation` gives clearer reasons as to why it failed to connect to the TraCI server.
- Suppressed an issue where `pybullet_utils.pybullet.BulletClient` would cause an error because it was catching a non `BaseException` type.
- Fixed a bug where `smarts.core.vehicle_index.VehicleIndex.attach_sensors_to_vehicle()` would pass a method instead of a `PlanFrame` to the generated vehicle `SensorState`.
- Fixed an issue where `AgentInterface.vehicle_type` would not affect agent vehicles when attempting to take over an existing vehicle.
- Fixed a case where newly created agent vehicles would have a constant `"sedan"` size instead of the size of `AgentInterface.vehicle_type`.
- Fixed a case where if vehicles are replaced they would not respect controller and vehicle parameters.
- Fixed an issue where `RandomRoute` would always give the same route across traffic groups in scenario studio.
- Fixed an issue where `SMARTS` might not be explicitly destroyed in the `ros_driver`.
- Fixed issue where `SumoTrafficSimulation` could get locked up on reset if a scenario had only 1 map but multiple scenario variations.
- Fixed an issue where an out-of-scope method reference caused a pickling error.
- Fixed an issue where the `EnvisionDataFormatterArgs` default would use a locally defined lambda and cause a serialization failure.
- Fixed an issue where user configuration was being overridden.
- Fixed a `pkg_resources` deprecation warning in `python3.10` and up.
- Fixed the envision camera to center on the map which was broken due to a change in the `gltf` metadata hierarchy.
- Fixed an issue where you would need to install `waymo` in order to use any kind of dataset histories.
- Fixed an issue where Pycharm would load `smarts/sstudio/types` as the integrated `types` module. See 2125.
- Fixed an issue where the `e12_rllib` examples would use the wrong path for the default loop scenario.
- Fixed an issue where the sensor state could be `None` when calling `SMARTS.observe_from()` on a non-ego vehicle. See 2133.
- The via sensor and trip meter sensor now work without a mission.
- Fixed a bug with `VehicleIndex.attach_sensors_to_vehicle()` that would generate an invalid plan.
- Fixed a bug where vehicle sensor meta attributes would reference the wrong vehicle.
- Resolved issue with road waypoints not showing waypoints if the horizon was larger than the start of the lane.
- Fixed an issue where `SMARTS.reset()` would be unable to render cameras.
- Squashed TraCI "retrying" stdout messages.
Removed
Security

1.4.0

Added
- SMARTS option `smarts[examples]` added for running SMARTS examples.
Changed
- The following dependencies have been loosened: `numpy`, `opencv`, `torch`.
- Clarified engine configuration location under `logging.info` instead of `print`.
- `ScenarioOrder` enumeration values are now lower-case (e.g. `scrambled` instead of `Scrambled`).
- `EnvReturnMode`, `ScenarioOrder`, and `SumoOptions` have been moved to `smarts.env.configs.hiway_env_configs`.
- `trimesh` version has been loosened to `trimesh>=3.9.29`.
Deprecated
Fixed
- The `smarts` package now works with `python3.10` and `python3.11`.
- Fixed an issue where default `AgentInterface.events` shared a reference.
- Episode log now lists current value out of maximum rather than index.
- Episode log now correctly shows all agent scores.
- Added `scipy` back to dependencies to fix scenario building.
- Fixed `gymnasium` floating type cast warnings in action conversion.
Removed
- Removed previously deprecated `SMARTS.timestep_sec` attribute.
Security

1.3.0

Added
- Added `rllib/pg_example.py` to demonstrate a simple integration with `RLlib` and `tensorflow` for policy training.
- Added `rllib/pg_pbt_example.py` to demonstrate integration with `ray.RLlib`, `tensorflow`, and `ray.tune` for scheduled policy training.
- Added engine configuration `ray:num_cpus`/`SMARTS_RAY_NUM_CPUS` which controls ray cpu usage (this overrides `core:observation_workers` when using `core:sensor_parallelization=ray`).
- Added engine configuration `ray:num_gpus`/`SMARTS_RAY_NUM_GPUS` which controls ray gpu usage.
Changed
- Updated `smarts[ray]` (`ray==2.2`) and `smarts[rllib]` (`ray[rllib]==1.4`) to use `ray~=2.5`.
- Introduced `tensorflow-probability` to `smarts[rllib]`.
- Updated `RLlibHiWayEnv` to use the `gymnasium` interface.
- Renamed `rllib/rllib.py` to `rllib/pg_pbt_example.py`.
- Loosened constraint of `gymnasium` from `==0.27.0` to `>=0.26.3`.
- Engine configuration of `ray` now affects the parallel benchmark runner.
- Driving SMARTS benchmarks (`scl benchmark run <benchmark_id>=driving_smarts_*`) requirement `ray<=2.2.0` bumped to `ray<2.6.0`.
- `LaneFollowingController` now uses a different pole placement method to compute lateral/heading gains. Numerical behaviour is unchanged. Performance is slightly faster.
- Upgraded Stable Baselines3 from v1.7.0 to v2.0.0, and switched to Gymnasium backend, in Drive and VehicleFollowing RL examples.
- Changed all uses of `gym` to use `gymnasium`.
- Changed `gymnasium` to be an optional dependency. Use `pip install -e .[gymnasium]` to install it.
- Renamed the `[gym]` optional install to `[gif_recorder]`.
- Optimized events calculation to avoid redundant roadmap calls.
Deprecated
Fixed
- Missing neighborhood vehicle state `'lane_id'` is now added to the `hiway-v1` formatted observations.
- Fixed a regression where `pybullet` build time messages returned.
- `make format` no longer complains about a broken `./baselines` path.
Removed
- Removed `scl benchmark run --debug-log`. The same setting can be configured with `ray:log_to_driver` or `SMARTS_RAY_LOG_TO_DRIVER`.
- Removed `TruncatedDistribution` from scenario studio.
- Removed `scipy` as a core package dependency.
- Removed `gym` as a core package dependency.
- Removed `hiway-v0` env.
- Removed `Api021Reversion` gym wrapper class.
Security

1.2.0

Added
- `visdom` can now be configured through the engine.ini configuration file `visdom:enabled`, `visdom:hostname`, and `visdom:port` (environment variables `SMARTS_VISDOM_ENABLED`, `SMARTS_VISDOM_HOSTNAME`, `SMARTS_VISDOM_PORT`.)
- Added an install extra that installs the requirements for all optional modules. Use `pip install .[all]`.
- Added `Condition`, `ConditionRequires`, `ConditionState` and various condition implementations to enable logical operations in scenarios.
- Traffic lights are now rendered in Envision.
- Traffic lights are now rendered in camera observations.
- Interest vehicles now show up in Envision.
- Seed of `hiway-v1` env can be retrieved through a new property `seed`.
- Added `TrafficEngineActor` to describe a scenario studio defined actor that is controlled by a traffic engine.
- Docker images from now on out base from ``ubuntu:focal``.
- A new Docker image has been added for software rendering for use cases where there is no display and GPU.
Changed
- Changed waypoints in sumo maps to use more incoming lanes into junctions.
- Increased the cutoff radius for filtering out waypoints that are too far away in junctions in sumo maps.
- Made SUMO dependencies optional. Use `pip install -e .[sumo]` to install them.
- Made Envision dependencies optional. Use `pip install -e .[envision]` to install them.
- Made Waymo dependencies optional. Use `pip install -e .[waymo]` to install them.
- `SumoTrafficSimulator` now uses the last vehicle subscription update to back `route_for_vehicle()`. This means that the routes of vehicles can still be determined even if `SumoTrafficSimulation` disconnects.
- Reward function in platoon RL example retrieves actor-of-interest from marked neighborhood vehicles.
- `dist_to_destination` metric cost function computes the route distance and end point for vehicle of interest contained in social agents, SMARTS traffic provider, SUMO traffic provider, and traffic history provider.
- `sstudio` generated scenario vehicle traffic IDs are now shortened.
- `TrapEntryTactic.wait_to_hijack_limit_s` field now defaults to `0`.
- `EntryTactic` derived classes now contain `condition` to provide extra filtering of candidate actors.
- `EntryTactic` derived classes now contain `start_time`.
- `info` returned by `hiway-v1` in `reset()` and `step()` methods are unified.
- Changed instances of `hiway-v0` and `gym` to use `hiway-v1` and `gymnasium`, respectively.
- `RoadMap.Route` now optionally stores the start and end lanes of the route.
- `hiway-v1` can now be configured for per-agent or environment reward(s), truncation(s), termination(s), and info(s) through `environment_return_mode`.
- `hiway-v1`'s `observation_options` no longer has an effect on the environment rewards, truncations, and terminations `agent|environment` style return mode.
- `DistToDestination` metric is now computed by summing the (i) off-route distance driven by the vehicle from its last on-route position, and (ii) the distance to goal from the vehicle's last on-route position.
- `Steps` metric is capped by scenario duration set in the scenario metadata.
- Overall metric score is weighted by each agent's task difficulty.
Deprecated
- `visdom` is set to be removed from the SMARTS object parameters.
- Deprecated `start_time` on missions.
Fixed
- Fixed implementations of `RoadMap.waypoint_paths()` to ensure that the result is never empty.
- The routes of `SumoTrafficSimulation` traffic vehicles are now preserved to be passed over to other traffic simulators when the `SumoTrafficSimulation` disconnects.
- `SumoTrafficSimulation` no longer reports that it manages vehicles when it is disconnected.
- Fixed waypoints so that they will always be the length of the `lookahead` parameter, even in junctions.
- Fixed an issue where a single waypoint would appear in off-route lanes for missions with a goal.
- Fixed an issue where the `off_route` event would be incorrectly triggered when driving on overlapping lanes.
- Fixed an underlying issue with the sensor manager where the sensors were not removed immediately.
- Fixed an issue where warnings could be generated when an agent takes over an existing vehicle if the vehicle previously had sensors on it.
- Fixed vehicle gap metric to consume ragged waypoints matrix.
- Fixed an issue where making a deep copy of the vehicle index would cause the pybullet client to crash the simulation.
Removed
- Removed the following dependencies from smarts: `pandas`, `rich`, `twisted`, `sh`.
- Moved `baselines/marl_benchmark` from this repository to `smarts-project/smarts-project.rl` repository.
- Removed `intersection-v0` env and `examples/rl/intersection` as they are superseded by `driving-smarts-v2023` env and `examples/rl/drive`, respectively.
- Removed `examples/rl/racing` as base repository `danijar/dreamerv2` is not updated anymore and this example will be superseded by `examples/rl/drive`.
- Removed `FrameStack` environment wrapper.
- Removed `SMARTS.traffic_sim` property.
- Removed remote agent modules.
- Removed `protobuf` as a core package dependency.
Security

1.1.0

Added
- Added an actor capture manager interface, `ActorCaptureManager`, which describes a manager that handles the change of control of actors. Operations in an actor manager step should not cause conflict in the simulation.
- Added a new entry tactic, `IdEntryTactic`, which provides the scenario the ability to select a specific actor for an agent to take over.
- Registered a new `chase-via-points-agent-v0` agent in agent zoo, which can effectively chase via points across different road sections by using the waypoints.
- Added new driving-smarts-v2023 benchmark consisting of new (i) driving-smarts-v2023 env and (ii) platoon-v0 env.
- Added baseline example, consisting of training, inference, and zoo agent registration, for the platooning task in Driving SMARTS 2023.3 benchmark.
- Documented the challenge objective, desired inference code structure, and use of baseline example, for Driving SMARTS 2023.3 benchmark, i.e., platooning task.
- Added a new scenario consisting of merge-exit map, sumo lead vehicle, and traffic, for the vehicle-following task.
- Added a `SensorManager` which manages placing sensors on actors in the simulations.
- The `VehicleState` now has the `bounding_box_points` property to get the vehicle minimum bounding box as a set of points.
- Added engine configuration options for `core:debug`, `core:observation_workers`, and `core:reset_retries`.
- Explained in the docs that agents may spawn at different times in multiagent scenarios.
- Added `RaySensorResolver` as an alternative parallel resolver.
- Added `[ray]` option for `smarts` package. This currently conflicts with `[rllib]`.
- Added engine `observation_workers` configuration which can be used to configure the number of parallel sensor workers: 0 runs the sensors on the local thread, >=1 runs using the multiprocessing backing.
- Added engine `sensor_parallelization` configuration of sensor parallelization backing, options ("mp"|"ray"): "mp" python multiprocessing, "ray" ray worker backing.
- Added engine `reset_retries` configuration engine retries before the simulator will raise an error on reset.
- Introduced new comfort cost function in metric module.
- Introduced new gap-between-vehicles cost function in metric module.
- Added baseline example, consisting of training, inference, and zoo agent registration, for the driving and turning tasks in Driving SMARTS 2023.1 and 2023.2 benchmarks, respectively. It uses RelativeTargetPose action space.
- Documented the challenge objective, desired inference code structure, and use of baseline example, for Driving SMARTS 2023.1 (i.e., basic motion planning) and 2023.2 (i.e, turns) benchmarks.
- Added an env wrapper for constraining the relative target pose action range.
- Added a specialised metric formula module for Driving SMARTS 2023.1 and 2023.2 benchmark.
Changed
- The trap manager, `TrapManager`, is now a subclass of `ActorCaptureManager`.
- Considering lane-change time ranges between 3s and 6s, assuming a speed of 13.89m/s, the via sensor lane acquisition range was increased from 40m to 80m, for better driving ability.
- The `AgentType.Full` now includes `road_waypoints`, `accelerometer`, and `lane_positions`.
- `ActionSpaceType` has been moved from `controller` to its own file.
- `VehicleState` has been moved to its own file.
- Sensors are no longer added and configured in the `agent_manager`. They are instead managed in the `sensor_manager`.
- Renamed all terminology relating to actor to owner in `VehicleIndex`.
- Renamed all terminology relating to shadow actor to shadower in `VehicleIndex`.
- `Collision` has been moved from `smarts.core.observations` to `smarts.core.vehicle_state`.
- The trap manager, `TrapManager`, is now a subclass of `ActorCaptureManager`.
- Considering lane-change time ranges between 3s and 6s, assuming a speed of 13.89m/s, the via sensor lane acquisition range was increased from 40m to 80m, for better driving ability.
- Modified naming of benchmark used in NeurIPS 2022 from driving-smarts-competition-env to driving-smarts-v2022.
- Social agent actor vehicles are now exactly named the same as the `name` of the actor.
- Sstudio generated scenario vehicle traffic ids are now shortened.
- ChaseViaPoints zoo agent uses unconstrained path change command, instead of being constrained to [-1, 0, +1] path change commands used previously.
- Made the metrics module configurable by supplying parameters through a `Params` class.
- Neighborhood vehicles which should be excluded from the `dist_to_obstacles` cost function can be specified through `Params`. This would be useful in certain tasks, like the vehicle-following task where the distance to the lead vehicle should not be included in the computation of the `dist_to_obstacles` cost function.
- Unified the computation of `dist_to_destination` (previously known as `completion`) and `steps` (i.e., time taken) as functions inside the cost functions module, instead of computing them separately in a different module.
- In the metrics module, the records which is the raw metrics data and the scoring which is the formula to compute the final results are now separated to provided greater flexibility for applying metrics to different environments.
- Benchmark listing may specify specialised metric formula for each benchmark.
- Changed `benchmark_runner_v0.py` to only average records across scenarios that share the same environment. Records are not averaged across different environments, because the scoring formula may differ in different environments.
- Renamed GapBetweenVehicles cost to VehicleGap cost in metric module.
- Camera metadata now uses radians instead of degrees.
- The `Panda3d` implementation of `Renderer` has been extracted from the interface and moved to `smarts.p3d`.
- Made all metrics as functions to be minimised, except the overall score which is to be maximised.
- Driving SMARTS 2023.3 benchmark and the metrics module now uses `actor_of_interest_re_filter` from scenario metadata to identify the lead vehicle.
- Included `RelativeTargetPose` action space to the set of allowed action spaces in `platoon-v0` env.
- `Collision.collidee_id` now gives the vehicle id rather than the name of the owner of the vehicle (usually the agent id.) `Collision.collidee_owner_id` now provides the id of the controlling `agent` (or other controlling entity in the future.) This is because 1) `collidee_id` should refer to the body and 2) in most cases the owner name would be `None`.
- Entry tactics now use conditions to determine when they should capture an actor.
Deprecated
Fixed
- Fixed issues related to waypoints in junctions on Argoverse maps. Waypoints will now be generated for all paths leading through the lane(s) the vehicle is on.
- Fixed an issue where Argoverse scenarios with a `Mission` would not run properly.
- `Trip.actor` field is now effective. Previously `actor` had no effect.
- Fixed an issue where building sumo scenarios would sometimes stall.
- `VehicleIndex` no longer segfaults when attempting to `repr()` it.
- Fixed issues related to waypoints in SUMO maps. Waypoints in junctions should now return all possible paths through the junction.
- Fixed CI tests for metrics.
- Fixed `traffic_histories_to_observations` script.
- Fixed an issue where the actor states and vehicle states were not synchronized after simulation vehicle updates resulting in different values from the simulation frame.
- Minor fix in regular expression compilation of `actor_of_interest_re_filter` from scenario metadata.
- Fixed acceleration and jerk computation in comfort metric, by ignoring vehicle position jitters smaller than a threshold.
- Fixed an issue in Envision where vehicle debug info would not update correctly.
Removed
- Removed the deprecated `waymo_browser` utility.
- Removed camera observation `created_at` attribute from metadata to make observation completely reproducible.
- Removed `cached_property` as a dependency.
Security

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.