Target#

The parametrization of a (G2) curve by length.

The function returns position, tangential orientation and curvature at a coordinate, like:

def curve(coordinate: float) -> tuple[Vector2, float, float]]:
   ...
   return (position, orientation, curvature)

The projection of a curve parametrized by length.

The function finds the coordinate in [begin, end] where curve(coordinate) is nearest to the given point point, like:

def projection(point: Vector2, begin: float, end: float) -> float:
   ...
   return coordinate

A generic, twice differentiable, curve (to follow), parametrized by length.

Constructs a new instance.

Parameters:
  • projection – The projection

  • curve_fn – The parametrized curve

  • length – The curve length

  • loop – Whether the path is an infinite loop

Returns the point the point corresponding the track() coordinate.

Parameters:
  • position – The position

  • look_ahead – The look ahead distance

Returns:

The point.

Returns the coordinate ahead of a position

It projects the point to the curve using project, updates coordinate with this value. It returns the value advanced by the look- ahead distance.

Parameters:
  • position – The position

  • look_ahead – The look ahead distance

Returns:

The coordinate.

Type:

float

The current coordinate during tracking. A negative value means undefined.

Type:

Curve

The parametrized curve

Type:

float

The curve length

Type:

bool

Whether the path is an infinite loop

Type:

Projection

The projection

Represents the union of all targets supported by a generic Behavior

  • poses

  • positions

  • orientations

  • directions

  • velocities

  • twists

  • paths to be followed to reach a position

Constructs a target to follow a direction.

Parameters:

direction – The direction

Returns:

The target

Constructs a target to reach an orietation.

Parameters:
  • orientation – The orientation

  • tolerance – The tolerance

Returns:

The target

Constructs a target to reach a point.

Parameters:
  • position – The target position

  • tolerance – The tolerance

  • along_path – The path to follow

Returns:

The target

Constructs a target to reach a pose.

Parameters:
  • pose – The pose

  • position_tolerance – The position tolerance

  • orientation_tolerance – The orientation tolerance

  • along_path – The path to follow

Returns:

The target

Constructs a target to stop.

Returns:

The target

Constructs a target to follow a twist.

Parameters:

twist – The twist

Returns:

The target

Constructs a target to follow a velocity.

Parameters:

velocity – The velocity

Returns:

The target

Constructs a new instance.

Parameters:
  • position – The position

  • orientation – The orientation

  • speed – The speed

  • direction – The direction

  • angular_speed – The angular speed

  • path – The path

  • position_tolerance – The position tolerance

  • orientation_tolerance – The orientation tolerance

Overloaded function.

  1. satisfied(point: Vector2) -> bool

Returns whether a given orientation satisfies the target.

The target is satisfied if it does not have an angular speed and if the given value is near to the target’s orientation.

Parameters:

angle – The orientation

Returns:

True if the target is satisfied.

  1. satisfied(angle: float) -> bool

Returns whether a given position satisfies the target.

The target is satisfied if it does not have an linear speed and if the given value is near to the target’s position.

Parameters:

point – The position

Returns:

True if the target is satisfied.

  1. satisfied(pose: navground.core.Pose2) -> bool

Returns whether a given pose satisfies the target.

The target is satisfied if the position and orientation are both satisfied.

Parameters:

pose – The pose

Returns:

True if the target is satisfied.

Type:

Optional[float]

The angular speed

Type:

Optional[Vector2]

The direction

Type:

Optional[float]

The orientation

Type:

float

The orientation tolerance

Type:

Optional[navground.core.Path]

The path to follow.

Type:

Optional[Vector2]

The position

Type:

float

The position tolerance

Type:

Optional[float]

The speed

Type:

bool

Verify that a target is set.

Returns:

True if the target is not empty.