ethz-asl / mav_trajectory_generation

Polynomial trajectory generation and optimization, especially for rotary-wing MAVs.
Apache License 2.0
528 stars 222 forks source link

Individual MaximumMagnitudeConstraint per segment #93

Closed chhtz closed 5 years ago

chhtz commented 5 years ago

Is it possible to give individual v_max constraints per segment? I only found the addMaximumMagnitudeConstraint method, which sets a global constraint.

rikba commented 5 years ago

Hi @chhtz

I think currently it's only possible to give one set of constraints per trajectory. You'd have to define an optimization problem for each trajectory with different constaints and concatenate these afterwards..

chhtz commented 5 years ago

Thanks for the response. Not sure, how I would get smooth transitions between the sub-trajectories with your suggestion.

What I'm doing at the moment is manually calculating the segment-times (using computeTimeVelocityRamp) and just do a linear optimization based on that. I'm sure, I'll overshoot near the transition points, but for now this is sufficient for me.