Robotics StackExchange | Archived questions

How to connect TF for multiple robots in SLAM

Update2: After making the changes mentioned in the comment about rosparams, I was able to generate the following TF tree. image description

Yet the map is not getting constructed the way it does for the single robot. Like I am using the stage sim of the navigation_stage package in Indigo


Update1:

No transform from [robot_0/map] to [map]

After resolving the issue of base scan as mentioned in my comment, i am not able to get a common correct map.


Hi,

I have 3 pr2 in Stage Simulator trying SLAM. Single Robot version works correctly but tweaking the same launch files and world files seems to launch correctly expect it does not show the laser scans in RViz.

Here is the laser scan error:

For frame [/robot0/baselaserlink]: No transform to fixed frame [map]. TF error: [Could not find a connection between 'map' and 'robot0/baselaserlink' because they are not part of the same tree.Tf has two or more unconnected trees.]

I am also attaching the output of rosrun tf view_frames which will clarify the issue here. image description

Please let me know how to join the odom from individual to global tf frame such that all the robots can simultaneously project their scans in Rviz

Asked by arttp2 on 2016-10-24 15:58:45 UTC

Comments

You should broadcast a couple transforms from map to robot_x/odom as well, so everything can be connected

Asked by huanxiner on 2016-10-24 16:39:08 UTC

I added the following lines in the launch file after the slam_gmapping node command

<param name="odom_frame" value="robot_1/odom"/>
<param name="base_frame" value="robot_1/base_link" />

This connected the tree. I still have not yet resolved the issue of common map

Asked by arttp2 on 2016-10-24 17:25:25 UTC

What exactly is your problem after update 2? Anyways other than tweaking the launch file, I would just open up a few terminals and try publishing static transforms and see what works.

rosrun tf static_transform_publisher 0 0 0 0 0 0 map robot_x/odom 100 

something like that.

Asked by huanxiner on 2016-10-25 13:34:54 UTC

According to the image in Update 2, the transform from map to odom (robot_x) exists. Is it even feasible to carry out independent SLAM from 2 different robots in the same .world and visualize it in the same Rviz console. This is what I want to do.

Asked by arttp2 on 2016-10-26 14:18:32 UTC

Did this ever get resolved? What were the steps were taken?

Asked by cwillia109 on 2020-02-14 10:59:17 UTC

Answers