HolonomicSample

class wpimath.HolonomicSample(*args, **kwargs)

Bases: TrajectorySample

Represents a single sample in a drivetrain trajectory.

Overloaded function.

  1. __init__(self: wpimath._wpimath.HolonomicSample) -> None

Constructs a default HolonomicSample with all zero values.

  1. __init__(self: wpimath._wpimath.HolonomicSample, time: wpimath.units.seconds, p: wpimath._wpimath.Pose2d, v: wpimath._wpimath.ChassisVelocities, a: wpimath._wpimath.ChassisAccelerations) -> None

Constructs a HolonomicSample.

Parameters:
  • time – The time of the sample relative to the trajectory start.

  • p – The robot pose at this sample (in the field reference frame).

  • v – The robot velocity at this sample (in the field reference frame).

  • a – The robot acceleration at this sample (in the field reference frame).

relative_to(other: wpimath._wpimath.Pose2d) wpimath._wpimath.HolonomicSample

Transforms this sample to be relative to the given pose.

Parameters:

other – The pose to make this sample relative to.

Returns:

A new sample with the relative pose.

transform(transform: wpimath._wpimath.Transform2d) wpimath._wpimath.HolonomicSample

Transforms the pose of this sample by the given transform.

Parameters:

transform – The transform to apply to the pose.

Returns:

A new sample with the transformed pose.