From c8ba459d33999b14885403ac354e39dd7c800ad4 Mon Sep 17 00:00:00 2001 From: Stefano Dafarra Date: Tue, 14 Nov 2023 11:09:59 +0100 Subject: [PATCH] Update transform server configurations (#377) * Updated configuration files to use new transform client device. * Update code of devices to use new transform server * Update CHANGELOG.md --- CHANGELOG.md | 1 + conf/xml/RobotStateProvider_ergoCub_openxr.xml | 7 ++++--- .../RobotStateProvider_ergoCub_openxr_ifeel.xml | 7 ++++--- ...RobotStateProvider_ergoCub_openxr_joystick.xml | 7 ++++--- ...eProvider_ergoCub_openxr_joystick_trackers.xml | 7 ++++--- conf/xml/RobotStateProvider_iCub3_openxr.xml | 7 ++++--- .../xml/RobotStateProvider_iCub3_openxr_ifeel.xml | 7 ++++--- conf/xml/transformServer_to_iwear.xml | 7 ++++--- .../HumanRobotPosePublisher.cpp | 7 ++++--- .../HumanStatePublisher/HumanStatePublisher.cpp | 15 +++++++-------- publishers/XsensTFPublisher/XsensTFPublisher.cpp | 7 ++++--- 11 files changed, 44 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbec87085..7df2708aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Naming convention from `wrapper`\ `server` to `nws`\ `nwc` (https://github.com/robotology/human-dynamics-estimation/pull/367). - HumanLogger device to be compatible with the `robot-log-visualizer` (https://github.com/robotology/human-dynamics-estimation/pull/372). +- Updated applications and modules that use the transform server (https://github.com/robotology/human-dynamics-estimation/pull/377) ### Added - Added files for ergoCub teleoperation without using iFeel (https://github.com/robotology/human-dynamics-estimation/pull/374) diff --git a/conf/xml/RobotStateProvider_ergoCub_openxr.xml b/conf/xml/RobotStateProvider_ergoCub_openxr.xml index 20eb3de73..03ee1db99 100644 --- a/conf/xml/RobotStateProvider_ergoCub_openxr.xml +++ b/conf/xml/RobotStateProvider_ergoCub_openxr.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/RobotStateProvider_ergoCub_openxr_ifeel.xml b/conf/xml/RobotStateProvider_ergoCub_openxr_ifeel.xml index 3f3a5a737..7206b1b78 100644 --- a/conf/xml/RobotStateProvider_ergoCub_openxr_ifeel.xml +++ b/conf/xml/RobotStateProvider_ergoCub_openxr_ifeel.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/RobotStateProvider_ergoCub_openxr_joystick.xml b/conf/xml/RobotStateProvider_ergoCub_openxr_joystick.xml index 993afc81d..9a4f863bb 100644 --- a/conf/xml/RobotStateProvider_ergoCub_openxr_joystick.xml +++ b/conf/xml/RobotStateProvider_ergoCub_openxr_joystick.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/RobotStateProvider_ergoCub_openxr_joystick_trackers.xml b/conf/xml/RobotStateProvider_ergoCub_openxr_joystick_trackers.xml index 6bd5dcf53..8e6e22618 100644 --- a/conf/xml/RobotStateProvider_ergoCub_openxr_joystick_trackers.xml +++ b/conf/xml/RobotStateProvider_ergoCub_openxr_joystick_trackers.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/RobotStateProvider_iCub3_openxr.xml b/conf/xml/RobotStateProvider_iCub3_openxr.xml index 92a79e9c6..85087d364 100644 --- a/conf/xml/RobotStateProvider_iCub3_openxr.xml +++ b/conf/xml/RobotStateProvider_iCub3_openxr.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/RobotStateProvider_iCub3_openxr_ifeel.xml b/conf/xml/RobotStateProvider_iCub3_openxr_ifeel.xml index aac759bcd..05097a7f0 100644 --- a/conf/xml/RobotStateProvider_iCub3_openxr_ifeel.xml +++ b/conf/xml/RobotStateProvider_iCub3_openxr_ifeel.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/conf/xml/transformServer_to_iwear.xml b/conf/xml/transformServer_to_iwear.xml index ab5b66554..ad1998164 100644 --- a/conf/xml/transformServer_to_iwear.xml +++ b/conf/xml/transformServer_to_iwear.xml @@ -2,10 +2,11 @@ - + 0.01 - /tf - /transformServer + ftc_yarp_only.xml + /IFrameTransformToIWear/tf + /IFrameTransformToIWear/tf/local_rpc diff --git a/publishers/HumanRobotPosePublisher/HumanRobotPosePublisher.cpp b/publishers/HumanRobotPosePublisher/HumanRobotPosePublisher.cpp index 521d7efaf..bc5e11e4a 100644 --- a/publishers/HumanRobotPosePublisher/HumanRobotPosePublisher.cpp +++ b/publishers/HumanRobotPosePublisher/HumanRobotPosePublisher.cpp @@ -283,9 +283,10 @@ bool HumanRobotPosePublisher::open(yarp::os::Searchable& config) // ========================= yarp::os::Property options; - options.put("device", "transformClient"); - options.put("local", "/" + DeviceName + "/transformClient"); - options.put("remote", "/transformServer"); + options.put("device", "frameTransformClient"); + options.put("filexml_option", "ftc_yarp_only.xml"); + options.put("ft_client_prefix", "/" + DeviceName + "/transformClient"); + options.put("local_rpc", "/" + DeviceName + "/transformClient/local_rpc"); if (!pImpl->transformClientDevice.open(options)) { yError() << LogPrefix << "Failed to open the transformClient device"; diff --git a/publishers/HumanStatePublisher/HumanStatePublisher.cpp b/publishers/HumanStatePublisher/HumanStatePublisher.cpp index 1a42702b2..ed6557c5c 100644 --- a/publishers/HumanStatePublisher/HumanStatePublisher.cpp +++ b/publishers/HumanStatePublisher/HumanStatePublisher.cpp @@ -261,15 +261,14 @@ bool HumanStatePublisher::open(yarp::os::Searchable& config) // OPEN THE TRANSFORM CLIENT // ========================= + std::string tfPrefix = hasPortPrefix ? "/" + portPrefix + "/" : "/"; + tfPrefix += DeviceName; + yarp::os::Property options; - options.put("device", "transformClient"); - if (hasPortPrefix) { - options.put("local", "/" + portPrefix + "/" + DeviceName + "/transformClient"); - } - else { - options.put("local", "/" + DeviceName + "/transformClient"); - } - options.put("remote", "/transformServer"); + options.put("device", "frameTransformClient"); + options.put("filexml_option", "ftc_yarp_only.xml"); + options.put("ft_client_prefix", tfPrefix + "/transformClient"); + options.put("local_rpc", tfPrefix + "/transformClient/local_rpc"); if (!pImpl->transformClientDevice.open(options)) { yError() << LogPrefix << "Failed to open the transformClient device"; diff --git a/publishers/XsensTFPublisher/XsensTFPublisher.cpp b/publishers/XsensTFPublisher/XsensTFPublisher.cpp index 65dff266a..3014315fa 100644 --- a/publishers/XsensTFPublisher/XsensTFPublisher.cpp +++ b/publishers/XsensTFPublisher/XsensTFPublisher.cpp @@ -109,9 +109,10 @@ bool XsensTFPublisher::open(yarp::os::Searchable& config) // ========================= yarp::os::Property options; - options.put("device", "transformClient"); - options.put("local", "/" + DeviceName + "/transformClient"); - options.put("remote", "/transformServer"); + options.put("device", "frameTransformClient"); + options.put("filexml_option", "ftc_yarp_only.xml"); + options.put("ft_client_prefix", "/" + DeviceName + "/transformClient"); + options.put("local_rpc", "/" + DeviceName + "/transformClient/local_rpc"); if (!pImpl->xsensTfResources.transformClientDevice.open(options)) { yError() << LogPrefix << "Failed to open the transformClient device";