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

fix incorrect check on nlopt initial step size #108

Closed plusk01 closed 3 years ago

plusk01 commented 4 years ago

Machine: Ubuntu 18.04 / ROS Melodic

When using the example code (as outlined in README) with default waypoints, nlopt works fine. I changed the waypoints to { (0,0,1), (0,1,1), (0, 2, 1), (1,2,1) } and get

E0523 22:24:15.674819 30226 polynomial_optimization_nonlinear_impl.h:505] error while setting up nlopt: nlopt invalid argument

I traced it back to the nlopt_->set_initial_step(initial_step); line and realized that the initial step size check was no good. Need to be using epsilon instead of lowest.

[ WARN] [1590287087.016327259]: lowest: -1.79769e+308
[ WARN] [1590287087.016402808]: epsilon: 2.22045e-16
rikba commented 3 years ago

Thanks. LGTM!