Problems with tf

asked 2018-10-01 02:07:15 -0500

S.Yildiz gravatar image

I'm trying to use google cartographer and in order to I have to build a tf. I didn't fully understand the idea of tf. I have a robot and a laser. I constructed the tf like here http://wiki.ros.org/navigation/Tutori... .

This is my tree: map->base_lnk->base_laser But thats the point I don't understand: I have this code:

broadcaster.sendTransform(
         tf::StampedTransform(
           tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)),
          ros::Time::now(),"base_link", "base_laser"));

But how is the "base_link" now connected to the node that the laser is publishing?

broadcaster.sendTransform(
             tf::StampedTransform(
               tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)),
              ros::Time::now(),"map", "base_link"));

And I also have this. Here the same problem. If I wouldn't write this: ros::Time::now(),"map", "base_link")); the map wouldn't appear on rqt. How should the nodes be connected to the tf??

edit retag flag offensive close merge delete