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 :)
TLDR: is there any way of coaxing RViz DisplayContext to return a
tf2_ros::Bufferpointer? If not, what will it take to upgrade RViz totf2?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#745One snag that I've run into is that RViz'
DisplayContextFrameManagerreturns atf::TransformListener, rather than atf2_ros::Buffer, even on theros2branch:MoveIt! uses this pointer to initialize its
MoveGroupInterfacefor themotion_planning_rviz_pluginIt will need to receive a pointer to a
tf2_ros::Bufferobject. I have ported nearly all of MoveIt! totf2, and this is (hopefully) one of the last roadblocks :)