TORA: Invalid number in NLP function or derivative detected

On a custom URDF file (fanuc.urdf · GitHub), the tutorial for tora.jl (Tutorial · TORA.jl) always fails with this error:

EXIT: Invalid number in NLP function or derivative detected.
(6.328051371, [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], SolverLog(Matrix{Float64}(undef, 5412, 0), Float64, Float64, Float64, Float64, Float64, -999))

This even happens for unconstrained optimization problems and simple constraints, like the end effector being constrained at a few knots to be close to its current location (via TORA.constrain_ee_position!).

2 Likes

Hi there,

The Invalid number in NLP function or derivative detected means that Ipopt tried to evaluate something like log(0) or 1 / 0.

But since TORA is constructing the problem, I’m not sure what the next step should be. Does your custom file lead to some singularity where there isn’t a feasible solution? You could try changing the initial starting point.

Tagging @ferrolho since they might know more.

Thanks for your suggestions! I have tried a bunch of different initial starting points with the same result.

I have also tried to reduce the robot down to two joints (https://gist.github.com/andreas-botbuilt/bccac78b2bb7f6ea19f77094c2475412) and reduce the number of knots in the problem. This gives the same result.

1 Like

Maybe open an issue at TORA.jl. I haven’t used the package so not much help, unfortunately.

1 Like

Hi @hedonismbot and @odow,

Thank you for trying out TORA.jl, @hedonismbot!

TORA.jl is a library for planning robot motion that takes into account the full-order system dynamics. I.e., it is not a kinematic motion planner, and instead considers the mass/inertia parameters of every link throughout the kinematic chain of a robot.

Your custom URDF file does not seem to have any of these dynamic quantities for each of your robot’s links.

EDIT: Having said that, I am definitely the one to blame for not having implemented a method to check whether the URDF being loaded has all the dynamics quantities required by the package, and then logging a more user-friendly message explaining the problem. Can you please open an issue on GitHub for this?

2 Likes

That makes sense. Here’s the GitHub issue.

2 Likes