I have robot_localization working nicely (thanks to help from Tom Moore), feeding X velocity from wheel odometry and z angular velocity from a gyro. I also have a 3 axis accelerometer so I would like to add accelerations to the filter. However, I do not have an absolute orientation measurement, so I am having difficulty when the robot is slightly tilted, say when it is on a ramp. In that case, the X acceleration value has a gravity component which makes the filter's position output move even when the robot is just standing still on the ramp. Setting the "imu0_remove_gravitational_acceleration" to true does not help because I am not providing orientation data for the filter to use. Also, when setting that to true, even a small drift in the z accelerometer's gain (for example, due to a temperature change) causes the filter output Z position to fly off. I think that setting "two_d_mode" to true could stop that, but then it seems I will be unable to deal with the original problem of X acceleration due to gravity when sitting on a ramp?
I could provide full orientation data, but then I will be sending an absolute yaw component that is misleading, as it would simply be a derived value from the gyro and odometry velocity components. I could also provide just roll and pitch (from the base_link frame), but I don't know how this will work or even the best way to do that, e.g., set true for those values and false for the yaw value in robot_localization's sensor selection filter?
Post score: 1