CppAD::cg::CGException: what(): GreaterThanZero cannot be called for non-parameters #179
Replies: 5 comments
-
Are you able to run the same code without using CppADCodeGen; i.e, just using CppAD ? |
Beta Was this translation helpful? Give feedback.
-
Since I am quite new to CppAD and CppADCodeGen and I am only using it inside an existing open source library I am not sure how can I do this. |
Beta Was this translation helpful? Give feedback.
-
Just a guess for what can be a solution, based on previous issues I may have to replace the condition below |
Beta Was this translation helpful? Give feedback.
-
Yes, that should solve your problem, but it involves changing eigen's code ? |
Beta Was this translation helpful? Give feedback.
-
indeed, I have managed to work around by re implementing the eigen function I needed using Please let me know if you are aware of a different way without modifying eigen's source code, otherwise the issue can be closed. thanks |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am using CppAD in a robotics application for differentiating the robot forward kinematics. Sorry for not providing a compact piece of code to reproduce the issue for now, I will try to describe the problem. My overall application is using CppAD through a CPPAdInterface. The idea is that the user defines the function adFunction_ to be differentiated. Then the models are created, compiled with CppAD and saved through createModels.
In my case the
adFunction_
is defined as the orientation of a robot frame, which is given as rotation matrix from the software used for kinematics (pinocchio
in my case) but has to be converted to euler angles through the Eigen::MatrixBase< Derived >::eulerAngles.So my code looks like this:
, where
getOrientationCppAd
added asadFunction_
of aCppAdInterface
object.The type declarations used can be found here.
I have noticed that when using the
eulerAngles()
function I get the following error during compiling with CppAD.More in particular I have been trying to trace the problem inside
eulerAngles
function and it seems that the problem was found in this line when evaluating(!odd)
inside the if statement. However this expression inside an if condition is also used in another line above which does not cause a problem during compilation.Do you have an idea of what may be the issue?
Beta Was this translation helpful? Give feedback.
All reactions