Ask Your Question
0

help ROBOT_LOCALIZATION

asked 2019-05-24 14:11:22 -0500

mateusguilherme gravatar image

updated 2019-06-07 09:45:48 -0500

Hello

I'm rephrasing my question ...

As the following image, would this be the expected result with the Robot_Localization package?

If so, based on my odometry and IMU readings below, what would be the correct configuration of ekf_template.yaml? Or am I mistaken in something?

image description

/odom

   ---
    header: 
      seq: 735
      stamp: 
        secs: 1559070711
        nsecs: 593724715
      frame_id: "odom"
    child_frame_id: "base_footprint"
    pose: 
      pose: 
        position: 
          x: 3.58344948396
          y: 0.0485756406341
          z: 0.0
        orientation: 
          x: 0.0
          y: 0.0
          z: 0.0110481512963
          w: 0.999938967314
      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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001]
    twist: 
      twist: 
        linear: 
          x: 0.145770311356
          y: 0.0
          z: 0.0
        angular: 
          x: 0.0
          y: 0.0
          z: 0.00531763536856
      covariance: [0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0001]
    ---

/imu_raw

header: 
  seq: 3022
  stamp: 
    secs: 1559070635
    nsecs: 872518062
  frame_id: "imu_link"
orientation: 
  x: 0.0243225097656
  y: -0.0449829101562
  z: 0.0723571777344
  w: 0.996063232422
orientation_covariance: [0.0001, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0001]
angular_velocity: 
  x: 0.79345703125
  y: 0.06103515625
  z: 7.99560546875
angular_velocity_covariance: [0.0001, 0.0, 0.0, 0.0, 0.0001, 0.0, 0.0, 0.0, 0.0001]
linear_acceleration: 
  x: 0.078125
  y: 0.0244140625
  z: 1.00390625
linear_acceleration_covariance: [0.001, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.001]

ekf_template.yaml:

frequency: 50
sensor_timeout: 0.1
two_d_mode: true
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true

#map_frame: map 
odom_frame: odom            
base_link_frame: base_footprint  
world_frame: odom 

odom0: /odom
odom0_config: [?,  ?,  ?,
               ?, ?, ?,
               ?, ?, ?,
               ?, ?, ?,
               ?, ?, ?]
odom0_differential: false

imu0: /imu_raw
imu0_config: [?, ?, ?,
              ?,  ?,  ?,
              ?, ?, ?,
              ?,  ?,  ?,
              ?,  ?,  ?]
imu0_differential: false

Update 2

I made some corrections and followed some recommendations from the robot_localization website: http://docs.ros.org/melodic/api/robot...

I am getting the following result during a circular motion:

image description

Anyone have any idea what might be happening? If I set the IMU orientation(YAW) as false the problem disappears but I'm not sure if I should do this.

my /odom

---
header: 
  seq: 21363
  stamp: 
    secs: 1559912897
    nsecs: 874729232
  frame_id: "odom"
child_frame_id: "base_footprint"
pose: 
  pose: 
    position: 
      x: 0.236642009509
      y: 0.0226101278157
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.612814005797
      w: 0.790227178917
  covariance: [0.001, 0.0, 0.0, 0.0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-06-06 02:21:37 -0500

Tom Moore gravatar image

updated 2019-06-06 02:22:04 -0500

I'm not sure I totally get what it is that you're asking, but I'd do this:

Wheel encoders: fuse X velocity, Y velocity, and yaw velocity

IMU: fuse the yaw velocity only

That configuration won't help you if the robot hits something and the wheels spin, however. Even including the linear acceleration from the IMU won't really help in this case, at least not much.

By the way, I think your IMU is reporting gs, rather than m/s^2. I note that your Z acceleration is given as 1, instead of 9.81.

edit flag offensive delete link more

Comments

Hello

I have corrected the values for m / s2 now. Could you tell me if the unit of inertial motion needs to be positioned exactly on the Z axis of the robot?

Apparently it is working, but during a circular motion the filtered odometry increases too much in a certain direction, causing unfiltered odometry to represent a more real situation.

I'll post an update with the latest results.

note: If I set the IMU orientation(YAW) as false the problem disappears but I'm not sure if I should do this.

mateusguilherme gravatar imagemateusguilherme ( 2019-06-07 08:04:23 -0500 )edit

Setting the IMU yaw orientation to false was what I suggested in my answer. IMUs use magnetometers for absolute orientation, and they are notoriously erroneous, especially indoors.

Tom Moore gravatar imageTom Moore ( 2019-06-13 02:13:41 -0500 )edit

Could you tell me if the unit of inertial motion needs to be positioned exactly on the Z axis of the robot?

The IMU can be mounted however you want, but then you need to specify a transform from base_link->imu_link that represents that mounting pose.

Tom Moore gravatar imageTom Moore ( 2019-06-13 02:14:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-05-24 14:11:22 -0500

Seen: 100 times

Last updated: Jun 07