ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

transform from /base_link to /map

asked 2012-02-22 03:19:11 -0600

Cav gravatar image

updated 2012-02-22 03:21:36 -0600

Hi,

I was following the navigation tutorials. I have a map already, now I'm starting map_server and amcl as described in the tutorials but I'm getting following message:

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

The robot is being displayed in the corner of the map and setting pose estimation does not work (I get a message e.g. "Setting pose: 4.996 2.068 -2.645 [frame=/map]" but nothing happens).

tftree looks like this (I have a kinect mounted on a car-like robot):

tf tree

so obviously map -> odom are not connected. Is that the reason pose-estimation does not work? How/where should I connect them? For testing I've tried static_transform_publisher (map to odom) but it did not change anything.

I'll be grateful for any help.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-02-22 23:39:08 -0600

Cav gravatar image

updated 2012-02-22 23:39:32 -0600

fixed it. my mistakes were:

  • scan_topic was not properly set in amcl
  • both laser_scan_matcher and my node were publishing tf odom->base_link

after fixing that I can set pose estimation in rviz.

edit flag offensive delete link more

Comments

Hi, I have similar kind of problems. 1.How and where you have set scan_topic in amcl? I can't locate it properly; can you please mention it explicitly. 2. I have similar structure with you in the upper half of the image except one more tf called /base_footprint representing the robot platform between /odom and /base_link (representing sensor mounting point.). What should be global_frame and robot_base_frame in local_costmap_params.yaml and global_costmap_params.yaml(I want to use static map for global cost map)? Thank in advance @Cav

RB gravatar image RB  ( 2014-01-20 18:16:41 -0600 )edit
3

answered 2012-02-22 03:32:23 -0600

joq gravatar image

The usual convention for these mobile robot frames is described in REP-0105.

Localization would normally provide the /map->/odom transform.

Why did static_transform_publisher not work? What parameter did you pass it?

edit flag offensive delete link more

Comments

So amcl should provide the transformation in my case? I've tried this: <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0 0 0.0 /map /odom 100"/>

Cav gravatar image Cav  ( 2012-02-22 03:37:51 -0600 )edit

Yes. That transform looks OK to me. I do it the same, except for specifying 1000 ms instead of 100 ms.

joq gravatar image joq  ( 2012-02-22 03:45:33 -0600 )edit

Question Tools

Stats

Asked: 2012-02-22 03:19:11 -0600

Seen: 9,438 times

Last updated: Feb 22 '12