How to transform a PointStamped from a frame to another?
Hi,
I get a PoseStamped in a specific frame and I want to transform it to the coordinates of the point in my base_link frame. I tried to use the tf::Transformer::transformPoint. Is it correct? I still have errors when trying to use it because of the types of the inputs. So I used tf::pointStampedMsgToTF but it still not compile.
tf::Stamped<tf::Point> tf_point_stamped_in, tf_point_stamped_out;
tf::pointStampedMsgToTF(goal_stamped,*tf_point_stamped_in);
if (!tf::Transformer::transformPoint ("base_link", tf_point_stamped_in, tf_point_stamped_out))
{
ROS_ERROR_STREAM ("Error converting stamped point from frame "<<goal_stamped->header.frame_id<<"to base_link");
return;
}
tf::pointStampedTFToMsg(tf_point_stamped_out, goal_stamped_);
What is wrong? Thanks!
What error messages do you get? What are the expected parameters of your functions?
Hi, thanks for your answer! I finally fixed it.