Target#
The parametrization of a (G2) curve by length.
The function returns position, tangential orientation and curvature at a coordinate, like:
def curve(coordinate: SupportsFloat) -> tuple[Vector2, float, float]]: ... return (position, orientation, curvature)
The projection of a curve parametrized by length.
The function finds the coordinate in
[begin, end]wherecurve(coordinate)is nearest to the given point point, like:def projection(point: Vector2Like, begin: SupportsFloat, end: SupportsFloat) -> 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, updatescoordinatewith 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:
The current coordinate during tracking. A negative value means undefined.
- Type:
The parametrized curve
- Type:
The curve length
- Type:
Whether the path is an infinite loop
- Type:
The projection
Represents the union of all targets supported by a generic
Behaviorposes
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
angular_direction – The angular direction
path – The path
position_tolerance – The position tolerance
orientation_tolerance – The orientation tolerance
Overloaded function.
satisfied(point: Vector2Like) -> 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.
satisfied(angle: typing.SupportsFloat) -> 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.
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:
int | None
The angular direction
- Type:
float | None
The angular speed
- Type:
Vector2 | None
The direction
- Type:
float | None
The orientation
- Type:
The orientation tolerance
- Type:
Path | None
The path to follow.
- Type:
Vector2 | None
The position
- Type:
The position tolerance
- Type:
float | None
The speed
- Type:
Verify that a target is set.
- Returns:
True if the target is not empty.