40template <
class Distance,
class Input>
155 const State& goal)
const;
185 const State& goal)
const;
213 const State& inflectionPoint,
227 Distance_t ComputeDistanceFromTime(
const units::second_t& time,
229 const State& initial)
const;
241 Velocity_t ComputeVelocityFromTime(
const units::second_t& time,
243 const State& initial)
const;
255 units::second_t ComputeTimeFromVelocity(
const Velocity_t& velocity,
271 const State& initial)
const;
284 const State& current,
285 const State& goal)
const;
296 bool ShouldFlipInput(
const State& current,
const State& goal)
const;
Profile constraints.
Definition: ExponentialProfile.h:81
Input_t maxInput
Maximum unsigned input voltage.
Definition: ExponentialProfile.h:111
A_t A
The State-Space 1x1 system matrix.
Definition: ExponentialProfile.h:114
Constraints(Input_t maxInput, A_t A, B_t B)
Constructs constraints for an ExponentialProfile.
Definition: ExponentialProfile.h:90
Constraints(Input_t maxInput, kV_t kV, kA_t kA)
Constructs constraints for an ExponentialProfile from characteristics.
Definition: ExponentialProfile.h:100
Velocity_t MaxVelocity() const
Computes the max achievable velocity for an Exponential Profile.
Definition: ExponentialProfile.h:108
B_t B
The State-Space 1x1 input matrix.
Definition: ExponentialProfile.h:117
Profile timing.
Definition: ExponentialProfile.h:61
bool IsFinished(const units::second_t &t) const
Decides if the profile is finished by time t.
Definition: ExponentialProfile.h:75
units::second_t totalTime
Total profile time.
Definition: ExponentialProfile.h:67
units::second_t inflectionTime
Profile inflection time.
Definition: ExponentialProfile.h:64
Profile state.
Definition: ExponentialProfile.h:121
bool operator==(const State &) const =default
Distance_t position
The position at this state.
Definition: ExponentialProfile.h:124
Velocity_t velocity
The velocity at this state.
Definition: ExponentialProfile.h:127
A Exponential-shaped velocity profile.
Definition: ExponentialProfile.h:41
units::second_t TimeLeftUntil(const State ¤t, const State &goal) const
Calculates the time it will take for this profile to reach the goal state.
Definition: ExponentialProfile.inc:54
ExponentialProfile(const ExponentialProfile &)=default
State Calculate(const units::second_t &t, const State ¤t, const State &goal) const
Calculates the position and velocity for the profile at a time t where the current state is at time t...
Definition: ExponentialProfile.inc:21
ProfileTiming CalculateProfileTiming(const State ¤t, const State &goal) const
Calculates the time it will take for this profile to reach the inflection point, and the time it will...
Definition: ExponentialProfile.inc:63
units::compound_unit< Distance, units::inverse< units::seconds > > Velocity
Definition: ExponentialProfile.h:45
ExponentialProfile & operator=(ExponentialProfile &&)=default
units::compound_unit< Input, units::inverse< Acceleration > > KA
Definition: ExponentialProfile.h:55
ExponentialProfile & operator=(const ExponentialProfile &)=default
ExponentialProfile(ExponentialProfile &&)=default
ExponentialProfile(Constraints constraints)
Constructs a ExponentialProfile.
Definition: ExponentialProfile.inc:16
units::compound_unit< Input, units::inverse< Velocity > > KV
Definition: ExponentialProfile.h:53
units::compound_unit< Velocity, units::inverse< units::seconds > > Acceleration
Definition: ExponentialProfile.h:48
State CalculateInflectionPoint(const State ¤t, const State &goal) const
Calculates the point after which the fastest way to reach the goal state is to apply input in the opp...
Definition: ExponentialProfile.inc:45
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition: base.h:1434
Definition: AprilTagPoseEstimator.h:15