Ask Your Question

tuning robot_localization parameters

asked 2021-05-23 18:30:58 -0600

elgarbe gravatar image

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:

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:

/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:

image description

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:

image description

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:

image description

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.


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-05-31 05:48:57 -0600

xaru8145 gravatar image

updated 2021-05-31 05:49:30 -0600

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.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2021-05-23 18:30:58 -0600

Seen: 78 times

Last updated: May 31 '21