Skip to content

Commit

Permalink
Merge pull request #49 from robotology/fix_tf
Browse files Browse the repository at this point in the history
Fix use of transformServer device in yarprobotstatepublisher
  • Loading branch information
S-Dafarra authored Dec 5, 2023
2 parents 707275f + 98f2d68 commit a188b9e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 11 additions & 6 deletions src/modules/yarprobotstatepublisher/src/robotstatepublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit a188b9e

Please sign in to comment.