08-01-2011 02:27 AM
Hi,
I am having an issue using the uncontrained optimization vi. I have used the template for the objective function provided but I can't seem to get it to work. My error message says "LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @."
My application is to find an optimum set of quaternion parameters which describe a rotation between 2 vectors. The vector in this case contains six elements as there are 2 vectors (1 each from individual sensors). To begin with, the obj funciton should be equal to zero (no rotation) and I input the correct quaternion describing this into the optimizer (hence solution is already a minimum??).
But when I run it, the control within the obj function describing the quaterion parameters is NaN and not what I wire to the "Start" input.
Does anyone know what is going on and is able to help me?
Thanks very much,
Tom
(code is attached)
08-02-2011 10:29 AM
Hi tlin067,
I am having so trouble running the code you sent. It appears I am missing Quaternion to Rotation Matrix.vi. Could you resend the code and make sure all the subvi's are included.
Thanks,
Josh Brown
08-02-2011 02:57 PM
HI Josh,
Thanks for the reply. That vi is part of the robotics toolbox. That may mean you are unable to help me?
Cheers,
Tom
08-03-2011 04:57 PM
Hey Tom,
I am going to install the robotics toolbox and take another look at your code. I will get back to you when I have something.
Josh Brown
08-05-2011 11:45 AM
Hey Tom,
So I installed the robotics kit and was able to recreate your error. I think I have figured out were it is actually happening. In your main vi open the Unconstrained Optimization. Then within this vi open Armijo rule stepsize reduction. Then within this open unco_function and gradient. Then open the call object fuction.vi. The error appears to taking place at the reference node within this vi. My computer was giving me the following error: call by reference node in NI_Gmath.lvlib:ucno_call objective funtion.vi:28. I believe this is the root of your problem so try to figure out what is going on with the reference node. I hope this helps.
Josh Brown