Commit 0dc68303 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[transition test] add path to kinematicConstraint obj and param to reduce size...

[transition test] add path to kinematicConstraint obj and param to reduce size of constraints in addLimb api.
See commit 0ca10d8 in rbprm
parent 440b4ee6
......@@ -260,7 +260,8 @@ module hpp
void addLimb(in string id, in string limb, in string effector, in floatSeq offset, in floatSeq normal,
in double x, in double y, in unsigned long samples, in string heuristicName,
in double resolution, in string contactType, in double disableEffectorCollision,
in double grasp,in floatSeq limbOffset) raises (Error);
in double grasp,in floatSeq limbOffset,
in string kinematicConstraintsPath, in double kinematicConstraintsMin) raises (Error);
/// Add a limb not used for contact generation
/// \param id user given name of the new limb
......
......@@ -176,14 +176,17 @@ class FullBody (object):
# This can be problematic in terms of performance. The default value is 3 cm.
# \param contactType whether the contact is punctual ("_3_DOF") or surfacic ("_6_DOF")
# \param disableEffectorCollision: whether collision detection should be disabled for end effector bones
def addLimb(self, limbId, name, effectorname, offset, normal, x, y, samples, heuristicName, resolution, contactType="_6_DOF",disableEffectorCollision = False, grasp =False,limbOffset=[0,0,0]):
# \param kinematicConstraintsPath : path that point to the .obj file containing the kinematic constraints of the limb,
# if not set the default is "package://hpp-rbprm-corba/com_inequalities/"+name+"_com_constraints.obj"
# \param kinematicConstraintsMin : add an additionnal inequalities on the kinematicConstraints, of normal (0,0,1) and origin (0,0,kinematicConstraintsMin)
def addLimb(self, limbId, name, effectorname, offset, normal, x, y, samples, heuristicName, resolution, contactType="_6_DOF",disableEffectorCollision = False, grasp =False,limbOffset=[0,0,0],kinematicConstraintsPath = "", kinematicConstraintsMin = 0.):
boolValEff = 0.
if(disableEffectorCollision):
boolValEff = 1.
graspv = 0.
if(grasp):
graspv = 1.
self.client.rbprm.rbprm.addLimb(limbId, name, effectorname, offset, normal, x, y, samples, heuristicName, resolution,contactType, boolValEff,graspv,limbOffset)
self.client.rbprm.rbprm.addLimb(limbId, name, effectorname, offset, normal, x, y, samples, heuristicName, resolution,contactType, boolValEff,graspv,limbOffset,kinematicConstraintsPath,kinematicConstraintsMin)
self.limbNames += [limbId]
## Returns the configuration of a limb described by a sample
......
......@@ -1139,7 +1139,7 @@ namespace hpp {
}
void RbprmBuilder::addLimb(const char* id, const char* limb, const char* effector, const hpp::floatSeq& offset, const hpp::floatSeq& normal, double x, double y,
unsigned int samples, const char* heuristicName, double resolution, const char *contactType, double disableEffectorCollision, double grasp, const hpp::floatSeq &limbOffset) throw (hpp::Error)
unsigned int samples, const char* heuristicName, double resolution, const char *contactType, double disableEffectorCollision, double grasp, const hpp::floatSeq &limbOffset, const char *kinematicConstraintsPath, double kinematicConstraintsMin) throw (hpp::Error)
{
if(!fullBodyLoaded_)
throw Error ("No full body robot was loaded");
......@@ -1159,7 +1159,7 @@ namespace hpp {
cType = hpp::rbprm::_3_DOF;
}
fullBody()->AddLimb(std::string(id), std::string(limb), std::string(effector), off,limbOff, norm, x, y,
problemSolver()->collisionObstacles(), samples,heuristicName,resolution,cType,disableEffectorCollision > 0.5, grasp > 0.5);
problemSolver()->collisionObstacles(), samples,heuristicName,resolution,cType,disableEffectorCollision > 0.5, grasp > 0.5,kinematicConstraintsPath,kinematicConstraintsMin);
}
catch(std::runtime_error& e)
{
......
......@@ -244,7 +244,7 @@ namespace hpp {
virtual void addLimb(const char* id, const char* limb, const char* effector, const hpp::floatSeq& offset, const hpp::floatSeq& normal, double x, double y,
unsigned int samples, const char *heuristicName, double resolution, const char *contactType,
double disableEffectorCollision, double grasp,const hpp::floatSeq& limbOffset) throw (hpp::Error);
double disableEffectorCollision, double grasp,const hpp::floatSeq& limbOffset,const char* kinematicConstraintsPath, double kinematicConstraintsMin) throw (hpp::Error);
virtual void addNonContactingLimb(const char* id, const char* limb, const char* effector, unsigned int samples) throw (hpp::Error);
virtual void addLimbDatabase(const char* databasePath, const char* id, const char* heuristicName, double loadValues,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment