Skip to content
Snippets Groups Projects
Commit 6bce07ce authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Do not use the model name as the name of the robot uses 'robot'

'robot' is generic and should not be a problem as long as we do
not handle multiple robots.
parent d2c32ca6
Branches
Tags
No related merge requests found
Pipeline #10210 canceled
......@@ -25,15 +25,13 @@ bool parameter_server_read_robot_description()
std::string parameter_name("/robot_description");
nh.getParam(parameter_name,robot_description);
pinocchio::Model model;
pinocchio::urdf::buildModelFromXML(robot_description, model);
std::string model_name("robot");
ROS_INFO("Robot name : %s.",model.name.c_str());
// Search for the robot util related to robot_name.
sot::RobotUtilShrPtr aRobotUtil = sot::getRobotUtil(model.name);
sot::RobotUtilShrPtr aRobotUtil = sot::getRobotUtil(model_name);
// If does not exist then it is created.
if (aRobotUtil != sot::RefVoidRobotUtil())
aRobotUtil = sot::createRobotUtil(model.name);
aRobotUtil = sot::createRobotUtil(model_name);
// If the creation is fine
if (aRobotUtil != sot::RefVoidRobotUtil())
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment