RouteFollowing

open class RouteFollowing<T, L : Euclidean2DConvexShape, R>(action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>, route: List<Euclidean2DPosition>) : DynamicPursuing<T, L, R>

A NavigationStrategy allowing to follow a given route. The route consists of a list of positions (= waypoints) that may or may not be in sight of each other (i.e. the path leading from a waypoint to the next one may or may not be representable as a single segment), for this reason Pursuing behavior is used to reach each waypoint. In this context, a waypoint is considered reached when it's inside the current room (not when the pedestrian reach that exact position), apart from the last waypoint which is actually approached. Cuts to the route are allowed (i.e. if the pedestrian finds a waypoint which is farther than the expected next one, he/she skips all the waypoints in between).

Parameters

T

the concentration type.

L

the type of landmarks of the pedestrian's cognitive map.

R

the type of edges of the pedestrian's cognitive map, representing the Relations between landmarks.

Constructors

Link copied to clipboard
fun RouteFollowing(action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>, route: List<Euclidean2DPosition>)

Functions

Link copied to clipboard
open override fun inNewRoom(newRoom: ConvexPolygon)

This is called whenever the pedestrian enters a new room.

Link copied to clipboard
open override fun inUnexpectedNewRoom(previousRoom: ConvexPolygon, expectedNewRoom: ConvexPolygon, actualNewRoom: ConvexPolygon)

When in an unexpected room the pedestrian gets back to previousRoom so as to continue following the route correctly.

Link copied to clipboard
fun setDestination(newDestination: Euclidean2DPosition, voidVolatileMemory: Boolean = false)

Changes the destination of the strategy. If voidVolatileMemory is true, the pedestrian's volatile memory is set to zero. This has two effects:

Properties

Link copied to clipboard
open override val action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>

The NavigationAction used to navigate the environment.

Link copied to clipboard
protected open override var destination: Euclidean2DPosition

The destination to pursue.

Inheritors

Link copied to clipboard