Open lrapetti opened 5 years ago
However, in the
controlBoard
ports we don't have this problem since the name is derived from the parent model name:
Don't get confused by the ambiguous used of "robotName", in controlBoard that variable is not used as the prefix for the wrapper. This is not a problem in the controlboard due to the use of a the loadConfigModelPlugin
function, that in turns calls GazeboYarpPlugins::addGazeboEnviromentalVariablesModel
that defines gazeboYarpPluginsRobotName
even if it not explicitly set in the .ini
conf file, see https://github.com/robotology/gazebo-yarp-plugins/blob/06255f1a1b30580b74e237449ba2be79836d2a62/libraries/singleton/include/GazeboYarpPlugins/ConfHelpers.hh#L57 for more info. Instead of loading the ini
file directly, the externalwrench plugin should load it via the loadConfigModelPlugin
helper function.
When the
gazebo_icub_robotname.ini
is commented out, as described in order to use multiple robots (https://github.com/robotology/icub-gazebo-wholebody/blob/devel/worlds/two_icubs_standup_world/README.md), theapplyExternalWrench/rpc:i
port is open without the prefix:gazebo_icub_robotname.ini
:gazebo_icub_robotname.ini
commented:while I would expect it to be:
This is a problem for the following reasons:
This problem seems to be due to the fact that the robot name is empty when not specified in the
.ini
because it is read from thegazeboYarpPluginsRobotName
variable: https://github.com/robotology/gazebo-yarp-plugins/blob/06255f1a1b30580b74e237449ba2be79836d2a62/plugins/externalwrench/src/ApplyExternalWrench.cc#L40However, in the
controlBoard
ports we don't have this problem since the name is derived from the parent model name: https://github.com/robotology/gazebo-yarp-plugins/blob/d748428fcb8b1f75a9981af2263dad0be2171833/plugins/controlboard/src/ControlBoard.cc#L76 So the external wrench plugin should be changed to work as the control-board.see also https://github.com/robotology/gazebo-yarp-plugins/issues/436