The tf transform between base_footprint of robot1 and base_footprint of robot1 have little errors on multi-robot systems?
Hello,everyone!Right now I'm doing some some simulations about multi-robot systems on Gazebo and what I have achieved are:
(1)I can launch multiple robots(for instance,2 robots) on Gazebo
(2)I can use the gazebo_ros_p3d plugin to get the ground truth coordinates of every robot and then use them to publish the corresponding /tf topics
(3)now I can build a tf tree like the following:
map
/ \
/ \
robot1_tf/base_footprint robot2_tf/base_footprint
because of the limitation, I can only draw part of my tf tree. When I use the following command "rosrun tf tf_echo map robot1_tf/base_footprint ", and I get the data like:
Translation: [1.545, 0.349, -0.000]
Rotation: in Quaternion [0.007, -0.002, 0.965, 0.262]
in RPY (radian) [0.001, -0.014, 2.611]
in RPY (degree) [0.043, -0.827, 149.576]
Similarly, I use the use the following command "rosrun tf tf_echo map robot2_tf/base_footprint ", and I get the data like:
Translation: [2.637, -0.130, -0.000]
Rotation: in Quaternion [0.007, -0.001, 0.972, 0.233]
in RPY (radian) [0.001, -0.014, 2.671]
in RPY (degree) [0.043, -0.827, 153.057]
For the above two sets of data, I am very sure they are the ground truth data because I have echoed the the corresponding ground truth topics. However, when I used the command"rosrun tf tf_echo robot1_tf/base_footprint robot2_tf/base_footprint", I got the following data:
- Translation: [-1.184, -0.140, 0.017]
- Rotation: in Quaternion [0.000, 0.000, 0.030, 1.000]
in RPY (radian) [0.001, 0.000, 0.060]
in RPY (degree) [0.050, 0.001, 3.461]
and I also got a message like following when running this command:
Failure at 3656.843000000 Exception thrown:Could not find a connection between 'robot1_tf/base_footprint' and 'robot2_tf/base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees.
(However, when I use the rosrun tf view_frames, I can get a whole tf tree which looks like normal instead of two or more unconnected trees)
As you can see, in terms of the Translation data, the translation data of robot1 add the translation data of robot2 do not equal to the translation data which was obtained by tf command.
Do you guys know why there would be some errors on the tf translation?Any answers, advice or suggestions are welcome! Thanks