Template Function fuse_models::common::transformMessage

Function Documentation

template<typename T>
bool fuse_models::common::transformMessage(const tf2_ros::Buffer &tf_buffer, const T &input, T &output, const rclcpp::Duration &tf_timeout = rclcpp::Duration(0, 0))

Transforms a ROS geometry message from its frame to the frame of the output message.

Parameters:
  • tf_buffer[in] - The transform buffer with which we will lookup the required transform

  • input[in] - The message to transform. Source frame and stamp are dictated by its header.

  • output[inout] - The transformed message. Target frame is dictated by its header.

  • timeout[in] - Optional. The maximum time to wait for a transform to become available.

Returns:

true if the transform succeeded, false otherwise