1 #ifndef __JOINT_PATH_EX_H__ 2 #define __JOINT_PATH_EX_H__ 7 #include <coil/stringutil.h> 18 JointPathEx(
BodyPtr&
robot,
Link* base,
Link* end,
double control_cycle,
bool _use_inside_joint_weight_retrieval =
true,
const std::string& _debug_print_prefix =
"");
22 const double LAMBDA,
const double avoid_gain = 0.0,
const double reference_gain = 0.0,
const hrp::dvector* reference_q = NULL,
23 const double vel_gain = 1.0,
78 const std::string& prop_string,
79 const std::string& instance_name);
83 const std::string& prop_string,
84 const std::string& instance_name);
101 N_DOF = _m_robot->numJoints();
105 q_oldold.resize(N_DOF);
108 for(
int i=0;
i<N_DOF;
i++)q(
i) = _m_robot->joint(
i)->q;
109 q_oldold = q_old = q;
110 dq = ddq = hrp::dvector::Zero(N_DOF);
111 base_p_oldold = base_p_old = base_p = _m_robot->rootLink()->p;
112 base_R_old = base_R = _m_robot->rootLink()->R;
113 base_dR = base_w_hat = hrp::Matrix33::Zero();
114 base_w_old = base_w = base_dw = hrp::Vector3::Zero();
115 is_initialized =
true;
130 #endif //__JOINT_PATH_EX_H__ bool calcJacobianInverseNullspace(dmatrix &J, dmatrix &Jinv, dmatrix &Jnull)
std::vector< Link * > joints
bool setInterlockingJointPairIndices(const std::vector< std::pair< Link *, Link *> > &pairs, const std::string &print_str="")
JointPathEx(BodyPtr &robot, Link *base, Link *end, double control_cycle, bool _use_inside_joint_weight_retrieval=true, const std::string &_debug_print_prefix="")
std::vector< std::pair< size_t, size_t > > interlocking_joint_pair_indices
boost::shared_ptr< JointPathEx > JointPathExPtr
void setOptionalWeightVector(const std::vector< double > &_opt_w)
std::vector< double > avoid_weight_gain
double getManipulabilityLimit()
void calcRootLinkWrenchFromInverseDynamics(hrp::BodyPtr _m_robot, InvDynStateBuffer &_idsb, hrp::Vector3 &_f_ans, hrp::Vector3 &_t_ans)
void setMaxIKIteration(int iter)
void calcAccelerationsForInverseDynamics(const hrp::BodyPtr _m_robot, InvDynStateBuffer &_idsb)
std::vector< size_t > joint_limit_debug_print_counts
int calcSRInverse(const dmatrix &_a, dmatrix &_a_sr, double _sr_ratio, dmatrix _w)
bool setManipulabilityLimit(double l)
bool calcInverseKinematics2(const Vector3 &end_p, const Matrix33 &end_R, const double avoid_gain=0.0, const double reference_gain=0.0, const dvector *reference_q=NULL)
void getInterlockingJointPairIndices(std::vector< std::pair< size_t, size_t > > &pairs)
bool use_inside_joint_weight_retrieval
double manipulability_gain
unsigned int numJoints() const
void readVirtualForceSensorParamFromProperties(std::map< std::string, hrp::VirtualForceSensorParam > &vfs, hrp::BodyPtr m_robot, const std::string &prop_string, const std::string &instance_name)
void setMaxIKError(double epos, double erot)
std::string debug_print_prefix
void getOptionalWeightVector(std::vector< double > &_opt_w)
void readInterlockingJointsParamFromProperties(std::vector< std::pair< Link *, Link *> > &pairs, hrp::BodyPtr m_robot, const std::string &prop_string, const std::string &instance_name)
bool calcInverseKinematics2Loop(const Vector3 &dp, const Vector3 &omega, const double LAMBDA, const double avoid_gain=0.0, const double reference_gain=0.0, const dvector *reference_q=NULL)
std::vector< double > optional_weight_vector
void updateInvDynStateBuffer(InvDynStateBuffer &_idsb)
size_t debug_print_freq_count
void setInitState(const hrp::BodyPtr _m_robot, const double _dt)
double manipulability_limit
bool setManipulabilityGain(double l)
void calcWorldZMPFromInverseDynamics(hrp::BodyPtr _m_robot, InvDynStateBuffer &_idsb, hrp::Vector3 &_zmp_ans)