Social Forces# class SocialForceBehavior# Bases: Behavior Basic social force algorithm from Helbing, Dirk, and Peter Molnar. “Social force model for pedestrian dynamics.” Physical review E 51.5 (1995): 4282. Registered properties: tau [float] phi [float] c [float] u_a [float] u_r [float] v_a [float] v_r [float] step_duration [float] State: GeometricState __init__(kinematics: navground.core.Kinematics = None, radius: float = 0) → None# Constructs a new instance. Parameters: kinematics – The kinematics of the agent. radius – The radius of the agent. desired_velocity_towards_point(point: Vector2, speed: float, time_step: float) → Vector2# Computes a control velocity towards a desired position Users may override it to specialize a Behavior. The base implementation returns a null vector. Parameters: point – The desired point in world-fixed frame speed – The desired speed time_step – The time step Returns: A velocity in world-fixed frame desired_velocity_towards_velocity(velocity: Vector2, time_step: float) → Vector2# Computes a control velocity towards a desired velocity Users may override it to specialize a Behavior. The base implementation returns a null vector. Parameters: velocity – The desired velocity in world-fixed frame time_step – The time step Returns: A velocity in world-fixed frame get_environment_state() → navground.core.EnvironmentState# Gets the environment state. Returns: The environment state. in_sight(force: Vector2, e: Vector2) → bool# neighbor_potential(neighbor: Neighbor) → Callable[[Vector2], float]# neighbor_repulsion_force(neighbor: Neighbor) → Vector2# obstacle_potential(obstacle: Disc) → Callable[[Vector2], float]# obstacle_repulsion_force(obstacle: Disc) → Vector2# potential() → Callable[[Vector2], float]# segment_potential(line: LineSegment) → Callable[[Vector2], float]# segment_repulsion_force(line: LineSegment) → Vector2# weight(force: Vector2, e: Vector2) → float# weighted(force: Vector2, e: Vector2, sign: int) → Vector2# property c: float# property phi: float# property step_duration: float# property tau: float# property u_a: float# property u_r: float# property v_a: float# property v_r: float#
Social Forces#
Bases:
Behavior
Basic social force algorithm from
Registered properties:
tau
[float]phi
[float]c
[float]u_a
[float]u_r
[float]v_a
[float]v_r
[float]step_duration
[float]State:
GeometricState
Constructs a new instance.
kinematics – The kinematics of the agent.
radius – The radius of the agent.
Computes a control velocity towards a desired position
Users may override it to specialize a
Behavior
.The base implementation returns a null vector.
point – The desired point in world-fixed frame
speed – The desired speed
time_step – The time step
A velocity in world-fixed frame
Computes a control velocity towards a desired velocity
Users may override it to specialize a
Behavior
.The base implementation returns a null vector.
velocity – The desired velocity in world-fixed frame
time_step – The time step
A velocity in world-fixed frame
Gets the environment state.
The environment state.