Open lrapetti opened 5 years ago
From my understanding the name is read from the Gazebo
_sensor
name in https://github.com/robotology/gazebo-yarp-plugins/blob/master/plugins/forcetorque/src/ForceTorque.cc#L75, which would explain why the name of the sensor is used in the case world +gazebo_icub_robotname.ini
commented, since it is usingl_foot_ft_sensor
that is the name of the sensor as defined in the model (see https://github.com/robotology/icub-models/blob/master/iCub/robots/iCubGazeboV2_5/model.urdf#L2437). But it is not clear to me where/why should be used thegazeboYarpPluginsRobotName
instead, what is the difference when using the world, and so how to fix it.
Do not get confused but all the different quantities called "name". : )
The port in which data of the sensor is published is opened by the wrapper device, that is not aware of being used inside gazebo at all, and is opened in https://github.com/robotology/gazebo-yarp-plugins/blob/master/plugins/forcetorque/src/ForceTorque.cc#L85 . The gazeboYarpPluginsRobotName
variable used by those conf files, if not explicitly defined in the .ini
file should be obtained in https://github.com/robotology/gazebo-yarp-plugins/blob/06255f1a1b30580b74e237449ba2be79836d2a62/libraries/singleton/src/ConfHelpers.cc#L125 . I guess there is something different in the sensor name when the model is loaded via the world vs when is spawned, this is probably a Gazebo problem. Not sure if https://bitbucket.org/osrf/gazebo/issues/2228/inconsistent-behavior-in-scoped-name could be related.
This always make me feel like a bad person (we can have a f2f meeting if you want). :D
This always make me feel like a bad person (we can have a f2f meeting if you want). :D
@traversaro Thanks! No, I got the point. It is just that I already went through this 'names' trap, but I got tricked again :D.
As observed in https://github.com/robotology/gazebo-yarp-plugins/issues/436, the
forcetorque
sensor ports are opened with the sensor name instead of the robot name prefix when using a Gazebo world and with thegazebo_icub_robotname.ini
commented (this is useful when working with multiple robots: https://github.com/robotology/icub-gazebo-wholebody/blob/devel/worlds/two_icubs_standup_world/README.md): e.g.gazebo_icub_robotname.ini
gazebo_icub_robotname.ini
gazebo_icub_robotname.ini
commentedgazebo_icub_robotname.ini
commentedThis is a problem because:
From my understanding the name is read from the Gazebo
_sensor
name in https://github.com/robotology/gazebo-yarp-plugins/blob/master/plugins/forcetorque/src/ForceTorque.cc#L75, which would explain why the name of the sensor is used in the case world +gazebo_icub_robotname.ini
commented, since it is usingl_foot_ft_sensor
that is the name of the sensor as defined in the model (see https://github.com/robotology/icub-models/blob/master/iCub/robots/iCubGazeboV2_5/model.urdf#L2437). But it is not clear to me where/why should be used thegazeboYarpPluginsRobotName
instead, what is the difference when using the world, and so how to fix it.