ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It seems like they forgot to update the documentation when porting from tf to tf2_ros, and hence the confusing docs.
You should trust the function signature, tf2_ros::Buffer *tf
over the documentation.
You cannot convert a tf2_ros::TransformListener
to a tf2_ros::Buffer
.
A reference to an existing tf2_ros::Buffer
is passed as an argument to the constructor of tf2_ros::TransformListener. That same tf2_ros::Buffer
is what you have to pass to base_local_planner::TrajectoryPlannerROS::initialize()
as an argument.
There seems to be no way of obtaining a reference to the buffer from the transformListener.
So, if you've constructed tf_
locally, then you'll have access to the buffer that you used in constructing it already. If you've passed tf_
in as a reference, consider passing the buffer in as a reference and use it to call initialize
.