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

I have questions about my params of robot_localization and how to apply robot_localization package with my rosbag files?

asked 2020-06-01 03:32:24 -0500

lgkimjy gravatar image

Hi, I am trying to use robot_localization package to visualize the filtered odometry by fusing imu and wheel odometry

input topic : /imu/imu/

header: 
  seq: 2812
  stamp: 
    secs: 1590737078
    nsecs: 429834586
  frame_id: "base_link"
orientation: 
  x: 0.00146915100049
  y: 0.0164387021214
  z: -0.19132065773
  w: 0.981388866901
orientation_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity: 
  x: 0.00119412853383
  y: 0.00179658900015
  z: 0.00330213177949
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration: 
  x: 0.341619036326
  y: 0.0339792784808
  z: -9.80399002013
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

input topic : /odom

it is from two wheeled mobile robot (i have already checked odom by using rviz, and I think data is good enough to use, except yaw data. And that is why I want to fuse imu and odom by ekf)

header: 
  seq: 85678
  stamp: 
    secs: 1590998520
    nsecs: 384758470
  frame_id: "odom"
child_frame_id: "base_link"
pose: 
  pose: 
    position: 
      x: 104.361528568
      y: 127.617223402
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.380863571354
      w: 0.924631245425
  covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000.0]
twist: 
  twist: 
    linear: 
      x: 0.233254893439
      y: 0.227642595417
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0823246265722
  covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000.0]

what did i launch in robot_localization package is roslaunch robot_localization ekf_template.launch

i will show you how did i change params in ekf_template.yaml

frequency: 30

silent_tf_failure: false
sensor_timeout: 0.1
two_d_mode: false
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: true

map_frame: map              # Defaults to "map" if unspecified
odom_frame: odom            # Defaults to "odom" if unspecified
base_link_frame: base_link  # Defaults to "base_link" if unspecified
world_frame: odom           # Defaults to the value of odom_frame if unspecified

odom0: /odom/
odom0_config: [true,  true,  false,
               false, false, false,
               false, false, false,
               false, false, false,
               false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1

imu0: /imu/imu/
imu0_config: [false, false, false,
              true,  true,  true,
              false, false, false,
              true,  true ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-06-29 04:48:19 -0500

Tom Moore gravatar image

I see a bunch of issues:

  1. The linear acceleration on your IMU is reading -9.81 m/s^2, and you have it reporting in base_link. If an IMU in mounted neutrally, then its linear acceleration should read +9.81 m/s^2. I'm guessing your IMU is reporting things in NED frame.
  2. You IMU has no covariance values specified, except for a -1.0 in its roll value.
  3. Your topics are formatted strangely. For example, you have odom0: /odom/. That should be odom0: /odom.
  4. You have two_d_mode set to false, which means you are telling the filter that your robot operates in 3D. But you aren't fusing any 3D variables. The filter won't like that. If your robot is an outdoor robot and climbs up hills, then you need to fuse in some orientation (or orientation velocity) as well as Z velocity from your wheel odom (just leave it at 0). If your robot operates in a plane, then turn on two_d_mode.

The parameters relating to tf publication look fine.

Many of these issues would be caught by reading the wiki. Might want to have a read through.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-06-01 03:25:49 -0500

Seen: 290 times

Last updated: Jun 29 '20