Giter Site home page Giter Site logo

tf_prefix backwards compatibility? about geometry HOT 7 OPEN

ros avatar ros commented on August 22, 2024
tf_prefix backwards compatibility?

from geometry.

Comments (7)

roehling avatar roehling commented on August 22, 2024

This was the stupidest possible way to "fix" the tf prefix issue. If the TransformListener would have started resolving all frame_ids in lookupTransform(), the prefix support would have worked transparently for all nodes.

from geometry.

tfoote avatar tfoote commented on August 22, 2024

@roehling Unfortunately that doesn't work. If a frame id from a different prefix is referenced either by name or data is passed between nodes in different tf_prefixes this will prepend the wrong prefix.

from geometry.

roehling avatar roehling commented on August 22, 2024

@tfoote Oh, you are right, I did not think of that. So taking one further step, why not resolve in the publisher? The frame_id already is part of the standard header, so from a technical viewpoint, it should not be too difficult to prepend the actual node namespace to any relative frame_id without leading slash.

The current implementation effectively punishes everyone who read the tf documentation and implemented the prefix feature correctly. :-(

from geometry.

roehling avatar roehling commented on August 22, 2024

I have an idea, which I would be willing to implement: Let the tf frame id have the following format

[ type ":"] id

If type is omitted, it defaults to tf. Frame ids with "tf" type are automatically resolved by the core libs with the node namespace (or "/"), everything else is left alone. So

base_link -> tf:/ns/base_link
tf:base_link -> tf:/ns/base_link
tf:/base_link -> tf:/base_link
foo:fancy_newid_001212 -> foo:fancy_new_id_001212

This way, tf::resolve() remains idempotent, but we can phase out its usage, and if someone comes up with a fancy new frame_id system that does not need resolving, it can be implemented as a new type. And its fully backwards compatible to Groovy.

from geometry.

pirobot avatar pirobot commented on August 22, 2024

I have a simple launch file that runs an openni_tracker node using a tf_prefix so that all frames belonging to a skeleton can be separated from any other tf trees being published. This has worked very nicely since at least Fuerte but now appears broken in Hydro. I guess I don't understand what is meant be "backward compatibility" here or perhaps I am doing something wrong but why does the following launch file no longer place all my skeleton frames under "/skeleton"?

<launch>
  <node pkg="openni_tracker" name="openni_tracker" type="openni_tracker" output="screen">
    <param name="tf_prefix" value="/skeleton" />
  </node>
</launch>

from geometry.

Garfonso avatar Garfonso commented on August 22, 2024

In principle hydro is backwards compatible. BUT they changed the TransformPublisher object. In fuerte and groovy the TransformPublisher would use the tf_prefix and add that to tf_frames when publishing transforms.
That did change in hydro, the TransformPublisher does not care for the prefix anymore. So in theory the program has to do it by itself.
Not many nodes do that for a simple reason. On the publisher side, fuerty & groovy had transparent support for tf_prefix and all nodes automatically worked fine with it. In hydro that is gone which leads to the situation that now (nearly) all tf emitters are ignoring tf_prefix and therefore tf_prefix is totally broken right now.

You'll need to have a look if the openni_tracker node allows you to set the frame it uses for its tf. If so you can manually do the tf_prefix resolve already in the launch file (i.e. param name="frame" value="/skeleton/previos_frame_value"). If you have a lot of nodes that used the tf_prefix before, that introduces a lot of pain, of course... but the ROS people did not find a smart way for the tf_prefix stuff on the receiver side and sensor-messages side and therefore decided to kill it. I guess we'll have to live with that.

from geometry.

wjwwood avatar wjwwood commented on August 22, 2024

@tfoote, I don't know enough about tf to comment on @roehling's proposal, is this something that is feasible?

from geometry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.