Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorSynchronizationCalculation error #129

Open
fricher opened this issue May 24, 2022 · 0 comments
Open

ErrorSynchronizationCalculation error #129

fricher opened this issue May 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@fricher
Copy link

fricher commented May 24, 2022

Hello @pantor , ruckig fails to compute a trajectory from these parameters:

const double cycle_time = .004;

ruckig::Ruckig<6,true> ruckig(cycle_time);
ruckig::InputParameter<6> inp;
ruckig::Trajectory<6> traj;

inp.control_interface = ruckig::ControlInterface::Position;
inp.synchronization = ruckig::Synchronization::Phase;
inp.duration_discretization = ruckig::DurationDiscretization::Continuous;
inp.current_position = {1.635923973038584, -0.02664577603159074, 1.398772409994243, 0.7204359129215889, 0.7531949879258638, -0.3527181789404736};
inp.current_velocity = {0.5997002460539949, 0.657823987334049, 0.6544488698370342, 0.6534667437575569, 0.6578239873340388, 0.6578239873340486};
inp.current_acceleration = {-2.111156774102785, -4.363323129985824, -3.853477374887802, -4.32029086362776, -4.363323129985824, -4.363323129985824};
inp.target_position = {1.6863294690542, 0.02475975543627795, 1.450144052898067, 0.7716208457168268, 0.8046005193937291, -0.301312647472602};
std::ranges::fill(inp.target_velocity, 0);
std::ranges::fill(inp.target_acceleration, 0);
inp.target_velocity = {0, 0, 0, 0, 0, 0};
inp.max_velocity = {5.235987755982989, 3.926990816987241, 3.926990816987241, 6.649704450098396, 5.427973973702365, 8.587019919812102};
inp.max_acceleration = {4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824};
inp.max_jerk = {43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824};

auto result = ruckig.calculate(inp, traj);

The result:

[ruckig] error in step 2 in dof: 3 for t sync: 0.200762 input:
inp.current_position = [1.635923973038584, -0.02664577603159074, 1.398772409994243, 0.7204359129215889, 0.7531949879258638, -0.3527181789404736]
inp.current_velocity = [0.5997002460539949, 0.657823987334049, 0.6544488698370342, 0.6534667437575569, 0.6578239873340388, 0.6578239873340486]
inp.current_acceleration = [-2.111156774102785, -4.363323129985824, -3.853477374887802, -4.32029086362776, -4.363323129985824, -4.363323129985824]
inp.target_position = [1.6863294690542, 0.02475975543627795, 1.450144052898067, 0.7716208457168268, 0.8046005193937291, -0.301312647472602]
inp.target_velocity = [0, 0, 0, 0, 0, 0]
inp.target_acceleration = [0, 0, 0, 0, 0, 0]
inp.max_velocity = [5.235987755982989, 3.926990816987241, 3.926990816987241, 6.649704450098396, 5.427973973702365, 8.587019919812102]
inp.max_acceleration = [4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824, 4.363323129985824]
inp.max_jerk = [43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824, 43.63323129985824]

It seems to happen only when one or more dofs have an acceleration equal to their limit.

Thanks for your help !

@pantor pantor added the bug Something isn't working label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants