ayushgaud / path_planning

Quadcopter path planning using RRT* and minimum jerk trajectory generation
339 stars 99 forks source link

trajectory_generator crashes #17

Open nikosmitrop1995 opened 4 years ago

nikosmitrop1995 commented 4 years ago

Hello, trajectory_generator crashes when idx_replan increases. The problem comes from this line if(ros::Time::now().toSec() - time_start_replan.toSec() + planner_delay.toSec() > time(idx_replan)) because of time(idx_replan). If I replace time(idx_replan) with time(0) it will not crash but the velocities of the trajectory will be huge (100-60.000 m/s). I have tested the code on another system and it works fine without error and both position and velocities generated. Both of the systems have the same libraries' versions installed: Ubuntu 18.04.4 ROS Melodic eigen3 (3.3.90) libccd (2.0) octomap (1.9.0) fcl (0.5.0) I was wondering what could be the reason that causes the error on only one pc. trajectory_error

minotauros13 commented 4 years ago

Not so sure the problem stems from idx_replan per se. I think the problem comes into play at line 138

Eigen::MatrixXf replan_position = poly_diff(8, 0, (ros::Time::now().toSec() - time_start_replan.toSec() + planner_delay.toSec())/time(idx_replan)) * coefficients.block(8*idx_replan, 0, 8, 3);

Maybe coefficients.block(8*idx_replan, 0, 8, 3), is trying to access an element that is not there (due to idx_replanpointing to out of bounds MatrixXf size)?

You could also check whether the fcl-0.6 version branch returns the same error on both pc systems?

Ackermann10 commented 1 year ago

Did you solve this problem?