0
$\begingroup$

Rosanswers logo

After trying to simulate turtlebot navigation on STDR instead of Stage, I always run into missing transforms problems and navigation cant start. I ran view_frames and put a link to the resulting pdf. pdf file of TF tree

The particularity of STDR is that it is publishing its own map and doesnt need map_server (from what I could understand). I also had to manually add some transforms to avoid a lot of remapping,

odom -> base_footprint which is just a copy of map_static -> robot0

and

base_link -> base_laser_link which is a copy of robot0 -> robot0_laser_0

When I run everything, I get the following error:

Waiting on transform from base_footprint to map to become available before running costmap, tf error: Could not find a connection between 'map' and 'base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees.

As you can see in the pdf map is also supposed to be connected to odom, which is actually the task of AMCL. But in my case it is not. And i couldnt find out the source of the problem. I would be very thankful for your help.


Originally posted by Mehdi. on ROS Answers with karma: 3339 on 2014-09-24

Post score: 0


Original comments

Comment by Mehdi. on 2014-09-24:
I could temporarily bypass this problem by publishing my own map -> odom as a identity transform but this would simulate a perfect odometry?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

amcl generally needs 4 things at a minimum: a published map (default topic map), a laserscan source (default topic scan), valid odometry tf (default base_link->odom, and the freedom to create the transform odom->map. The last part is important because a frame can only have one parent.

This is outside all the internal algorithm parameters. It looks like you have all the essentials setup tf wise.

  • Can you verify that scan and map topics are published properly?
  • If topics from STDR are being pushed down into namespaces, make sure to change the appropriate topics in amcl (post the output of rostopic list, and check rosnode info amcl to make sure it's subscribing correctly).
  • Have you tried turning on debug messages for amcl?

For the costmap error, are you also running move_base? You should disable it for now and see if you can get localization (amcl) working properly first.


Originally posted by paulbovbel with karma: 4518 on 2014-09-25

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by Mehdi. on 2014-09-25:
a very clear answer, thanks :). It turned out that the published laser data had robot0_laser0 as frame_id where amcl was expecting base_laser_link. Digging through the stdr code and changing it manually solved my problem.

Comment by gavran on 2016-02-28:
what do you mean by "the freedom to create the transform odom->map". I have a similar problem, and seems that first 3 things are there, but what is the fourth one?

Comment by Mehdi. on 2016-03-03:
@gavran the transform between odom and map in the ROS framework generally starts as an identity matrix with both odom and map frames being overlapped. While the robot moves, it will start drifting due to the imperfection of its odometry and that can be compensated by changing odom->map

Comment by gavran on 2016-03-03:
@Mehdi - so your solution was to keep this transform identity (and thus simulating perfect odometry)? However, I am wondering about the expression freedom to create transform. So in case I don't want to make it identity, how do I let amcl do it?

Comment by Mehdi. on 2016-03-04:
Well when you start amcl and everything else is available (laser scans, map etc), it should start publishing that transform for you, as said in my first comment, my problem was just that the frame_ids of the laser data was were wrong.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.