Usually, IMU manufacturers implement some kind of filter to remove the noise these days, therefore the probability is your IMU is not throwing raw values. Nevertheless, you can initiate the sensor covariance matrix by giving some small values on the diagonal let's say 0.1 or 0.05. Also, if you really would like to go one step further, you can do some ...
I find it easiest to make a class for stuff like this, where you have data you want to use between callbacks, or your want to publish a message inside of another callback. For example, your class might look something like (in the header:)
void imu_callback(const your_imu::Message::...
Heading information from an accelerometer can be inherently noisy due to integration errors. Magnetometers and Gyroscopes can provide additional information to help reduce some of these errors, but if you are operating in the presence of external magnetic fields, you won't be able to reliably trust them either. Since you have designed / have access to the ...
Based on your configuration, you are trying to create map -> odom -> /thrbot/base_link. But you do not have a map frame. Looking at your oroginal TF, you should instead create world -> odom -> base_footprint.
I think your configuration should be:
EDIT: as ...