Waypoints#

This class implement a task that makes the agent reach a sequence of waypoints, calling Controller.go_to_position for the next waypoint after the current has been reached within a tolerance.

The task notifies when a new waypoint is set by calling a callback.

Registered properties:

Constructs a new instance.

Parameters:
  • waypoints – The waypoints

  • loop – Whether it should start from begin after reaching the last waypoint

  • tolerance – The goal tolerance applied to each waypoint.

  • random – Whether to pick the next waypoint randomly

Type:

int

The size of the data passed to callbacks when events occur, see TaskCallback and Task.add_callback().

The data is composed of 4 numbers: [time, target_x, target_y, target_theta]

Type:

bool

Whether it should start from begin after reaching the last waypoint.

Type:

bool

Whether to pick the next waypoint randomly

Type:

float

The goal tolerance applied to each waypoint.

Type:

list[Vector2]

The waypoints.