12#include <yarp/os/Time.h>
13#include <yarp/sig/Vector.h>
14#include <yarp/math/Math.h>
20using namespace yarp::sig;
21using namespace yarp::math;
27 printf(
"Ipopt: testing correct installation...\n");
43 double dist=norm(xf-
xhat);
46 printf(
"target position = (%s) [m]\n",xf.toString(5,5).c_str());
47 printf(
"solved position = (%s) [m]\n",
xhat.toString(5,5).c_str());
48 printf(
"distance to target = %g [m] ... ",dist);
51 printf(
"test successful!\n");
56 printf(
"test failed!\n");
A class for defining the iCub Arm.
A Base class for defining a Serial Link Chain.
yarp::sig::Vector EndEffPose(const bool axisRep=true)
Returns the coordinates of end-effector.
yarp::sig::Vector getAng()
Returns the current free joint angles values.
Class for inverting chain's kinematics based on IpOpt lib.
void setUserScaling(const bool useUserScaling, const double _obj_scaling, const double _x_scaling, const double _g_scaling)
Enables/disables user scaling factors.
virtual yarp::sig::Vector solve(const yarp::sig::Vector &q0, yarp::sig::Vector &xd, double weight2ndTask, yarp::sig::Vector &xd_2nd, yarp::sig::Vector &w_2nd, double weight3rdTask, yarp::sig::Vector &qd_3rd, yarp::sig::Vector &w_3rd, int *exit_code=NULL, bool *exhalt=NULL, iKinIterateCallback *iterate=NULL)
Executes the IpOpt algorithm trying to converge on target.
iKinChain * asChain()
Returns a pointer to the Limb seen as Chain object.
#define IKINCTRL_POSE_XYZ