0
$\begingroup$

Rosanswers logo

I have some trouble getting robot_localization working. I have tried several configurations but nothing gives me a good result. So I thought I would try to get the minimal working. I have gps data and imu data. I also have wheel odometry. All this is simulated and all the values are currently almost ideal (no or very small noise). I use navsat with the following conf:

navsat_transform:
  frequency: 30
  delay: 3.0
  magnetic_declination_radians: 0 # 
  yaw_offset: 0
  zero_altitude: true
  broadcast_utm_transform: true
  publish_filtered_gps: true
  use_odometry_yaw: true
  wait_for_datum: false

And then I use one ekf node with the following conf:

  odom0: odom
  odom0_config: [false, false, false,
                 false, false, false,
                 true, true, true,
                 false, false, false,
                 false, false, false]
  odom0_queue_size: 10
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false

  odom1: odometry/gps
  odom1_config: [true,  true,  false,
                 false, false, false,
                 true, true, true,
                 false, false, false,
                 false, false, false]
  odom1_queue_size: 10
  odom1_nodelay: true
  odom1_differential: false
  odom1_relative: false

  imu0: imu/data
  imu0_config: [false, false, false,
                true,  true,  true,
                false, false, false,
                true,  true,  false,
                true,  true,  true]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 10
  imu0_remove_gravitational_acceleration: true

The conf is pretty taken from the examples.

I have static transform for map -> odom (they are exactly the same). ekf publishes odom -> base_link transform. The latitude-longitude are exactly aligned with y and x axis.

Wheel odometry is in odom topic.

The problem I am facing: when there is no movement, the filtered odometry (also the transform from odom to base_link) starts moving slowly (the robot itself is not moving). When the robot is moving, everything gets messy pretty quickly.

I have tried to exclude imu, odom, change covariance, all the other parameters. What is my problem here? I would like to get a minimal example working, which would mainly use GPS.

EDIT:

To be exact, the movement of the transform grows strangely. Here are some example of my tf topic (two consecutive messages, we use base_footprint instead of base_link):

header: 
  seq: 0
  stamp: 
    secs: 7
    nsecs: 200000000
  frame_id: odom
child_frame_id: base_footprint
transform: 
  translation: 
    x: 0.00408947608922
    y: -0.0837722308319
    z: 0.0
  rotation: 
    x: 0.0
    y: 0.0
    z: 0.241644993047
    w: 0.970364723872

    
header: 
  seq: 0
  stamp: 
    secs: 7
    nsecs: 250000000
  frame_id: odom
child_frame_id: base_footprint
transform: 
  translation: 
    x: 0.215371691561
    y: -0.862578741381
    z: 0.0
  rotation: 
    x: 0.0
    y: 0.0
    z: -0.574137811256
    w: 0.818758678541

And after that it goes wild. The strange thing here is that the rotation also changes. Although imu sensor simulator should be pretty stable. And every time I run the simulator, it gets about the same results (about the same time).


Originally posted by Ago on ROS Answers with karma: 23 on 2017-08-25

Post score: 0


Original comments

Comment by Tom Moore on 2017-10-03:
Please provide sample input messages. Also, is there a reason you are fusing velocities from /odometry/gps, or is that a remnant from the examples?

Comment by Ago on 2017-10-23:
Thanks for the reply! Yes, gps odom comes from the examples. Comes out imu simulator was very wrong. Now I have managed to get IMU simulator working, everything seems to work just fine. But I will open a new question regarding the configuration.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

My main problem was very noisy (I would even say random) IMU simulator (due to physics and model in gazebo). After fixing this, the localization is spot on!


Originally posted by Ago with karma: 23 on 2017-10-23

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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