0
$\begingroup$

Rosanswers logo

Hi all,

I added an IMU to improve odometery and used robot_localozation to fuze odom and IMU data. I speficied the initial pose in ekf configs but my robot wont get its initial pose on the map properly. If I rum move_base not without robot_localization locates to its initial pose just fine on the map. How can I get it to position to its initial pose on the map when its using robot_localization??

Below you will my ekf config file, my cosmap files local and global and launch file for move base.

EKF config:

frequency: 30

silent_tf_failure: false

two_d_mode: true

transform_time_offset: 0.5

transform_timeout: 0.5

print_diagnostics: true

debug: false

publish_tf: true

publish_acceleration: false

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: map           # Defaults to the value of odom_frame if unspecified but if map specified USE MAP (Check AMCL)


odom0: /odom

odom0_config: [false, false,  false,
               false, false, false,
               true,  true,  false,
               false, false, true,
               false, false, false]


imu0: example/imu
imu0_config: [false, false, false,
              false, false, false,
              false, false, false,
              false, false,  true,
              true,  true,  false]

use_control: false

stamped_control: false


process_noise_covariance: [0.05, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0.05, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0.06, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0.03, 0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0.03, 0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0.06, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0.025, 0,     0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0.025, 0,    0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0.04, 0,    0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0.01, 0,    0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.01, 0,    0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.02, 0,    0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.01, 0,    0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.01, 0,
                           0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.015]


initial_estimate_covariance: [1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,     0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9,  0,     0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1e-9,  0,     0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1e-9,  0,    0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1e-9, 0,    0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1e-9, 0,
                              0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1e-9]

Local costmap:

local_costmap:
  global_frame: odom 
  robot_base_frame: base_link
  update_frequency: 3.0 #**was5 -4
  publish_frequency: 2.0 #was2-4
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.05
  transform_tolerance: 0.5

Global costmap:

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 3.0 # was3
  static_map: true
  rolling_window: false
  transform_tolerance: 0.5
  allow_unknown: false

Originally posted by chm007 on ROS Answers with karma: 34 on 2022-02-07

Post score: 0


Original comments

Comment by Tom Moore on 2022-02-25:
You need a lot more information here:

  • What is generating the odom->base_link transform? Your EKF is just doing map->odom.
  • Are you using amcl or something? You can't have two nodes publishing the robot's map frame pose.

I think you should read REP-105, but then you need to give more detail about what nodes you are running.

Comment by chm007 on 2022-03-03:
@ Tom, Thank you for your response. I am actually using EKF for fusing sensors and AMCL for localization. Thanks to your response, I just realized that I have EKF publishing TF also. I will set this option to false and report back the results. Thanks again.

Comment by Tom Moore on 2022-03-17:
OK, please don't forget to update this question with an answer when you have one.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Good Afternoon Tom,

Your suggestion to check which node were publishing was on point. I stopped EKF from publishing and all is working fine now. Thanks again.


Originally posted by chm007 with karma: 34 on 2022-03-18

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.