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

robot_localization: WARNING: could not obtain transform from map to odom. Error was Unable to lookup. Could not transform measurement into odom. Ignoring...

asked 2015-09-17 05:01:30 -0600

roberto colella gravatar image

hello, I have a nomadic scout 2-wheel robot with a kinect sensor that is able to navigate inside a map by means of the ros (groovy) navigation stack. An odometry topic is provided by the robot, and the /odom --> /base_link transform too. I want to feed the ekf_localization node with the position the robot provided by our Vicon MoCap system, in order to fuse it with the odometry information. I have a map, provided by a map server, and the robot pose coming from Vicon is published as a PoseWithCovarianceStamped topic, with ref_frame_id = 'map'. So I want to use ekf_localization node in the second mode, with world_frame = 'map', and I expect the /map --> /odom tf from ekf_localization node. What I see is that ekf_localization node is publishing /odom --> /base_link transform too, overwriting the odometry-generated transform each other. So the ekf_localization node seems working in the first mode, and it does not sense the /odom --> /base_link tf, already published by the robot.

this is my ekf launch file:

<launch>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">

      <param name="frequency" value="30"/>

      <param name="sensor_timeout" value="0.1"/>

      <param name="two_d_mode" value="true"/>

      <param name="pose0" value="/scoutPose"/>

      <param name="odom0" value="/odom"/>

      <rosparam param="pose0_config">[true, true, false, true, true, true, false, false, false, false, false, false]</rosparam>

      <rosparam param="odom0_config">[true, true, false, true, true, true, false, false, false, false, false, false]</rosparam>

      <param name="pose0_differential" value="true"/>

      <param name="odom0_differential" value="false"/>

      <param name="debug" value="true"/>

      <param name="debug_out_file"  value="/home/robouser/debug_ekf_localization.txt"/>

      <param name="map_frame" value="map"/>

      <param name="world_frame" value="map"/>

      <param name="odom_frame" value="odom"/>

      <param name="base_link_frame" value="base_link"/>

      <rosparam param="process_noise_covariance">[0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.05, 0.0, 0.0, 0.0,
                                                  0.0, 0 ...
(more)
edit retag flag offensive close merge delete

Comments

Please post a sample message for every input topic. Also, how did you check that the EKF is also publishing the odom->base_link transform? Are you inferring that from the warning, or did you use another method?

Tom Moore gravatar image Tom Moore  ( 2015-09-18 11:24:52 -0600 )edit

I believe that the transform was being published, but what I'm not sure of is that the EKF was publishing it. Your odometry source will often broadcast that transform as well. If your world_frame is set to map, the EKF will not broadcast a transform from odom->base_link.

Tom Moore gravatar image Tom Moore  ( 2015-09-22 08:14:35 -0600 )edit

With world_frame = map the ekf should publish the map --> odom transform. What happens is that it publishes odom->base_link transform instead. I am sure that EKF was publishing the odom->base_link transform, I checked with tf_monitor, rviz, rostopic echo...

roberto colella gravatar image roberto colella  ( 2015-09-22 09:37:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-22 10:19:21 -0600

Tom Moore gravatar image

updated 2015-09-22 10:38:55 -0600

Adding answer as a comment isn't long enough.

Re: which transform the EKF is publishing, a few things:

  1. First, see the code here. The filter should always use your world_frame parameter as the parent frame for its tf broadcast. You're using the groovy version, and perhaps there's something going on there that I don't recall, but I'm pretty sure it works as well.
  2. The tools you listed tell you what transforms are being broadcast, but only tf_monitor can tell you which node is broadcasting it. Can you please post the output of tf_monitor?
  3. If for whatever reason the EKF is publishing that transform (as determined by the tf_monitor output and the test I suggested above), then please post your full launch file for every node you're running.

EDIT: Removing things you've already investigated, sorry.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2015-09-17 05:01:30 -0600

Seen: 2,050 times

Last updated: Sep 22 '15