Skip to content

Migrating RViz DisplayContext to tf2 #1215

@IanTheEngineer

Description

@IanTheEngineer

TLDR: is there any way of coaxing RViz DisplayContext to return a tf2_ros::Buffer pointer? If not, what will it take to upgrade RViz to tf2?

A little more background: I am in the midst of migrating MoveIt! to tf2, hopefully targeting the ROS Melodic release. This migration was requested by @dirk-thomas as the starting point for eventually porting MoveIt! to ROS2: moveit/moveit#745

One snag that I've run into is that RViz' DisplayContext FrameManager returns a tf::TransformListener, rather than a tf2_ros::Buffer, even on the ros2 branch:

/** @brief Return the FrameManager instance. */
virtual FrameManager* getFrameManager() const = 0;

/** @brief Convenience function: returns getFrameManager()->getTFClient(). */
virtual tf::TransformListener* getTFClient() const = 0;

MoveIt! uses this pointer to initialize its MoveGroupInterface for the motion_planning_rviz_plugin

move_group_.reset(new moveit::planning_interface::MoveGroupInterface(
opt, context_->getFrameManager()->getTFClientPtr(), ros::WallDuration(30, 0)));

It will need to receive a pointer to a tf2_ros::Buffer object. I have ported nearly all of MoveIt! to tf2, and this is (hopefully) one of the last roadblocks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions