ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi! before answering let me point you to the robot localization wiki, which is great and has a lot of information and tips for this configuration. Also, this is a very complex problem that a lot of people, including me, struggles with and has spent a lot of hours trying to improve, so don't get discouraged!

I see a couple of problems with that config, the first one is the sensor config (odom0_config and imu0_config).

The odom0_config you have is:

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

Which sets to true(and therefore takes as input, discarding the rest) the yaw position and the speed in x and speed in y. Now, I don't know what kind of robot you have but you mention that you are using wheel encoders so I am going to asume that is some kind of ground based wheeled robot. In that case you have to see what information that /odom topic is providing and set to true the values that come from it. The configuration you have would work for a holonomic robot(using omniwheels for example), otherwise (diff drive, ackerman, etc) your odom config would need to be different and possible not trust the yaw position values nor speed in y (as it would have 0 always).

The imu0_config you have is:

imu0_config: [false, false, false,
              false,  false,  true,
              false, false, false,
              false,  false,  true,
              true, false, false]

Where you are using yaw position, yaw velocity and x acceleration. Again, check if that is information your imu is actually sending you because otherwise the node will integrate the data which is something that can cause drift. I would recommend you try using just yaw position or just yaw position and x acceleration.

It is also sometimes advisable to delegate forward movement information to odom and rotational movement to IMU, that would be only using x velocity in odom0 and only using yaw position in imu0 but that is not a solve-it-all solution.

I set all my imu and odom covariance as 0. Is there any problem with it?

If your imu and odom covariances are coming as 0 allways that means to the kalman filter that there is no uncertainty in them and therefore can "trust" them completely ignoring the internal model it has. This is not good because the odometry and imu sources are certaintly not 100% accurate and defeats the purpose of the kalman filter which can adapt to noisy sources.

Finally one other thing that rubs me the wrong way is the acceleration and deceleration limits you have for yaw speed (3.5 and 4.5m/s²) that seem to me a bit on the high side.

After this, go over the wiki for the robot localization node and read the description for each parameter you have to make sure it is within reasonable boundaries and if unsure of the parameter erase it, not all parameters are necessary to have and sometimes is best to let the node use its defaults.

Good luck in the odometry world!