pNeuma_simulator.gang.navigation module
- pNeuma_simulator.gang.navigation.decay(vel: float, theta: float) → ndarray[source]
Calculate the decay angles for a given velocity and angle.
- Parameters:
vel (float) – The velocity value.
theta (float) – The angle value.
- Returns:
An array of decay angles.
- Return type:
alphas (numpy.ndarray)
- pNeuma_simulator.gang.navigation.egress(alphas, indices, counts, cond, rng) → float[source]
Find interior egress point in the horizon.
- Parameters:
alphas (list) – angle choice set in radians.
indices (list) – indices of non zero intervals.
counts (list) – difference between consecutive indices.
cond (list) – condition, boolean list.
- Returns:
egreess point in radians
- Return type:
float
- pNeuma_simulator.gang.navigation.navigate(ego: Particle, agents: list[Particle], integer: int, d_max) → tuple[source]
Anticipatory operational navigation
- Parameters:
ego (Particle) – ego vehicle to be updated
agents (list) – list of agents in the simulation
integer (int) – random seed
d_max (float) – horizon distance.
- Returns:
target and desired directions in radians, angle choice set in radians, corresponding distance to collision in meters and time to collision in seconds.
- Return type:
tuple
- pNeuma_simulator.gang.navigation.target(alphas, f_a, d_max, rng) → tuple[source]
Find consecutive runs and length of runs with condition.
- Parameters:
alphas (list) – angle choice set in radians.
f_a (list) – distance to collision values in meters.
d_max (int) – distance to horizon in meters.
- Returns:
target and desired directions in radians
- Return type:
tuple