orocos / orocos_kinematics_dynamics

Orocos Kinematics and Dynamics C++ library
703 stars 408 forks source link

Add degraded status chainiksolverpos #358

Open craigirobot opened 3 years ago

craigirobot commented 3 years ago

The nr position solver currently produces a non-convergence error, if the Cartesian pose does not converge to the desired value within the specified maximum number of iterations. However, the lack of convergence could be due to the singularity avoidance being active leaving the solver in a "degraded" state. So that it cannot achieve the desired pose.

This commit adds a degraded flag which is checked, when the maximum number of iterations is reached. If it is degraded, then the solver error is set to E_DEGRADED and the user can then decide whether it should be allowed to continue. Otherwise, the error is set to E_MAX_ITERATIONS_EXCEEDED which would normally terminate the process. In addition, functions were added to set/get the input parameters (maxiter, eps) and retrieve other data from the solver (twist error, number of iterations, velocity solver status).

MatthijsBurgh commented 3 years ago

Please follow code styler more strictly. Please add more documentations what the new variables are used for.

snrkiwi commented 3 years ago

Please follow code styler more strictly. Please add more documentations what the new variables are used for.

@MatthijsBurgh Where is the code style documented? It seems like over the years that no really style has been enforced here. Are there particular things you're looking for now?

MatthijsBurgh commented 3 years ago

@snrkiwi there is indeed no strict guide. I am aiming for the ros1 style but with 4 space indent

snrkiwi commented 3 years ago

Ok, it'll be good to have a convention. Is there somewhere in the doc's that we can document this, and add a URL to the ROS1 style (along with any modifications)?

MatthijsBurgh commented 3 years ago

We opened an issue a while back, https://github.com/orocos/orocos_kinematics_dynamics/issues/258

craigirobot commented 2 years ago

I am not certain where this stands. Are there specific code style issues that need to be addressed to move this forward? I tried to follow the style that was already being used even though I did not always agree with it. Note that there is already documentation of the new variables in the header file, but I can expand upon that if desired.