How to config the robot_localization package [closed]
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!
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?
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.
Please post sample input messages, as well as your full EKF config.
Have you solved this?
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?
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.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.
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!