0
$\begingroup$

Rosanswers logo

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!


Originally posted by modotz on ROS Answers with karma: 11 on 2017-01-18

Post score: 1


Original comments

Comment by Thomas D on 2017-01-19:
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?

Comment by modotz on 2017-01-23:
thanks for this tip. the transform was missing

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.

Originally posted by Tom Moore with karma: 13689 on 2017-01-23

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by modotz on 2017-01-23:
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)

Comment by modotz on 2017-01-23:
(1) continued. Could you take a look over my launch files?

Comment by Tom Moore on 2017-01-26:
Can you please edit the question by posting your launch files and sample input messages?

Comment by modotz on 2017-01-26:
Edited Question.

$\endgroup$

Your Answer

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