How to config the robot_localization package [closed]

asked 2017-09-26 03:34:28 -0500

dong_ym gravatar image

updated 2017-09-26 03:48:47 -0500

Hey Guys, I am using the robot_localization package to get a accurate pose estimation for my robot. I use the wheel encoders to obtain the raw odometry information, and an imu to get the information of yaw. The pose and twist covariance of raw odometry is given as:


odom.pose.covariance[0] = 0.1;odom.pose.covariance[7] = 0.1;odom.pose.covariance[14] = 0.1; 
odom.pose.covariance[21] = 0.0025;odom.pose.covariance[28] = 0.0025;odom.pose.covariance[35] = 0.0025
odom.twist.covariance[0] = 0.25;odom.twist.covariance[7] = 0.25; odom.twist.covariance[14] = 0.1;
odom.twist.covariance[21] = 0.02; odom.twist.covariance[28] = 0.02; odom.twist.covariance[35] = 0.02;

And I only get the orientation message from the Imu, the imu_msg.angular_velocity and imu_msg.linear_acceleration is all zero. The corresponding covariance is given as:


imu_msg.orientation_covariance=[0.0025,0,0,0,0.0025,0,0,0,0.000025]
imu_msg.angular_velocity_covariance=[0.02,0,0,0,0.02,0,0,0,0.02]
imu_msg.linear_acceleration_covariance =[0.04,0,0,0,0.04,0,0,0,0.04]

The ekf_localization configure param is as follows:


ekf_localization:
  frequency: 20
  two_d_mode: true
  odom0: /odom_raw
  odom0_config: [false, false, false,
                 false, false, false,
                 true, true, false,
                 false, false, false,
                 false, false, false]
  odom0_differential: false
  odom0_relative: false

  imu0: /imu/data
  imu0_config: [false, false, false,
                false, false, true,
                false, false, false,
                false, false, false,
                false, false, false]
  imu0_differential: false
  imu0_relative: true
  odom_frame: odom
  base_link_frame: base_link
  world_frame: odom

when I run move_base and amcl package to navigation, and in Rviz Click the 2D pose estimate(Ps: I have a rotate function to get the robot position), a stranger phenomenon happens, the robot rotate a round. Then, the robot didn't move in fact, but the rviz shows the robot is always rotating and the laser scan is also rotate quickly. Through echo the topic's message, the /odom_raw and /imu data is correct, but the fused data of /odom topic is wrong, it echos the /odom topic's angular.z=5.01. I don't know how to config the parameter of robot_localization, and through my test only configuration parameters is given as:

ekf_localization:


frequency: 50
  two_d_mode: true
  odom0:/odom_raw
  odom0_config: [true, true, false,
                 false, false, true,
                 true, true, false,
                 false, false, true,
                 false, false, false]
  odom0_differential: false
  odom0_relative: true
  imu0: /imu/data
  imu0_config: [false, false, false,
                false, false, true,
                false, false, false,
                false, false, true,
                true, true, false]
  imu0_differential: true
  imu0_relative: true
  odom_frame: odom
  base_link_frame: base_link
  world_frame: odom

the robot_localization package can works well, but I don't know the reasons. So, can anyone give me some suggestions to adjust these parameters? Thans a lot!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Tom Moore
close date 2022-01-14 02:57:09.667949

Comments

How do you setup your transform frames of robot_localization and amcl packages? Could you provide TF frame tree by using either tf package's view_tf or rqt_tf_tree?

chung gravatar image chung  ( 2017-09-26 07:41:20 -0500 )edit

Well, the raw odometry messages' tf transform is disabled, and in ekf_localization the option of publish tf is enabled.Here is my tf trees: [ https://drive.google.com/open?id=0B-c... ] The tf transfrom from base_link -> odom is published by /ekf_se node.

dong_ym gravatar image dong_ym  ( 2017-09-26 20:20:57 -0500 )edit

Please post sample input messages, as well as your full EKF config.

Tom Moore gravatar image Tom Moore  ( 2017-10-03 03:15:17 -0500 )edit

Have you solved this?

Tom Moore gravatar image Tom Moore  ( 2017-11-15 04:02:02 -0500 )edit

No, I haven't solved this now. And now I have use robot_pose_ekf package to instead the robot_localization package. Do you have some suggestions?

dong_ym gravatar image dong_ym  ( 2017-11-15 20:56:22 -0500 )edit

Please post full sample messages. Just copy the output from rostopic echo for your odometry and IMU data. I suspect you have some frame issues, but I'd have to see data to confirm.

Tom Moore gravatar image Tom Moore  ( 2017-12-04 03:29:30 -0500 )edit

Did you find any solutions? I am assuming that this is happening because you are using the yaw information from the imu and it has a error, since it is an integration of the velocity. does this make sense? in my case i am only using the yaw velocity of the imu.

xlightx gravatar image xlightx  ( 2018-06-22 06:54:53 -0500 )edit

I don't know the reason, but when I use the second group parameters, I can get the right result. Why you don't use the yaw information, the yaw info supply by the odometry is bad, so I fuse the info of imu. If you can have good config parameters, you can share with us. Thank you!

dong_ym gravatar image dong_ym  ( 2018-06-27 01:54:42 -0500 )edit