# Fuse GPS with IMU robot_localization

Hey guys,

I've got a problem and I think it is quite similar to this thread. I just want to fuse a single IMU with a GPS (I'm using the KITTI-Dataset). I've tried to stick to the tutorials and all that stuff but got a weird problem. I have build 3 Nodes which interfaces looks like this:

1. FUSING IMU NODE -> INPUT: /kitti/oxts/imu ; OUTPUT: /Odometry/filtered

2. NAVSAT NODE -> INPUT: /kitti/oxts/imu, /kitti/oxts/gps/fix, /Odometry/filtered; OUTPUT: /Odometry/gps

3. NODE GPS AND IMU -> INPUT: /kitti/oxts/imu, /Odometry/gps; OUTPUT: /Odometry/filtered_fused

The IMU-signal (/Odometry/filtered) and the GPS-Signal (/Odometry/gps) looks quite good. The signal /Odometry/filtered_fused looks quite strange and cant be correct. Why? I assume that /Odometry/gps is not an IMU fused signal but a coordinate-transferred gps signal.

Horst

edit retag close merge delete

Sort by » oldest newest most voted

Hi, I assume you're using robot_localization package to achieve this. It seems you have misunderstood the intentions of this package. You are correct in using a navsat_transform_nodeto transform your GPS data into pose estimates. You are filtering your IMU twice. Typically following ROS REP105 you would have a world>map>odom>base_link transform tree, I don't see this as necessary for your application as you don't have robot odometry (just keep in mind you might have an inaccurate estimate due to sensor noise and no fusion). So, my recommendation is:

1. Delete your 1. node
2. Specify base_link as the odom frame in your 3. node.
more

So I have deleted the first node. I dont know if I am understanding your second point correctly. If I'm setting the odom_frame as base_link I get Errors. If I'm setting the world_frame to base_link I get errors as well. If I am applying just your first step i get more confusing results than without your steps. Could you pls give some more hints?

( 2019-08-28 01:17:30 -0500 )edit

So if I'm erasing the first Node i get the following configuration:

Node_old_3: Input:/odometry/gps , /kitti/oxts/imu AND world_frame = odom

Node 2 (Navsat): Input: /kitti/oxts/imu, /kitti/oxts/gps/fix

So now node 3 is publishing /odometry/filtered and Navsat is subscribing to it..And Node 2 publishing /odomoetry/gps and Node3 is subscribing to it...I think thats exact the same as mentioned in the thread above...But it doesnt work.....

( 2019-08-28 01:52:36 -0500 )edit

Can you elaborate what doesn’t work specifically? Since you have no robot odometer, you need to skip the odom frame and specify just map>base_link

( 2019-08-28 07:02:53 -0500 )edit

Yepp sorry i could solve that problem with the weird data..My last Problem is that the /odometry/gps always has a heading of zero in x,y,z although the imu odometry is moving it's heading..I dont get the solution, is that maybe a tf problem? I hadn't done a tf ..?

( 2019-08-29 03:20:03 -0500 )edit

Please see this for an example, you are not using the forst ekf_we_odom node. the gps does not provide orientation data, only a pose.

( 2019-08-29 17:11:30 -0500 )edit