Attention Modules

Base Attention Module (abstract)

class mantrap.attention.attention_module.AttentionModule(env: mantrap.environment.base.graph_based.GraphBasedEnvironment, t_horizon: int, **unused)

General attention class.

The filter selects the “important” ados/modes from the list of all ados in the scene. The selection is returned as list of indices of the chosen ados which should be taken into account in further computations. For a unified and general implementation of the filter modules this superclass implements methods for computing and logging the filter, all based on the _compute() method which should be implemented in the child classes.

Parameters
  • t_horizon – planning time horizon in number of time-steps (>= 1).

  • env – environment object reference.

Closest Distance

class mantrap.attention.closest.ClosestModule(env: mantrap.environment.base.graph_based.GraphBasedEnvironment, t_horizon: int, **unused)

Attention based for closest, limited-range pedestrian only.

The closest filter selects the ado that is closest to the robot and thereby is closer than a certain euclidean distance. Thereby merely the positions at time t = t_current are taken into account

\[||pos_{ego}(t) - pos_{ado}(t)||_2 < R_{attention}\]

R_{attention} is called attention radius and is the maximal L2-distance for an ado from the ego to be taken into account for planning (nevertheless it will always be taken into account for forward simulations, in order to prevent deviating much from the actual full-agent planning due to possible behavioral changes of the ados with less agents in the scene).

Euclidean Distance

class mantrap.attention.euclidean.EuclideanModule(env: mantrap.environment.base.graph_based.GraphBasedEnvironment, t_horizon: int, **unused)

Attention based on the euclidean distance between current ego’s and ado’s positions.

The euclidean filter selects the ados that are close, i.e. in a certain euclidean distance from the ego position. Thereby merely the positions at time t = t_current are taken into account

\[||pos_{ego}(t) - pos_{ado}(t)||_2 < R_{attention}\]

R_{attention} is called attention radius and is the maximal L2-distance for an ado from the ego to be taken into account for planning (nevertheless it will always be taken into account for forward simulations, in order to prevent deviating much from the actual full-agent planning due to possible behavioral changes of the ados with less agents in the scene).

Forward Reachability

class mantrap.attention.reachability.ReachabilityModule(env: mantrap.environment.base.graph_based.GraphBasedEnvironment, t_horizon: int, **unused)

Attention based on forward reachability analysis between the ego and all ados.

The reachability deals with the problem that simple euclidean-distance based filtering does not take the agents current velocity into account, merely the position. Forward reachability analysis the boundaries of the area an agent can reach within some time horizon based on its dynamics and current state (position + velocity). When the boundaries of two agents intersect, they could collide within the time-horizon, if they do not there is no way they could.

However forward reachability is fully open-loop, ignoring every kind of interaction between the agents. Using backward reachability (closed-loop) would mean to solve the trajectory optimization problem in the filter itself and would go beyond the scope of the pre-optimization designed filter.