armour.trajectory.PiecewiseArmTrajectory

class armour.trajectory.PiecewiseArmTrajectory(trajOptProps: TrajOptProps, startState: ArmRobotState, jrsInstance: JRSInstance)[source]

Bases: Trajectory

The original ArmTD trajectory with piecewise accelerations

__init__(trajOptProps: TrajOptProps, startState: ArmRobotState, jrsInstance: JRSInstance)[source]

The PiecewiseArmTrajectory constructor, which simply sets parameters and attempts to call internalUpdate, a helper function made for this class to update all other internal parameters once fully parameterized

Methods

__init__(trajOptProps, startState, jrsInstance)

The PiecewiseArmTrajectory constructor, which simply sets parameters and attempts to call internalUpdate, a helper function made for this class to update all other internal parameters once fully parameterized

getCommand(time)

Computes the actual input commands for the given time.

internalUpdate()

Update internal parameters to reduce long term calculations

setParameters(trajectoryParams[, ...])

Set the parameters of the trajectory, with a focus on the parameters as the state should be set from the constructor

validate([throwOnError])

Validate that the trajectory is fully characterized

getCommand(time: NDArray[Shape[N], float64]) ArmRobotState[source]

Computes the actual input commands for the given time. throws InvalidTrajectory if the trajectory isn’t set

internalUpdate()[source]

Update internal parameters to reduce long term calculations

setParameters(trajectoryParams: NDArray[Shape[N], float64], startState: ArmRobotState = None, jrsInstance: JRSInstance = None)[source]

Set the parameters of the trajectory, with a focus on the parameters as the state should be set from the constructor

validate(throwOnError: bool = False) bool[source]

Validate that the trajectory is fully characterized