AIS-Bonn / opt_control

Time-optimal Trajectory Generation and Control
95 stars 28 forks source link

Waypoints with undefined components cannot work properly #6

Closed hclin77923 closed 5 years ago

hclin77923 commented 5 years ago

Hello sir,

First of all, I would like to express my appreciation in sharing this trajectory generation library. The jerk bounded trajectory generation is very fast.

However, the undefined component (NaN) in the example.m could not run properly. I didn't change anything in your code except switching the index_example to 5 (The one with undefined component). The error message is as shown below.

Domain error. To compute complex results from real x, use 'sqrt(complex(x))'.
Error in coder.internal/error (line 19)
Error in sqrt (line 12)
Error in  .^  (line 118)
Error in coder.internal/applyBinaryScalarFunction (line 40)
Error in  .^  (line 58)
Error in  .^  (line 49)
Error in  ^  (line 40)
Error in ab_O_P (line 7)
Error in solve_O (line 209)
Error in synchronize_trajectory (line 44)
Error in opt_control (line 94)
Error in opt_control_lib (line 12)
Error in example (line 173)
[J_setp_struct,solution_out,T_waypoints,P,V,A,J,t] =
opt_control_lib_mex(State_start,Waypoints,V_max,V_min,A_max,A_min,J_max,J_min,A_global,b_comp_global,b_sync_V,b_sync_A,b_sync_J,b_sync_W,b_rotate,b_best_solution,b_hard_vel_limit,b_catch_up,solution_in,ts_rollout); 

I believe the trajectory generation with undefined component will be very useful for multi-segment trajectory generation. It would be nice to see this bug be fixed. Thank you!

Danielxyz123 commented 5 years ago

Hello,

by the way one question. Do you use the mex-File with a Matlab Coder?

Thx

hclin77923 commented 5 years ago

I don't have matlab coder. I use the mex file that the author provided directly.

MariusBeul commented 5 years ago

Hi,

hclin77923 thank you for your feedback! I was able to reproduce the bug and fixed this issue. Feel free to report further errors!

hclin77923 commented 5 years ago

Hello sir,

Thank you for the response. I saw you updated the mex file for Linux OS. Could you also provide one in windows, i.e. the mexw file? Thanks!

Best Regards, John

MariusBeul commented 5 years ago

Hi, I now also updated the windows version. Feel free to test it!

titou-B commented 5 years ago

Hi,

I have the same error with the c++ implementation :

Domain error. To compute complex results from real x, use 'sqrt(complex(x))'.
Error in error (line 19) 
[1]    4953 abort      ./devel/lib/opt_control/opt_control_node

Did you update the _opt_controllib.a library as well ?

thank you !

MariusBeul commented 5 years ago

Hi titou-B,

I could not reproduce this behavior. Can you please send me the exact inputs and your ROS version?

Thank you!

Von: "titou-B" notifications@github.com An: "AIS-Bonn/opt_control" opt_control@noreply.github.com CC: "Marius Beul" mbeul@ais.uni-bonn.de, "State change" state_change@noreply.github.com Gesendet: Dienstag, 9. Juli 2019 10:27:32 Betreff: Re: [AIS-Bonn/opt_control] Waypoints with undefined components cannot work properly (#6)

Hi,

I have the same error with the c++ implementation : Domain error. To compute complex results from real x, use 'sqrt(complex(x))'. Error in error (line 19) [1] 4953 abort ./devel/lib/opt_control/opt_control_node

Did you update the opt_control_lib.a library as well ?

thank you !

— You are receiving this because you modified the open/close state. Reply to this email directly, [ https://github.com/AIS-Bonn/opt_control/issues/6?email_source=notifications&email_token=ABRL5GEJA3B7NYIXBTCV2SDP6RDXJA5CNFSM4G5HLC72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZPQQJQ#issuecomment-509544486 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABRL5GBC3RGBBE4AMXZVGEDP6RDXJANCNFSM4G5HLC7Q | mute the thread ] .