Function nav_2d_utils::transformPose(const std::shared_ptr<tf2_ros::Buffer>, const std::string, const geometry_msgs::msg::PoseStamped&, geometry_msgs::msg::PoseStamped&, rclcpp::Duration&)

Function Documentation

bool nav_2d_utils::transformPose(const std::shared_ptr<tf2_ros::Buffer> tf, const std::string frame, const geometry_msgs::msg::PoseStamped &in_pose, geometry_msgs::msg::PoseStamped &out_pose, rclcpp::Duration &transform_tolerance)

Transform a PoseStamped from one frame to another while catching exceptions.

Also returns immediately if the frames are equal.

Parameters:
  • tf – Smart pointer to TFListener

  • frame – Frame to transform the pose into

  • in_pose – Pose to transform

  • out_pose – Place to store the resulting transformed pose

Returns:

True if successful transform