Commit bcf587c8 authored by Pierre Fernbach's avatar Pierre Fernbach

loadFullBodyModel now take only a urdfName and srdfName as input

parent 8f543eae
......@@ -70,23 +70,22 @@ module hpp
in string urdfSuffix, in string srdfSuffix)
raises (Error);
/// Load fullbody robot model
///
/// Create a RbprmFullBody object
/// The device automatically has an anchor joint called "base_joint" as
/// root joint.
/// \param trunkRobotName the name of the robot trunk used for collision.
///
/// \param robotName Name of the robot that is constructed,
/// \param rootJointType type of root joint among "anchor", "freeflyer",
/// "planar",
/// \param packageName Name of the ROS package containing the model,
/// \param modelName Name of the package containing the model
/// \param urdfSuffix suffix for urdf file,
/// \param urdfName name of the urdf file. It may contain
/// "file://", or "package://" prefixes.
/// \param srdfName name of the srdf file. It may contain
/// "file://", or "package://" prefixes.
///
/// The ros url are built as follows:
/// "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
/// "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"
///
void loadFullBodyRobot (in string trunkRobotName, in string rootJointType,
in string packageName, in string modelName,
in string urdfSuffix, in string srdfSuffix, in string selectedProblem)
void loadFullBodyRobot (in string robotName, in string rootJointType,
in string urdfName, in string srdfName, in string selectedProblem)
raises (Error);
/// Create a RbprmFullBody object
......
......@@ -118,13 +118,17 @@ void RbprmBuilder::loadRobotCompleteModel(const char* robotName, const char* roo
}
}
void RbprmBuilder::loadFullBodyRobot(const char* robotName, const char* rootJointType, const char* packageName,
const char* modelName, const char* urdfSuffix, const char* srdfSuffix,
void RbprmBuilder::loadFullBodyRobot(const char* robotName,
const char* rootJointType,
const char* urdfName,
const char* srdfName,
const char* selectedProblem) throw(hpp::Error) {
try {
hpp::pinocchio::DevicePtr_t device = pinocchio::Device::create(robotName);
hpp::pinocchio::urdf::loadRobotModel(device, std::string(rootJointType), std::string(packageName),
std::string(modelName), std::string(urdfSuffix), std::string(srdfSuffix));
hpp::pinocchio::urdf::loadModel(device, 0, "",
std::string (rootJointType),
std::string (urdfName),
std::string (srdfName));
std::string name(selectedProblem);
fullBodyLoaded_ = true;
fullBodyMap_.map_[name] = rbprm::RbPrmFullBody::create(device);
......
......@@ -165,8 +165,10 @@ class RbprmBuilder : public virtual POA_hpp::corbaserver::rbprm::RbprmBuilder {
const char* modelName, const char* urdfSuffix,
const char* srdfSuffix) throw(hpp::Error);
virtual void loadFullBodyRobot(const char* robotName, const char* rootJointType, const char* packageName,
const char* modelName, const char* urdfSuffix, const char* srdfSuffix,
virtual void loadFullBodyRobot(const char* robotName,
const char* rootJointType,
const char* urdfName,
const char* srdfName,
const char* selectedProblem) throw(hpp::Error);
virtual void loadFullBodyRobotFromExistingRobot() throw(hpp::Error);
......
Markdown is supported
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