From 6bce07ce8ea31bf5226aa08f41c896851e0e9a1b Mon Sep 17 00:00:00 2001
From: Olivier Stasse <ostasse@laas.fr>
Date: Wed, 24 Jun 2020 16:34:11 +0200
Subject: [PATCH] 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.
---
 src/ros_parameter.cpp | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/ros_parameter.cpp b/src/ros_parameter.cpp
index bbf3554..79e260d 100644
--- a/src/ros_parameter.cpp
+++ b/src/ros_parameter.cpp
@@ -25,17 +25,15 @@ 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 the creation is fine
   if (aRobotUtil != sot::RefVoidRobotUtil())
   {
     // Then set the robot model.
@@ -49,7 +47,7 @@ bool parameter_server_read_robot_description()
 
   // Otherwise something went wrong.
   return false;
-  
+
 }
 
 };
-- 
GitLab