Commit 2df7953d authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[pg.cpp] Read model from parameter server and from robot name "robot"

Not anymore from file.
parent d9679694
......@@ -27,10 +27,14 @@
//#define VP_DEBUG
//#define VP_DEBUG_MODE 45
#include <pinocchio/fwd.hpp>
#include <stdexcept>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <sot/core/debug.hh>
#include <sot/core/robot-utils.hh>
#ifdef VP_DEBUG
class sotPG__INIT {
public:
......@@ -669,13 +673,13 @@ bool PatternGenerator::buildModel(void) {
<< " PatternGenerator::buildModel "
<< "The robot with name " << model_name
<< " was not found !";
throw std::invalid_arguments(oss.str());
throw std::invalid_argument(oss.str());
ok=false;
return false;
}
// Then set the robot model.
aRobotUtil->get_parameter(parameter_name,lrobot_description);
lrobot_description = aRobotUtil->get_parameter(lparameter_name);
pinocchio::urdf::buildModelFromXML(lrobot_description,
pinocchio::JointModelFreeFlyer(),
......
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