scenic.domains.driving.behaviors
Library of useful behaviors for dynamic agents in driving scenarios.
These behaviors are automatically imported when using the driving domain.
Summary of Module Members
Functions
|
Classes
|
|
|
|
|
|
Follow's the lane on which the vehicle is at, unless the laneToFollow is specified. |
|
Follows the given trajectory. |
|
is_oppositeTraffic should be specified as True only if the laneSectionToSwitch to has the opposite traffic direction to the initial lane from which the vehicle started LaneChangeBehavior e.g. |
|
This behavior uses a controller specifically tuned for turning at an intersection. |
|
Walk forward behavior for pedestrians. |
Member Details
- class FollowLaneBehavior(*args, **kwargs)[source]
Bases:
Behavior
Follow’s the lane on which the vehicle is at, unless the laneToFollow is specified. Once the vehicle reaches an intersection, by default, the vehicle will take the straight route. If straight route is not available, then any availble turn route will be taken, uniformly randomly. If turning at the intersection, the vehicle will slow down to make the turn, safely.
This behavior does not terminate. A recommended use of the behavior is to accompany it with condition, e.g. do FollowLaneBehavior() until …
- Parameters:
target_speed – Its unit is in m/s. By default, it is set to 10 m/s
laneToFollow – If the lane to follow is different from the lane that the vehicle is on, this parameter can be used to specify that lane. By default, this variable will be set to None, which means that the vehicle will follow the lane that it is currently on.
- class FollowTrajectoryBehavior(*args, **kwargs)[source]
Bases:
Behavior
Follows the given trajectory. The behavior terminates once the end of the trajectory is reached.
- Parameters:
target_speed – Its unit is in m/s. By default, it is set to 10 m/s
trajectory – It is a list of sequential lanes to track, from the lane that the vehicle is initially on to the lane it should end up on.
- class LaneChangeBehavior(*args, **kwargs)[source]
Bases:
Behavior
is_oppositeTraffic should be specified as True only if the laneSectionToSwitch to has the opposite traffic direction to the initial lane from which the vehicle started LaneChangeBehavior e.g. refer to the use of this flag in examples/carla/Carla_Challenge/carlaChallenge6.scenic