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

robot_localization fails due to transform warnings

asked 2017-01-18 09:47:53 -0500

modotz gravatar image

updated 2017-01-26 07:23:41 -0500

Hello,

I'm trying to use the robot_localization package for sensor fusion. I've got three sensors: IMU, odometry and GPS. I was first trying to work with the configuration I've found here:

link to other question

I downloaded the files from here

Unfortunately if I execute the launch file I first got these errors:

[ WARN] [1484753899.869852461, 1440023596.548412649]: Could not obtain transform from /gps to base_footprint. Error was Invalid argument "/gps" passed to lookupTransform argument source_frame in tf2 frame_ids cannot start with a '/' like:

As suggested from @tom-moore in an answer I changed the frame_id from /gps to gps

But just the error message changed:

[ WARN] [1484754315.316805588, 1440023620.550000278]: Could not obtain transform from gps to base_footprint. Error was "gps" passed to lookupTransform argument source_frame does not exist.

EDIT 1: I can reproduce the error on different computers. I was setting up ubuntu with a clean ros installation without any success. As a result I get the same errors.

EDIT 2: I've uploaded my current configuration here ( It contains the launch File and a sample of the recorded data)

It has three topics: imu/data, fix and odom the odom first received odom message is not at position (0,0) in the odom frame ( this was due to the fact that I was driving around with the robot first and I started recording after that)

Transformations: The GPS-antenna was mounted at the center of the robot, so I think the transformation should be alright..

I hope someone can help!

edit retag flag offensive close merge delete

Comments

1

Do you have a URDF or some other means of publishing the transform between the two frames? What is the output of rosrun tf tf_echo gps base_footprint?

Thomas D gravatar image Thomas D  ( 2017-01-19 22:11:09 -0500 )edit

thanks for this tip. the transform was missing

modotz gravatar image modotz  ( 2017-01-23 14:07:51 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-01-23 03:48:00 -0500

Tom Moore gravatar image

updated 2017-02-01 07:02:24 -0500

First, I would advise that you review the tf library. The node is telling you that there is no transform defined from your robot's base_footprint frame to its gps frame. In other words, in order for navsat_transform_node to know how to integrate your GPS data, it needs to know where on your robot the GPS itself is mounted. Imagine a robot with a GPS that is mounted on a long arm that sticks out in front of the robot. Since we want to know the pose of the robot's center (in this case, the base_footprint frame), we need to know what that offset (transform) is.

In this case, you need to use either (a) the robot_state_publisher or (b) a static_transform_publisher to define and broadcast a transform from your base_footprint frame to your gps frame.

RESPONSE TO EDIT 2:

Just looking at the launch file, I can see a couple issues:

  1. Both your EKFs need to have the same base_link_frame frame_id. For your ekf_odom instance, you have it set to base_footprint, and for the ekf_map instance, you have it set to base_link.
  2. Once you fix (1), make sure your base_to_realsense static transform uses the same child frame_id that you use for the base_link_frame in the EKF instances.
edit flag offensive delete link more

Comments

Thanks!. I added a static_transform_publisher which broadcasts the transformation. Although I don't get any errors anymore the result is confusing. I was driving with my robot in one direction made a curve around a tree and then returned to the start position. (1)

modotz gravatar image modotz  ( 2017-01-23 14:14:23 -0500 )edit

(1) continued. Could you take a look over my launch files?

modotz gravatar image modotz  ( 2017-01-23 14:15:10 -0500 )edit

Can you please edit the question by posting your launch files and sample input messages?

Tom Moore gravatar image Tom Moore  ( 2017-01-26 02:39:12 -0500 )edit

Edited Question.

modotz gravatar image modotz  ( 2017-01-26 07:24:24 -0500 )edit
0

answered 2020-03-13 00:14:11 -0500

darshb34 gravatar image

https://github.com/ros-drivers/nmea_n...

this pull request solves it.

follow the steps below:

cd catkin_ws/src

git clone https://github.com/ros-drivers/nmea_n...

git checkout melodic-devel

cd ~/catkin_ws

catkin_make

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-01-18 09:47:53 -0500

Seen: 2,213 times

Last updated: Feb 01 '17