Pedestrian collision avoidance with a local dynamic goal

We present here a general formalism for equipping simulated pedestrians with an avoidance mechanism. The central idea is to use a short-range target which is adjusted dynamically depending on the environment and thus modulating the desired velocity of the agent. This formulation can be implemented over any type of existing pedestrian model, being force-based or rule-based. As an example, we implement a simple instance of the formulation which is adjusted to reproduce previous reported and available experimental data of collision avoidance in scenarios of low density. The proposed minimal model shows good agreement with the real trajectories and other macroscopic observables.


Introduction
In the simulation of pedestrian movements, the collision avoidance mechanisms are a key issue. The algorithm performing this task should be both, computationally efficient and realistic. In the case of social force models [1,2], the basic avoidance is provided by the repulsive social force acting on the particle. This "social" force is an artificial force and may produce collateral effects [3,4]. More advanced avoidance models consider future positions, try to anticipate a collision and apply an evasive force on the center of mass of the particles [5]. Other variant consist in applying a decision layer based on the optimization of a cost/energy function before the compute of the "social" force [6,7].
However, one important ingredient of force based models is the driving force which aims the particle toward a long-distance and fixed goal. This concept of a goal or target seems to be very general which is present, not only in force based models, but also in off-lattice cellular automata models [8]. In the real system of free pedestrian (without contact), the only force acting on the agents is the driving force, which is the locomotion mechanism that self-propels the individual. All steering maneuvers are performed through changes in the propulsion direction. This fact was already considered [9][10][11][12] and inspired us to postulate (Sec. 2) a new family of models that only use the particle propulsion in order to avoid collisions with obstacles or other moving particles without resorting to fictitious forces or mechanisms.
This framework is independent of the type of of low-level model being force-based, rule-based or other. For example, it could be implemented on the Social Force Model [1,2], by replacing the social force with a variable desired velocity that takes into account the possible future collisions [13].
Under this approach, the problem lies in postulating the heuristics required for computing the variable desired velocity depending on the environment. As in the traditional pedestrian theoretical models, any arbitrary heuristics can be proposed (for example, [11,14]) and then the free parameters could be tuned in order to obtain simulated trajectories that approach experimental micro or macroscopic data.
In this work, as an application example of this new family of general models, we propose a simple implementation of a navigation model in diluted systems (Sec. 2.1). Then, we use it to reproduce three different scenarios (a pedestrian avoiding a fixed obstacle, two pedestrian who initiate at 90° relative at the supposed collision point and two groups of two pedestrians each with a potential collision at 90 degrees). In each scenario we compare the simulated trajectories with real ones obtained in experiments performed in an empty parking lot [10] adjusting the only two free parameters in the model. As product of this adjust we obtain simulations with good agreement with experimental trajectories.

The model
Our general framework, postulated that particle i, with position xi, has of a temporary and shortrange goal (gi t (t)) which is dynamically placed depending on the environment. When the path to the fixed goal is free of any future collision, thus the temporary goal will be aligned with it. In other case, gi t (t) will produce a detour in the trajectory in order to avoid all kind of collisions.
The environment is defined by the fixed long-distance goal (gi); the positions (xj) and the relative velocities (vj rel ) of the nearest neighbors and obstacles. We denote this general function as H (Eq. (1)) and a graphic representation of the quantities involved are presented in Fig. 1. (1) In its general form gi t (t) determines the avoidance direction, but also it has a magnitud that could be used for adjusting the speed of the agent.
The function H is completely general and, of course, it can take any form. Note that some previous works, have presented particular implementations, calling to this kind of approach "cognitive heuristic" [11,15].
It is important to remark, that this general formulation does not depend on the type of low-level operational model, being force-based or rule-based. In other words, the general heuristic that determines the placement of a local and dynamic goal could be defined for any kind of pedestrian dynamics model, no matter if it is first-order, second-order or other.

A possible instance of function H
As a test bed for the formulation we present in this work a minimal implementation of the function H. Only some simple configurations in a diluted pedestrian system are considered, which corresponds to the experimental data of avoiding a fixed obstacle and pedestrian collisions in 90º crossing [10]. Under this conditions, it was observed that only steering maneuvers are performed, without abrupt changes in the speed [10]. Thus, we make the approximation that the local dynamic goal is represented by^that is the unit vector pointing in the direction of (gi t (t)). This versor, only alters the direction of the desired velocity, keeping a constant speed.
Each simulated pedestrian i, has an associated radius ri that is used for collision predictions. The particle velocity is designated by vi(t) and has constant magnitud vi. Following the notation of Fig.1 and Fig. 2, gi is the fixed global target. When the particle at xi detects a future collision with any other particle or obstacle, our minimal implementation propose to calculate the temporary goal (gi t ) as a weighted sum of two versors with origin at xi: a) , the one pointing toward the final goal (gi); and b) , the one pointing toward a temporal avoidance goal (gi a ): (2) where dc is the distance from xi (t) to the future position at collision time xi (tc) and the weighting factor are given by a sigmoid function being b an offset that makes sa(0) = 0.99; and the parameter > 0 is the inverse of avoidance length determining the distance at which the particle's velocity is influenced by a potential collision. This function (Eq. 3) tends to zero when distance x tends to infinity and it tends to one when x tends to zero. The above described quantities are presented in Fig. 2.
One more definition is needed in order to complete the proposed avoidance mechanism, which is the positioning of the avoidance goal gi a . To this end, we first consider the direction from particle at xi (t) toward its final goal gi. Then, we take the segment at minimum distance from this line to the particle (or obstacle) j. The unit vector is then defined passing from particle j perpendicular and pointing opposite to the line joining xi with its fixed goal gi. In Fig. 2 we illustrate this quantities.
where da is a parameter determining the distance between the avoidance goal (g a ) and the position of particle j (see Fig. 2) To understand the spirit of this avoidance target we can think that in the case in which the obstacle is fixed (vj=0) the simulated agent will decide to avoid it by the closest points perpendicular in the direction to its global target. In the very particular case of perfect alignment (agent-obstacle-target), n p is defined such us n p 1.n g 2 -n p 2.n g 1 < 0, where the subindex 1 and 2 indicates the cartesian coordinates. This last condition produce that the agent go through the right side.
In the case in which the the obstacle is a mobile pedestrian ( ≠ 0), gi a is positioning at the opposite side with respect to the motion of the potential colliding agent because of the definition of n p (see Fig.2). Now, having calculated , we can obtain from Eq. (2) and then compute the dynamically- Finally, the evolution of particles is given in the present implementation based on a first order model This mean value of the velocity is taken in order to give some inertia to the movement of agents, which could be increased by taking a higher time lag ( ( − )).
The presented minimal model only considers trajectories with constant speed corresponding to diluted systems. Thus, a natural limitation is that avoiding maneuvers with drastic changes in the speed will not be well reproduced. However, we should notice that this simple model is shown just as an example of the general framework outlined at the beginning of Sec. 2, which does not have this limitation as an infinity number of heuristics or models, that suit this framework, could be proposed.

Simulated scenarios
The studied scenarios of potential collisions are inspired by the low density cases studied experimentally in [10,15]. In particular the ones sketched in Fig. 3. The constant speed v selected for each particle it was took as the mean speed of the corresponding experimental particles.

Simulations vs. experimental data
From the minimal model described in Sec. 2.1, the free variables that can be tuned in order to Proceedings from the 9th International Conference on Pedestrian and Evacuation Dynamics (PED2018) Lund, Sweden -August 21-23, 2018 approach experimental data are the parameters a (Eqs. 2 and 3) and da (Fig.2). In all cases we compare the simulated and experimental trajectories one by one. For the case of 4 pedestrians (Fig. 3C) a macroscopic property is also used as benchmark.
First, we consider the simple case of one pedestrian avoiding an obstacle as shown in Fig. 3A. For each particular experimental trajectory, a search in the (a, da) space can be performed. In order to do that, we choose as measure of error the mean absolute distance between both trajectories (< E >). The Fig. 4 shows an example of this search (Fig. 4A) and the resulting trajectory compared with the experimental one (Fig. 4B). The best parameter values found in this case are a = 0.5 m -1 , da = 0.9 m. It can be observed that the main difference between both trajectories is the swing of the experimental one, not taken into account by the model. However, this would not be difficult to consider by adding a sinusoidal modulation to the desired velocity, with amplitud and frequency corresponding to the mechanism of walking by taking steps. In order to keep the model simple, we neglect this correction in the present work.
The next scenario, analyzed corresponds to the one shown in Fig. 3B, i.e.: two walking pedestrians with trajectories at 90º. We take a particular set in which can be observed that one of the agents decides not to make any avoidance maneuver, while the other change his/her velocity. Thus in the simulation we set the parameter a >> 1 for the former pedestrian and only adjust the parameters of the avoiding one. The result of this simulation and the comparison with the corresponding experimental trajectories can be seen in Fig.5A. The parameters found for particle j are a = 6 m -1 , da = 0.3 m. Finally, the configuration shown in Fig.3C is considered. The potential collision of two against two pedestrians at 90º which is generally achieved keeping each group of two people together (Fig. 5B). On the other hand, in some cases the four trajectories are interlaced (one group split) as shown in Fig. 5C.
Besides describing trajectories in agreement with the experimental ones, another macroscopic observable is considered: the minimum distance between each pair of potential colliding particle ( ). It was measured from experiments that in the scenarios given by Fig.5B and C, this minimum distance is all the available trajectories: experimental = 1.10 ± 0.40m and simulated = 0.97 ± 0.45m.

Conclusion
In summary, we have proposed a general framework for collision avoidance which is valid for any kind of operational-level model being second order or first order. As an application example we present a minimal model which allows navigation in dilute systems. Simulations reproduced experimental trajectories of pedestrians avoiding 90º potential collisions and one pedestrian avoiding one fixed obstacle. Also, the minimum distance between avoiding agents are in good agreement with experiments.
As a next step, it must be defined the transition from diluted to congested state of the system, in which avoidance mechanisms shut down (or reduce drastically), in particular, the presented model could tend to the "Contractile Particle Model" [8] when density became high enough.
The present contribution is a step forward in the pursuit of efficient and realistic large-scale pedestrian simulation models and we expect that a new family of models can be created.