From bea46d3a7ec8106fb7393b6912d4d03241b37877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2?= Date: Thu, 18 Nov 2021 15:53:14 +0100 Subject: [PATCH 1/8] gazebo_yarp_imu: add the support for the open without wrapper Morever it now handles the `yarpDeviceName` parameter --- plugins/imu/src/IMU.cc | 56 +++++++++++++++++++++++--------- plugins/robotinterface/README.md | 15 +++++---- 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/plugins/imu/src/IMU.cc b/plugins/imu/src/IMU.cc index d987b12b2..e825d1516 100644 --- a/plugins/imu/src/IMU.cc +++ b/plugins/imu/src/IMU.cc @@ -67,9 +67,12 @@ void GazeboYarpIMU::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) _sensor->SetActive(true); // Add my gazebo device driver to the factory. + std::string netWrapper{""}; + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + netWrapper = "inertial"; + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS ::yarp::dev::Drivers::factory().add(new ::yarp::dev::DriverCreatorOf< ::yarp::dev::GazeboYarpIMUDriver> - ("gazebo_imu", "inertial", "GazeboYarpIMUDriver")); - + ("gazebo_imu", netWrapper.c_str(), "GazeboYarpIMUDriver")); bool configuration_loaded = GazeboYarpPlugins::loadConfigSensorPlugin(_sensor,_sdf,m_parameters); if (!configuration_loaded) { @@ -80,6 +83,7 @@ void GazeboYarpIMU::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) //Insert the pointer in the singleton handler for retriving it in the yarp driver GazeboYarpPlugins::Handler::getHandler()->setSensor(_sensor.get()); + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS /* * Open the driver wrapper */ @@ -124,32 +128,27 @@ void GazeboYarpIMU::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) yError() << "GazeboYarpIMU Plugin Load failed: error in opening the yarp wrapper"; } + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS /* * Open the imu driver */ //Retrieve part driver properties - ::yarp::os::Bottle imu_properties = m_parameters.findGroup("IMU_DRIVER"); - if(imu_properties.isNull()) - { - yError("GazeboYarpIMU : [IMU_DRIVER] group not found in config file\n"); - return; - } - //Add the model scoped name for later retrieval of the child sensors from the Handler - yarp::os::Bottle& robotNameProp = imu_properties.addList(); - robotNameProp.addString(YarpIMUScopedName); - robotNameProp.addString(m_scopedSensorName); + ::yarp::os::Property imu_properties { {"device", ::yarp::os::Value{"gazebo_imu"}}, + {YarpIMUScopedName, ::yarp::os::Value{m_scopedSensorName}}, + {"sensor_name", ::yarp::os::Value{_sensor->Name()}} + }; - imu_properties.addString("sensor_name"); - imu_properties.addString(_sensor->Name()); //Open the driver - if (m_imuDriver.open(imu_properties)) { - } else { + if (!m_imuDriver.open(imu_properties)) { yError() << "GazeboYarpIMU Plugin Load failed: error in opening yarp driver"; } + //Register the device with the given name + std::string scopedDeviceName; + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS //Attach the part driver to the wrapper if(!m_MASWrapper.view(m_iWrap) || (!m_AdditionalWrapper.view(m_iWrapAdditional))){ yError()<< "GazeboYarpIMU Plugin Load failed: unable to view iMultipleWrapper interfaces"; @@ -161,6 +160,31 @@ void GazeboYarpIMU::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) { yError() << "GazeboYarpIMU: error in connecting wrapper and device "; } + + if(!m_parameters.check("yarpDeviceName")) + { + scopedDeviceName = m_scopedSensorName + "::" + driverList[0]->key; + } + else + { + scopedDeviceName = m_scopedSensorName + "::" + m_parameters.find("yarpDeviceName").asString(); + } + #else + if(!m_parameters.check("yarpDeviceName")) + { + yError() << "GazeboYarpIMU : missing yarpDeviceName parameter for device" << m_scopedSensorName; + return; + } + scopedDeviceName = m_scopedSensorName + "::" + m_parameters.find("yarpDeviceName").asString(); + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + + + if(!GazeboYarpPlugins::Handler::getHandler()->setDevice(scopedDeviceName, &m_imuDriver)) + { + yError()<<"GazeboYarpIMU: failed setting scopedDeviceName(=" << scopedDeviceName << ")"; + return; + } + yInfo() << "Registered YARP device with instance name:" << scopedDeviceName; } } diff --git a/plugins/robotinterface/README.md b/plugins/robotinterface/README.md index 148525963..aee0f058a 100644 --- a/plugins/robotinterface/README.md +++ b/plugins/robotinterface/README.md @@ -1,10 +1,10 @@ gazebo_yarp_robotinterface ========================== -The `gazebo_yarp_robotinterface` plugin permits to load several [YARP devices](http://www.yarp.it/git-master/note_devices.html) that can be attached to YARP devices +The `gazebo_yarp_robotinterface` plugin permits to load several [YARP devices](http://www.yarp.it/git-master/note_devices.html) that can be attached to YARP devices already opened by other Gazebo-YARP plugins using the same XML format used by the [`yarprobotinterface`](http://www.yarp.it/git-master/yarprobotinterface.html) tool and the [`libYARP_robotinterface` C++ library](https://github.com/robotology/yarp/tree/master/src/libYARP_robotinterface). -## Usage +## Usage ### Add the plugin in the SDF model The `gazebo_yarp_robotinterface` plugin can be used by including in any SDF model: @@ -15,7 +15,7 @@ The `gazebo_yarp_robotinterface` plugin can be used by including in any SDF mode - + @@ -66,18 +66,18 @@ The main use of the `gazebo_yarp_robotinterface` plugin is to spawn YARP devices This is achieved by setting the elements in the `` or in the `` list under the `` XML element. In this context, we call this "device instance identified" as **YARP device instance name**, as for devices created by the robotinterface, this is specified by the `name` attribute of the `device` XML tag. It is important not to confuse this with the **YARP device type name**, i.e. the name that identifies the type of plugin that is spawned, i.e. the `type` attribute of the `device` tag. -The `gazebo_yarp_robotinterface` can be attached to any YARP device created by any plugin inside the model, or in any plugin contained in any nested sensor or model. +The `gazebo_yarp_robotinterface` can be attached to any YARP device created by any plugin inside the model, or in any plugin contained in any nested sensor or model. -For historic reason, not all the `gazebo-yarp-plugins` support specifying the **YARP device instance name** for the device that they spawn to permit to use them with the `gazebo_yarp_robotinterface` plugin. If you need to have this functionality in a specific plugin, feel free to open an issue. +For historic reason, not all the `gazebo-yarp-plugins` support specifying the **YARP device instance name** for the device that they spawn to permit to use them with the `gazebo_yarp_robotinterface` plugin. If you need to have this functionality in a specific plugin, feel free to open an issue. **Warning: as the YARP device instance name is specified without any specific Gazebo model or sensor namespace, it is important to observe, while using the `gazebo_yarp_robotinterface` plugin, that all the YARP devices contained in the model have a unique YARP device instance name. If this is not the case, the plugin will print a clear error and exit without starting.** The plugins that spawn YARP devices in a way that they can be then attached to the yarprobotinterface as specified in the following table. For all the following plugins, the **YARP device instance name** can be specified by the `yarpDeviceName` parameter in the plugin configuration. -If the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `OFF` (default value), for the `gazebo_yarp_controlboard` if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration of `yarpDeviceName`. If instead the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON`, the `gazebo_yarp_controlboard` behaves like the rest of the plugins and requires to take the **YARP device instance name** from the `yarpDeviceName` parameter. The same behaviour applies to `gazebo_yarp_depthCamera`. +If the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `OFF` (default value), for the `gazebo_yarp_controlboard` if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration of `yarpDeviceName`. If instead the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON`, the `gazebo_yarp_controlboard` behaves like the rest of the plugins and requires to take the **YARP device instance name** from the `yarpDeviceName` parameter. The same behaviour applies to the plugins listed in the table below. -Furthermore if the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON` then the plugins `gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard` and `gazebo_yarp_depthCamera` doesn't create the implicit wrapper device but is left to the user to attach it via the robotinterface. +Furthermore if the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON` then the plugins `gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard`, `gazebo_yarp_depthCamera` and `gazebo_yarp_imu` doesn't create the implicit wrapper device but is left to the user to attach it via the robotinterface. | Plugin | Details | |:--------------------------:|:----------------------------------------------------:| @@ -85,3 +85,4 @@ Furthermore if the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` optio | `gazebo_yarp_depthcamera` | This plugin can create a YARP device that expose a depth-camera interface. | | `gazebo_yarp_lasersensor` | This plugin can create a YARP device that expose a laser-seensor interface. | | `gazebo_yarp_multicamera` | This plugin can create a YARP device that expose a multicamera interface. | +| `gazebo_yarp_imu` | This plugin can create a YARP device that expose a imu interface. | From ba94f8eef9ae873fec5d0a5c9ddaf62314c963d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2?= Date: Thu, 18 Nov 2021 15:53:47 +0100 Subject: [PATCH 2/8] Update changelog --- CHANGELOG.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d87f0b36d..edd5ff2a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [Unreleased] +### Added +- The `gazebo_imu` plugin now handle the `yarpDeviceName` parameter. +- The `gazebo_imu` plugin can be now opened without implicit/explicit wrapper. + ## [4.0.0] - 2021-09-03 ### Added @@ -21,8 +25,8 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo - Fixed the getRgbIntrinsicParam method in the depthCamera plugin when the distortion is not set (https://github.com/robotology/gazebo-yarp-plugins/pull/558). - The property returned by `getRgbIntrinsicParam()`, now contains `rectificationMatrix` instead of `rectificationMatrix` (https://github.com/robotology/gazebo-yarp-plugins/pull/558, see also https://github.com/robotology/yarp/pull/2593). -### Removed -- The `gazebo_yarp_jointsensors` and the `gazebo_yarp_doublelaser` have been removed (https://github.com/robotology/gazebo-yarp-plugins/pull/574). +### Removed +- The `gazebo_yarp_jointsensors` and the `gazebo_yarp_doublelaser` have been removed (https://github.com/robotology/gazebo-yarp-plugins/pull/574). - The support for Gazebo 9 and 10 has been removed. `gazebo-yarp-plugins` now requires Gazebo 11 (https://github.com/robotology/gazebo-yarp-plugins/pull/575). @@ -33,7 +37,7 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [3.6.1] - 2021-05-19 -### Fixed +### Fixed - Fixed use of libYARP_robotinterface with YARP devices spawned by sensor plugins (https://github.com/robotology/gazebo-yarp-plugins/pull/544). - Fixed compilation against YARP 3.5 by removing spurious print in WorldInterface plugin (https://github.com/robotology/gazebo-yarp-plugins/pull/548). @@ -47,15 +51,15 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo configuration. This generator enables the trajectory to follow a trapezoidal speed profile in position control mode, limited by provided reference speed (saturation) and acceleration (both ramps) values. If already executing a trajectory in this manner, newly generated trajectories take into account previous joint velocities and update the motion accordingly. -- Add `gazebo_yarp_robotinterface` plugin, the documentation for it can be found at [plugins/robotinterface/README.md](plugins/robotinterface/README.md) (https://github.com/robotology/gazebo-yarp-plugins/pull/532). +- Add `gazebo_yarp_robotinterface` plugin, the documentation for it can be found at [plugins/robotinterface/README.md](plugins/robotinterface/README.md) (https://github.com/robotology/gazebo-yarp-plugins/pull/532). - The `gazebo_yarp_depthcamera` and `gazebo_yarp_doublesensor` now accept a `yarpDeviceName` parameter (https://github.com/robotology/gazebo-yarp-plugins/pull/532). -### Changed +### Changed - The `deviceId` parameter of the `gazebo_yarp_lasersensor` is now named `yarpDeviceName` )https://github.com/robotology/gazebo-yarp-plugins/pull/532). - + ### Fixed -- Fix the support for running Gazebo itself with the `gazebo_yarp_clock` with YARP_CLOCK set, without Gazebo freezing at startup. - In particular, setting YARP_CLOCK is suggested to ensure that all the threads of YARP Network Wrapper Servers are executed with +- Fix the support for running Gazebo itself with the `gazebo_yarp_clock` with YARP_CLOCK set, without Gazebo freezing at startup. + In particular, setting YARP_CLOCK is suggested to ensure that all the threads of YARP Network Wrapper Servers are executed with the frequency correctly synchronized with the Gazebo simulation (https://github.com/robotology/gazebo-yarp-plugins/pull/537). ## [3.5.1] - 2020-10-05 From 5eafec205932a0e2f1ea1cac19de785b8056a04e Mon Sep 17 00:00:00 2001 From: GrmanRodriguez Date: Fri, 19 Nov 2021 11:25:42 +0100 Subject: [PATCH 3/8] Port gazebo_yarp_forcetorque for being used with gazebo_robotinterface plugin --- plugins/forcetorque/src/ForceTorque.cc | 61 ++++++++++++++++++-------- plugins/robotinterface/README.md | 11 ++--- 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/plugins/forcetorque/src/ForceTorque.cc b/plugins/forcetorque/src/ForceTorque.cc index 7fe5745ff..458eec0c8 100644 --- a/plugins/forcetorque/src/ForceTorque.cc +++ b/plugins/forcetorque/src/ForceTorque.cc @@ -52,12 +52,16 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd _sensor->SetActive(true); + std::string netWrapper {""}; + + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + netWrapper = "analogServer"; + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + // Add my gazebo device driver to the factory. ::yarp::dev::Drivers::factory().add(new ::yarp::dev::DriverCreatorOf< ::yarp::dev::GazeboYarpForceTorqueDriver> - ("gazebo_forcetorque", "analogServer", "GazeboYarpForceTorqueDriver")); - - //Getting .ini configuration file from sdf - ::yarp::os::Property wrapper_properties; + ("gazebo_forcetorque", netWrapper.c_str(), "GazeboYarpForceTorqueDriver")); + ::yarp::os::Property driver_properties; bool configuration_loaded = GazeboYarpPlugins::loadConfigSensorPlugin(_sensor,_sdf,driver_properties); @@ -65,14 +69,11 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd return; }; - + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS ///< \todo TODO handle in a better way the parameters that are for the wrapper and the one that are for driver - wrapper_properties = driver_properties; - - if( !configuration_loaded ) - { - return; - } + ::yarp::os::Property wrapper_properties = driver_properties; + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + m_sensorName = _sensor->ScopedName(); //Insert the pointer in the singleton handler for retriving it in the yarp driver @@ -80,24 +81,26 @@ 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 //Open the wrapper //Force the wrapper to be of type "analogServer" (it make sense? probably no) wrapper_properties.put("device","analogServer"); - if( m_forcetorqueWrapper.open(wrapper_properties) ) { - } else { + if( !m_forcetorqueWrapper.open(wrapper_properties) ) { yError()<<"GazeboYarpForceTorque Plugin failed: error in opening yarp driver wrapper"; return; } + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS //Open the driver //Force the device to be of type "gazebo_forcetorque" (it make sense? probably yes) driver_properties.put("device","gazebo_forcetorque"); - if( m_forceTorqueDriver.open(driver_properties) ) { - } else { + if( !m_forceTorqueDriver.open(driver_properties) ) { yError()<<"GazeboYarpForceTorque Plugin failed: error in opening yarp driver"; return; } - + + std::string scopedDeviceName; + #ifndef GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS //Attach the driver to the wrapper ::yarp::dev::PolyDriverList driver_list; @@ -108,11 +111,33 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd driver_list.push(&m_forceTorqueDriver,"dummy"); - if( m_iWrap->attachAll(driver_list) ) { - } else { + if( !m_iWrap->attachAll(driver_list) ) { yError() << "GazeboYarpForceTorque : error in connecting wrapper and device "; } + if(!driver_properties.check("yarpDeviceName")) + { + scopedDeviceName = m_sensorName + "::" + driverList[0]->key; + } + else + { + scopedDeviceName = m_sensorName + "::" + driver_properties.find("yarpDeviceName").asString(); + } + #else + if(!driver_properties.check("yarpDeviceName")) + { + yError() << "GazeboYarpForceTorque : missing yarpDeviceName parameter for device" << m_sensorName; + return; + } + scopedDeviceName = m_sensorName + "::" + driver_properties.find("yarpDeviceName").asString(); + #endif // GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS + + if(!GazeboYarpPlugins::Handler::getHandler()->setDevice(scopedDeviceName, &m_forceTorqueDriver)) + { + yError()<<"GazeboYarpForceTorque: failed setting scopedDeviceName(=" << scopedDeviceName << ")"; + return; + } + yInfo() << "Registered YARP device with instance name:" << scopedDeviceName; } } diff --git a/plugins/robotinterface/README.md b/plugins/robotinterface/README.md index aee0f058a..f4100d224 100644 --- a/plugins/robotinterface/README.md +++ b/plugins/robotinterface/README.md @@ -77,12 +77,13 @@ For all the following plugins, the **YARP device instance name** can be specifie If the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `OFF` (default value), for the `gazebo_yarp_controlboard` if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration of `yarpDeviceName`. If instead the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON`, the `gazebo_yarp_controlboard` behaves like the rest of the plugins and requires to take the **YARP device instance name** from the `yarpDeviceName` parameter. The same behaviour applies to the plugins listed in the table below. -Furthermore if the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON` then the plugins `gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard`, `gazebo_yarp_depthCamera` and `gazebo_yarp_imu` doesn't create the implicit wrapper device but is left to the user to attach it via the robotinterface. +Furthermore if the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON` then the plugins `gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard`, `gazebo_yarp_depthCamera`, `gazebo_yarp_forcetorque` and `gazebo_yarp_imu` doesn't create the implicit wrapper device but is left to the user to attach it via the robotinterface. | Plugin | Details | |:--------------------------:|:----------------------------------------------------:| | `gazebo_yarp_controlboard` | This plugin can create multiple YARP devices that expose joint-level motor and control interfaces such as [`yarp::dev::IPositionControl`](https://www.yarp.it/git-master/classyarp_1_1dev_1_1IPositionControl.html), [`yarp::dev::ITorqueControl`](https://www.yarp.it/git-master/classyarp_1_1dev_1_1ITorqueControl.html) and [`yarp::dev::ITorqueControl`](https://www.yarp.it/git-master/classyarp_1_1dev_1_1IEncoders.html). | -| `gazebo_yarp_depthcamera` | This plugin can create a YARP device that expose a depth-camera interface. | -| `gazebo_yarp_lasersensor` | This plugin can create a YARP device that expose a laser-seensor interface. | -| `gazebo_yarp_multicamera` | This plugin can create a YARP device that expose a multicamera interface. | -| `gazebo_yarp_imu` | This plugin can create a YARP device that expose a imu interface. | +| `gazebo_yarp_depthcamera` | This plugin can create a YARP device that exposes a depth-camera interface. | +| `gazebo_yarp_lasersensor` | This plugin can create a YARP device that exposes a laser-seensor interface. | +| `gazebo_yarp_multicamera` | This plugin can create a YARP device that exposes a multicamera interface. | +| `gazebo_yarp_imu` | This plugin can create a YARP device that exposes a imu interface. | +| `gazebo_yarp_forcetorque` | This plugin can create a YARP device that exposes a force-torque interface. | From d181fc544b8f9fb735c4f99b51d3331fc34410af Mon Sep 17 00:00:00 2001 From: GrmanRodriguez Date: Fri, 19 Nov 2021 11:26:03 +0100 Subject: [PATCH 4/8] Updated Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edd5ff2a4..1030108ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [Unreleased] ### Added +- The `gazebo_yarp_forcetorque` plugin now handle the `yarpDeviceName` parameter. +- The `gazebo_yarp_forcetorque` plugin can be now opened without implicit/explicit wrapper. - The `gazebo_imu` plugin now handle the `yarpDeviceName` parameter. - The `gazebo_imu` plugin can be now opened without implicit/explicit wrapper. From b2e7184ca60ce23ad9a2c1a8a6f873d6accb74bd Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 20 Nov 2021 18:40:04 +0100 Subject: [PATCH 5/8] Fix compilation in gazebo_yarp_forcetorque Fix https://github.com/robotology/gazebo-yarp-plugins/issues/588 --- plugins/forcetorque/src/ForceTorque.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/forcetorque/src/ForceTorque.cc b/plugins/forcetorque/src/ForceTorque.cc index 458eec0c8..e45acd266 100644 --- a/plugins/forcetorque/src/ForceTorque.cc +++ b/plugins/forcetorque/src/ForceTorque.cc @@ -117,7 +117,7 @@ void GazeboYarpForceTorque::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sd if(!driver_properties.check("yarpDeviceName")) { - scopedDeviceName = m_sensorName + "::" + driverList[0]->key; + scopedDeviceName = m_sensorName + "::" + driver_list[0]->key; } else { From f71b2f73136270597acf0a06cd72348534794b36 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 Dec 2021 14:04:34 +0100 Subject: [PATCH 6/8] Update changelog for future release (#593) --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1030108ed..7e037f73f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,11 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [Unreleased] -### Added -- The `gazebo_yarp_forcetorque` plugin now handle the `yarpDeviceName` parameter. -- The `gazebo_yarp_forcetorque` plugin can be now opened without implicit/explicit wrapper. -- The `gazebo_imu` plugin now handle the `yarpDeviceName` parameter. -- The `gazebo_imu` plugin can be now opened without implicit/explicit wrapper. +### Changed +- The `gazebo_yarp_forcetorque` plugin now handle the `yarpDeviceName` parameter (https://github.com/robotology/gazebo-yarp-plugins/pull/584). +- The `gazebo_yarp_forcetorque` plugin can be now opened without implicit wrapper, by using the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` CMake option (https://github.com/robotology/gazebo-yarp-plugins/pull/584). +- The `gazebo_imu` plugin now handle the `yarpDeviceName` parameter (https://github.com/robotology/gazebo-yarp-plugins/pull/583). +- The `gazebo_imu` plugin can be now opened without implicit wrapper, by using the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` CMake option (https://github.com/robotology/gazebo-yarp-plugins/pull/583). ## [4.0.0] - 2021-09-03 From cede95a747287c4fc2e53da1d3380afc464a57b4 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 22 Dec 2021 16:42:09 +0100 Subject: [PATCH 7/8] Fix compilation of GazeboYarpLaserSensorDriver with YARP 3.6 (#599) --- CHANGELOG.md | 3 +++ plugins/lasersensor/include/yarp/dev/LaserSensorDriver.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e037f73f..d701be491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo - The `gazebo_imu` plugin now handle the `yarpDeviceName` parameter (https://github.com/robotology/gazebo-yarp-plugins/pull/583). - The `gazebo_imu` plugin can be now opened without implicit wrapper, by using the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` CMake option (https://github.com/robotology/gazebo-yarp-plugins/pull/583). +### Fixed +- Fixed compilation with YARP 3.6 (https://github.com/robotology/gazebo-yarp-plugins/pull/599). + ## [4.0.0] - 2021-09-03 ### Added diff --git a/plugins/lasersensor/include/yarp/dev/LaserSensorDriver.h b/plugins/lasersensor/include/yarp/dev/LaserSensorDriver.h index 8daabbf27..1efaca21d 100644 --- a/plugins/lasersensor/include/yarp/dev/LaserSensorDriver.h +++ b/plugins/lasersensor/include/yarp/dev/LaserSensorDriver.h @@ -65,7 +65,9 @@ class yarp::dev::GazeboYarpLaserSensorDriver: virtual bool setScanRate (double rate) override; //PRECISELY TIMED - virtual yarp::os::Stamp getLastInputStamp() override; + // TODO(traversaro): Remove once we require YARP 3.6 + // See https://github.com/robotology/gazebo-yarp-plugins/issues/598 + virtual yarp::os::Stamp getLastInputStamp(); public: //Lidar2DDeviceBase From a5c5e8f51beeba87e982c69a748dc1e23c8ed313 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 23 Dec 2021 09:25:59 +0100 Subject: [PATCH 8/8] Bump version to 4.1.0 (#600) --- CHANGELOG.md | 2 ++ CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d701be491..22a485e39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [Unreleased] +## [4.1.0] - 2021-12-23 + ### Changed - The `gazebo_yarp_forcetorque` plugin now handle the `yarpDeviceName` parameter (https://github.com/robotology/gazebo-yarp-plugins/pull/584). - The `gazebo_yarp_forcetorque` plugin can be now opened without implicit wrapper, by using the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` CMake option (https://github.com/robotology/gazebo-yarp-plugins/pull/584). diff --git a/CMakeLists.txt b/CMakeLists.txt index 333c16ada..e35194d88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ option(GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS "if enabled removes # Project version set(${PROJECT_NAME}_MAJOR_VERSION 4) -set(${PROJECT_NAME}_MINOR_VERSION 0) +set(${PROJECT_NAME}_MINOR_VERSION 1) set(${PROJECT_NAME}_PATCH_VERSION 0) set(${PROJECT_NAME}_VERSION