I am using acados in Matlab. I wonder how to get the objective function value from ocp in Matlab. I tried to directly call “ocp.get_cost” to get the cost value. But I compared the value with the cost I computed by myself and they are totally different. Is the function “ocp.get_cost” exactly output the cost value or is there something I missed?
Thanks a lot in advance!