smarts.core.plan module
- class smarts.core.plan.LapMission(start: ~smarts.core.plan.Start, goal: ~smarts.core.plan.Goal, route_vias: ~typing.Tuple[str, ...] = <factory>, start_time: float = 9223372036854775807, entry_tactic: ~smarts.sstudio.sstypes.entry_tactic.EntryTactic | None = None, via: ~typing.Tuple[~smarts.core.plan.Via, ...] = (), vehicle_spec: ~smarts.core.plan.VehicleSpec | None = None, num_laps: int | None = None, route_length: float | None = None)[source]
A mission requiring a number of laps through the goal.
- is_complete(vehicle_state, distance_travelled: float) bool [source]
If the mission has been completed.
- num_laps: int | None = None
- route_length: float | None = None
A navigation mission describing a desired trip.
Generate an endless mission.
If the mission has been completed successfully.
A mission that starts from a random location and continues indefinitely.
If the mission requires a route to be generated.
- class smarts.core.plan.Plan(road_map: RoadMap, mission: NavigationMission | None = None, find_route: bool = True)[source]
Describes a navigation plan (route) to fulfill a mission.
- create_route(mission: NavigationMission, start_lane_radius: float | None = None, end_lane_radius: float | None = None)[source]
Generates a route that conforms to a mission.
- Parameters:
mission (Mission) – A mission the agent should follow. Defaults to endless if None.
start_lane_radius (Optional[float]) – Radius (meter) to find the nearest starting lane for the given mission. Defaults to a function of _default_lane_width of the underlying road_map.
end_lane_radius (Optional[float]) – Radius (meter) to find the nearest ending lane for the given mission. Defaults to a function of _default_lane_width of the underlying road_map.
- classmethod from_frame(plan_frame: PlanFrame, road_map: RoadMap) Plan [source]
Generate the plan from a frame.
- property mission: NavigationMission | None
The mission this plan is meant to fulfill.
- class smarts.core.plan.PlanFrame(road_ids: List[str], mission: NavigationMission | None)[source]
Describes a plan that is serializable.
- mission: NavigationMission | None
- road_ids: List[str]
- class smarts.core.plan.PositionalGoal(position: Point, radius: float)[source]
A goal that can be completed by reaching an end area.
- classmethod from_road(road_id: str, road_map: RoadMap, lane_index: int = 0, lane_offset: float | None = None, radius: float = 1)[source]
Generate the goal ending at the specified road lane.
- radius: float
- class smarts.core.plan.Start(position: ndarray, heading: Heading, from_front_bumper: bool | None = True)[source]
A starting state for a route or mission.
- from_front_bumper: bool | None = True
- position: ndarray
- class smarts.core.plan.TraverseGoal(road_map: RoadMap)[source]
A TraverseGoal is satisfied whenever an Agent-driven vehicle successfully finishes traversing a non-closed (acyclic) map It’s a way for the vehicle to exit the simulation successfully, for example, driving across from one side to the other on a straight road and then continuing off the map. This goal is non-specific about where the map is exited, save for that the vehicle must be going the correct direction in its lane just prior to doing so.
- class smarts.core.plan.VehicleSpec(veh_id: str, veh_config_type: str, dimensions: Dimensions)[source]
Vehicle specifications
- dimensions: Dimensions
- veh_config_type: str
- veh_id: str
- class smarts.core.plan.Via(lane_id: str, road_id: str, lane_index: int, position: Tuple[float, float], hit_distance: float, required_speed: float)[source]
Describes a collectible item that can be used to shape rewards.
- hit_distance: float
- lane_id: str
- lane_index: int
- position: Tuple[float, float]
- required_speed: float
- road_id: str
- smarts.core.plan.default_entry_tactic(default_entry_speed: float | None = None) EntryTactic [source]
The default tactic the simulation will use to acquire an actor for an agent.