ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# tuning robot_localization parameters

Hi, I would like to receive some advice about my robot localization setup and configuration parameters. I have a working repo for reproduce my results: https://gitlab.com/elgarbe/rl_yaguaro...

The hardware is a icm20602 IMU with a HMC5883 magnetometer connected to a custom made low level computer (STM32F722). This is connected to a raspberry pi through a serial connection. I'm using rosserial for the ROS communication between the computers. There are two GPS, a M8N and a F9P (ardusimple with RTK corrections), connected to raspberry. M8N use nmea_navsat_driver and F9P ublox ros driver from kummar robotics.

So I have follow topics:

/m8n/fix
/f9p/ublox/fix
/chori/imu/data_raw : This is gyro, accel and orientation obtained just from magnetometer on low level computer
/chori/imu/mag : hard iron corrected ,agnetometer readings
/chori/imu/mag_raw : un-corrected magnetometer readings


I have launch file, localize.launch, that runs all the nodes involved in RL, including rosbag and rviz. There is two main bagfiles (both terminated with _ on the name). The one from 180521 is with RTK corrections on f9p/fix and 230521_ don't have corrections.

The idea is to tune RL parameters with IMU and m8n GPS and compare it with "ground truth" provided by f9p (with rtk corrections). Finally I have imu_madwick filter configured so there is a /imu/data topic with orientation obtained from gyro, accel and mag readings. I have several problems, but right now I think I have some interesting results.

When I use m8n GPS and madgwick filter I obtain very bad results. In the first seconds (the imu is stationary on a table) I'v notice that position estimate drift a lot between 2 GPS readings:

is this normal? I'm expecting less movement here.

Then, as I start moving, the position estimate between 2 gps signal seems to be not aligned with the movement:

RL orientation is aligned with the orientation from the output of the madwick filter.

Then I remove the use of magnetometer on madgwick filter and things get better:

but not perfect... what bother me is that madgwick filter ouput with magnetometer activated seems to work fine witout RL. It gives 0 when facing EAST and 90º facing NORTH. So, I'm not sure why get worse result using it.

Can some one gives some advise? I think that anyone can reproduce my results cloning my repo.

Thank

edit retag close merge delete

Sort by » oldest newest most voted

What imu_filter_madgwick does is to integrate the angular velocities, linear accelerations and magnetometer readings to obtain an orientation estimate.

Your robot_localization config file takes into account angular velocities and linear accel from the imu, so you are double counting them. Try setting imu angular vel and linear accel to false. Also, remove the accelerations unless you have a very, very nice IMU that is well calibrated. That is a likely candidate source of your issues.

more