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

Revision history [back]

As per @akosodry 's request, a summary of our comments discussion as an answer:

I can't help you with the urdf, but the odom frame between the map (or world) and the base_link frame gives you both a continuous (but probably drifting) odom->base_link position (important for small local tasks, e.g. picking an object you're tracking) and a non-drifting (but probably jumping) map->base_link position (important for long-distance navigation). I struggled with that too when I started using robot_localization, so I wrote a small introduction/tutorial on our company's website which explains these basics. If you understand these basics, most other robot_localization tutorials become clear (at least for me).

If you want to estimate both the map->odom and the odom->base_link transformations, you need two robot_localization nodes. One which uses all continuous sensors which gives a continuous (but probably drifting) odom->base_link transform and one which uses all sensors (including the non-continuous ones, e.g. GPS) which gives the map->odom transformation (so that map->base_link gives you an absolute (but sometimes non-continuous) estimate). Think about the odom frame as a frame in between the map and base_link which models the discontinuous jumps in the estimate (e.g. due to gps updates). This way, the odom->base_link transformation is continuous, which is important for local operations (e.g. if you need to move something 2cm in a given direction, you don't mind that your position could be drifting over longer periods or distances, but discontinuities (jumps) in the position estimate would make that simple taks impossible). Depending on you application, you may or may not need both estimates.

In your case (only need for different static positions, no need for exact positioning while moving and no encoder information), I think you only need some filtering on the GPS position and the magnetometer orientation (I don't think the acceleration and gyroscope outputs of your IMU give that much useful information in your case). I would suggest to use a robot_localization node for the map->odom transform (inputs: GPS and IMU; maybe disable the IMU's gyroscope and accelerometer). I've never tried it, but I suppose this should work if you launch a static_transform_publisher node (all zeros, no translation or rotation) for the odom to base_link transform (in general, this transform is published by another robot_localization node which gets only the continuous inputs such as accelerometer, gyroscope and encoder data, but an accelerometer without an encoder is quite useless in practice, so I would try to replace this transform by an all-zero static transform).