pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
728 stars 164 forks source link

ErrorExecutionTimeCalculation error. #68

Closed Linjackffy closed 3 years ago

Linjackffy commented 3 years ago

I'm using ruckig for cartesian path following in a real robot. Everything works good except sometimes ruckig throws out error of ErrorExecutionTimeCalculation. I cannot figure out why this happen. Could you please give me some hint for this problem?

Below is the input paramemters which caused this error:

    Ruckig<6> otg{ 0.004 };
    InputParameter<6> input;
    OutputParameter<6> output;

    input.synchronization = Synchronization::Phase;
    input.duration_discretization = DurationDiscretization::Discrete;

    // Set input parameters
    input.max_velocity = { 0.8500000000000001,0.8500000000000001,0.8500000000000001,1.335176867432892,1.335176867432892,1.335176867432892 };
    input.max_acceleration = { 4.25,4.25,4.25,6.675884337164463,6.675884337164463,6.675884337164463 };
    input.max_jerk = { 85.00000000000001,85.00000000000001,85.00000000000001,133.5176867432892,133.5176867432892,133.5176867432892 };

    input.current_position = { -0.05598571695553641,-0.534847776106059,0.0978130731424748,3.136698722809273,-0.01434670387813161,2.832195281955185 };
    input.current_velocity = { -0.03425673149926184,-0.8169926404190487,-0.004506245841081729,1.139482307830643e-10,-3.35385646630826e-11,1.031715187788022e-10 };
    input.current_acceleration = { -2.720000000000001,1.440254448401435,0,0,0,0 };

    input.target_position = { -0.0534691276550293,-0.6224863891601563,0.09690575408935546,3.136698722839355,-0.01434670388698578,2.832195281982422 };
    input.target_velocity = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
    input.target_acceleration = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
pantor commented 3 years ago

This should be fixed by the latest commit, and was added as a test cast to the CI. Thanks for reporting!