25#ifndef __IKINIPOPT_H__
26#define __IKINIPOPT_H__
58 virtual void exec(
const yarp::sig::Vector &xd,
const yarp::sig::Vector &q) = 0;
117 yarp::sig::Matrix &
getC() {
return C; }
248 const double tol,
const double constr_tol,
250 const unsigned int verbose=0,
bool useHessian=
true);
341 void setTol(
const double tol);
386 void setUserScaling(
const bool useUserScaling,
const double _obj_scaling,
387 const double _x_scaling,
const double _g_scaling);
411 void setBoundsInf(
const double lower,
const double upper);
451 virtual yarp::sig::Vector
solve(
const yarp::sig::Vector &q0, yarp::sig::Vector &xd,
452 double weight2ndTask, yarp::sig::Vector &xd_2nd, yarp::sig::Vector &w_2nd,
453 double weight3rdTask, yarp::sig::Vector &qd_3rd, yarp::sig::Vector &w_3rd,
470 virtual yarp::sig::Vector
solve(
const yarp::sig::Vector &q0, yarp::sig::Vector &xd,
471 double weight2ndTask, yarp::sig::Vector &xd_2nd, yarp::sig::Vector &w_2nd);
479 virtual yarp::sig::Vector
solve(
const yarp::sig::Vector &q0, yarp::sig::Vector &xd);
Class for dealing with additional iCub arm's constraints.
void update(void *)
Updates internal state.
void clone(const iKinLinIneqConstr *obj)
A class for defining the iCub Arm.
A Base class for defining a Serial Link Chain.
Class for inverting chain's kinematics based on IpOpt lib.
void attachLIC(iKinLinIneqConstr &lic)
Attach a iKinLinIneqConstr object in order to impose constraints of the form lB <= C*q <= uB.
void setTol(const double tol)
Sets cost function tolerance.
double getConstrTol() const
Retrieves constraints tolerance.
iKinLinIneqConstr & getLIC()
Returns a reference to the attached Linear Inequality Constraints object.
double getMaxCpuTime() const
Retrieves the current value of Maximum CPU seconds.
std::string get_posePriority() const
Returns the Pose priority settings.
void setConstrTol(const double constr_tol)
Sets constraints tolerance.
void setHessianOpt(const bool useHessian)
Selects whether to rely on exact Hessian computation or enable Quasi-Newton approximation (Hessian is...
void setUserScaling(const bool useUserScaling, const double _obj_scaling, const double _x_scaling, const double _g_scaling)
Enables/disables user scaling factors.
bool set_posePriority(const std::string &priority)
Sets the Pose priority for weighting more either position or orientation while reaching in full pose.
unsigned int get_ctrlPose() const
Returns the state of Pose control settings.
virtual ~iKinIpOptMin()
Default destructor.
int getMaxIter() const
Retrieves the current value of Maximum Iteration.
double getTol() const
Retrieves cost function tolerance.
void setMaxIter(const int max_iter)
Sets Maximum Iteration.
void getBoundsInf(double &lower, double &upper)
Returns the lower and upper bounds to represent -inf and +inf.
void setDerivativeTest(const bool enableTest, const bool enable2ndDer=false)
Enable\disable derivative test at each call to solve method (disabled at start-up by default).
iKinChain & get2ndTaskChain()
Retrieves the 2nd task's chain.
void setBoundsInf(const double lower, const double upper)
Sets the lower and upper bounds to represent -inf and +inf.
void set_ctrlPose(const unsigned int _ctrlPose)
Sets the state of Pose control settings.
void specify2ndTaskEndEff(const unsigned int n)
Selects the End-Effector of the 2nd task by giving the ordinal number n of last joint pointing at it.
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.
void setVerbosity(const unsigned int verbose)
Sets Verbosity.
void setMaxCpuTime(const double max_cpu_time)
Sets Maximum CPU seconds.
Class for defining iteration callback.
virtual void exec(const yarp::sig::Vector &xd, const yarp::sig::Vector &q)=0
Defines the callback body to be called at each iteration.
Class for defining Linear Inequality Constraints of the form lB <= C*q <= uB for the nonlinear proble...
virtual iKinLinIneqConstr & operator=(const iKinLinIneqConstr &obj)
Copies a LinIneqConstr object into the current one.
yarp::sig::Matrix & getC()
Returns a reference to the constraints matrix C.
double & getUpperBoundInf()
Returns a reference to the internal representation of +inf.
bool isActive()
Returns the state of inequality constraints evaluation.
yarp::sig::Vector & getlB()
Returns a reference to the lower bounds vector lB.
virtual void update(void *)
Updates internal state.
virtual void clone(const iKinLinIneqConstr *obj)
yarp::sig::Vector & getuB()
Returns a reference to the upper bounds vector uB.
double & getLowerBoundInf()
Returns a reference to the internal representation of -inf.
void setActive(bool _active)
Sets the state of inequality constraints evaluation.
iKinLinIneqConstr()
Default Constructor.
#define IKINCTRL_DISABLED
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.