The terms you use are a little bit confusing. I am not sure what you mean by "detected TF", or "converting a goal into an object TF". Maybe some general concepts will solve the questions you implied.
First off, TF is how ROS keeps track of transformation trees. PoseStamped
objects have a header
, in which you define a frame_id
, which is the name of the TF frame in which your Pose
is defined. If your robot is properly defined in your URDF, then you can convert from any of its frames to another frame on the tree. For example, you can obtain the pose of the object relative to your camera, define a PoseStamped
object in your code defined in the camera frame (likely camera_color_optical
or similar), transform it to a fixed frame in the world and then publish that pose. This is what the tutorial asks you to do in the first step, because MoveIt cannot plan to pose goals that are defined on moving frames. See here and here for more information on how to use transformPose
for this, which is simpler to use than what your tutorial suggests.
Next, there is no "converting a goal into an object TF". What you want to do is to define the goal of your motion planning problem using a PoseStamped
object. This PoseStamped
defines the pose that you want your robot's end effector to move to. The robot's end effector is defined in the SRDF of your robot's moveit_config
package. You can read all about MoveIt and how to set up your robot for it here.
Note that rather than planning directly to a TF frame that you calculate inside your code, you can also publish an object to the MoveIt Planning Scene, which visualizes it in Rviz and lets you attach it to the robot when you pick it up.
By the way, there are some hacky suggestions in the tutorial that I would not recommend (instead of looping through different goals that are close by, you should just increase the tolerance of your planning problem like here). Make sure to read the official documentation and tutorials as well so you get a better overview.