diff --git a/CHANGELOG.md b/CHANGELOG.md index b44496e..af632e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +- Fix use of transformServer device in yarprobotstatepublisher https://github.com/robotology/idyntree-yarp-tools/pull/49 + +## [0.0.8] - 2023-11-17 + +### Changed + +- The remapper connector will not fail if some board of joint is not available https://github.com/robotology/idyntree-yarp-tools/pull/47 + ## [0.0.7] - 2023-02-24 ### Changed diff --git a/src/modules/yarprobotstatepublisher/src/robotstatepublisher.cpp b/src/modules/yarprobotstatepublisher/src/robotstatepublisher.cpp index 0e15b5c..a3dabab 100644 --- a/src/modules/yarprobotstatepublisher/src/robotstatepublisher.cpp +++ b/src/modules/yarprobotstatepublisher/src/robotstatepublisher.cpp @@ -35,15 +35,20 @@ bool YARPRobotStatePublisherModule::configureTransformServer(const std::string & { std::string namePrefix = rf.check("name-prefix", yarp::os::Value("")).asString(); + if (namePrefix.front() != '/') + { + namePrefix = '/' + namePrefix; + } yarp::os::Property pTransformclient_cfg; - pTransformclient_cfg.put("device", "transformClient"); - if (!namePrefix.empty()) { - pTransformclient_cfg.put("local", "/"+namePrefix+"/"+name+"/transformClient"); + pTransformclient_cfg.put("device", rf.check("tf-device", yarp::os::Value("frameTransformClient")).asString()); + pTransformclient_cfg.put("filexml_option", rf.check("tf-file", yarp::os::Value("ftc_yarp_only.xml")).asString()); + pTransformclient_cfg.put("ft_client_prefix", namePrefix + "/" + name + "/tf"); + if (rf.check("tf-remote")) + { + pTransformclient_cfg.put("ft_server_prefix", rf.find("tf-remote").asString()); } - else pTransformclient_cfg.put("local", "/"+name+"/transformClient"); - - pTransformclient_cfg.put("remote", rf.check("tf-remote", yarp::os::Value("/transformServer")).asString()); + pTransformclient_cfg.put("local_rpc", namePrefix + "/" + name + "/tf/local_rpc"); m_tfPrefix = rf.check("tf-prefix", yarp::os::Value("")).asString();