Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to clear out cached static transforms. #523

Closed
wants to merge 1 commit into from

Commits on May 9, 2022

  1. Add an API to clear out cached static transforms.

    When calling sendTransform() on the StaticTransformBroadcaster
    class, all transforms are cached internally.  Subsequent calls
    to sendTransform() will only add and republish those transforms
    that are different from previously seen ones.  This works well
    for code that wants to "build up" a list of static transforms
    from a diverse set of sources.  (As a side note, there is a
    bug in here where a second static transform between the same
    two joints but with a different translation or rotation is
    silently ignored.  That should probably produce an error.)
    
    However, this caching becomes a problem if a node ever wants
    to remove joints during runtime.  To facilitate this, add a
    new clearTransforms() API that allows the caller to do this.
    This has the potential to remove unrelated transforms, but
    since it is an opt-in API, presumably the user knows what
    they are doing.  The first user of this will be robot_state_publisher,
    which knows it is getting all of its static transforms from
    a single URDF file.
    
    Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
    clalancette committed May 9, 2022
    Configuration menu
    Copy the full SHA
    9dfce02 View commit details
    Browse the repository at this point in the history