path_planning
path_planning copied to clipboard
trajectory_generator crashes
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.
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_replan
pointing 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?
Did you solve this problem?