14 #include <hrpModel/Sensor.h> 15 #include <hrpModel/ModelLoaderUtil.h> 36 std::string nameServer = manager->
getConfig()[
"corba.nameservers"];
37 int comPos = nameServer.find(
",");
39 comPos = nameServer.length();
41 nameServer = nameServer.substr(0, comPos);
45 CosNaming::NamingContext::_duplicate(
naming.getRootContext()),
47 std::cerr <<
print_prefix <<
" Failed to load model[" << filename <<
"]" << std::endl;
50 std::cerr <<
print_prefix <<
" Success to load model[" << filename <<
"]" << std::endl;
59 std::cerr <<
print_prefix <<
" Fail to joint path from " << root_link_name <<
" to " << target_link_name << std::endl;
61 std::cerr <<
print_prefix <<
" Success to joint path from " << root_link_name <<
" to " << target_link_name <<
" (dof = " << jpe->numJoints() << std::endl;
68 for (
unsigned int i = 0;
i <
m_robot->numJoints();
i++ ) {
71 m_robot->calcForwardKinematics();
77 for (
unsigned int i = 0;
i <
m_robot->numJoints();
i++ ) {
86 hrp::dvector qrefv = hrp::dvector::Zero(jpe->numJoints());
88 for (
size_t i = 0;
i < 3;
i++) {
92 jpe->calcInverseKinematics2Loop(vel_p, vel_r, 1.0, 0.002, 0.0, &qrefv);
int _getJointAngles(double *ja)
static std::string print_prefix("[jpe]")
int initializeOpenHRPModel(char *_filename)
int initializeJointPathExInstance(char *root_link_name, char *target_link_name)
boost::shared_ptr< JointPathEx > JointPathExPtr
coil::Properties & getConfig()
static Manager * init(int argc, char **argv)
int loadBodyFromModelLoader(::World *world, const char *name, const char *url, CosNaming::NamingContext_var cxt)
hrp::BodyPtr m_robot(new hrp::Body())
int _calcInverseKinematics2Loop(double *_vel_p, double *_vel_r)
int _setJointAngles(double *ja)