Commit bcf587c8 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

loadFullBodyModel now take only a urdfName and srdfName as input

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