createVoltageConstrainedProfile
fun createVoltageConstrainedProfile(length: Double, beginEndVel: Double, kV: Double, kA: Double, kS: Double, maxVoltage: (Double) -> Double, resolution: Double): CancelableProfile
Generates a complete voltage-constrained profile with cancellation capability. This creates forward and backward profiles, merges them, and adds cancellation constraints.
Return
CancelableProfile with optimal profile and cancellation constraints
Parameters
length
Total displacement length
beginEndVel
Beginning and ending velocity (must be same for feasibility)
kV
Velocity constant (velocity per unit voltage)
kA
Acceleration constant (acceleration per unit voltage)
kS
Static voltage offset (for static friction, etc.)
maxVoltage
Function returning maximum voltage at each displacement
resolution
Sampling resolution for constraints