Open v-morlock opened 2 months ago
When I change the jerk of the last DOF to something different, the error is gone...
Hi!
This is interesting. I ran your code against the original C++ Ruckig, from which this is ported, and got exactly the same error. I do not have adequate understanding of the Ruckig algorithm, so if you think this is an error, I would suggest contacting the author of the C++ version. Once the possible issue is fixed in original Ruckig, it will be updated here.
You will find the C++ version here: https://github.com/pantor/ruckig
Here is my C++ test code, which reproduces the error:
#include <iostream>
#include <ruckig/ruckig.hpp>
int main() {
constexpr size_t DOFs {4};
RuckigThrow<DOFs> otg {0.0004};
InputParameter<DOFs> input;
input.current_position = { 3.0017279999860462,
0.8910770000000000,
-90.0000000000000000,
0.2120000000000000 };
input.current_velocity = { 0.0000000000000000,
0.0000000000000000,
0.0000000000000000,
0.0000000000000000 };
input.current_acceleration = { 0.0000000000000000,
0.0000000000000000,
0.0000000000000000,
0.0000000000000000 };
input.target_position = { 1.0954848240358788,
1.3018323350364962,
-90.0000000000000000,
0.2170000000000000 };
input.target_velocity = { 0.0000000000000000,
0.0000000000000000,
0.0000000000000000,
0.0000000000000000 };
input.target_acceleration = { 0.0000000000000000,
0.0000000000000000,
0.0000000000000000,
0.0000000000000000 };
input.max_velocity = { 1.7100000000000000,
1.7100000000000000,
216.0000000000000000,
0.4000000000000000 };
input.max_acceleration = { 3.6000000000000001,
3.6000000000000001,
1440.0000000000000000,
1.0000000000000000 };
input.max_jerk = { 27.0000000000000000,
27.0000000000000000,
2880.0000000000000000,
20.0000000000000000 };
Trajectory<DOFs> traj;
try {
otg.calculate(input, traj);
}
catch (const std::exception& e) {
std::cout << "Caught exception: " << e.what() << std::endl;
}
catch (...) {
std::cout << "Caught unknown exception" << std::endl;
}
return 0;
}
Hi!
Do you have any ideas on why this code here fails with "ErrorExecutionTimeCalculation" or what I could do differently for it to work?
Thanks, Valentin