Skip to content

Commit

Permalink
Update ForceTorque.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Nov 29, 2021
1 parent 33d8c1e commit 3e6294b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/forcetorque/src/ForceTorque.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd
driver_properties.put(YarpForceTorqueScopedName.c_str(), m_sensorName.c_str());

#ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS
bool disable_wrapper = driver_properties.check("disableImplicitNetworkWrapperServer");
bool disable_wrapper = driver_properties.check("disableImplicitNetworkWrapper");
if (!disable_wrapper) {
//Open the wrapper
//Force the wrapper to be of type "analogServer" (it make sense? probably no)
Expand All @@ -92,6 +92,11 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd
return;
}
}
if (disable_wrapper && !driver_properties.check("yarpDeviceName"))
{
yError() << "GazeboYarpForceTorque : missing yarpDeviceName parameter for device" << m_sensorName;
return;
}
#endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS

//Open the driver
Expand Down

0 comments on commit 3e6294b

Please sign in to comment.