ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
MAKE SURE something else is generating the odom->base_link transform. Note that this can even be another instance of robot_localization! However, that instance should not fuse the global data.
But how is possible that base_link has two parents?
It doesn't have two parents in the tf
tree. Read this and this (read the section called "Frame Authorities"). Here's how it works:
ekf_localization_node
or something else, e.g. your robot's controller): produces odom->base_link transform, and publishes it to tf
.ekf_localization_node
or something else, e.g., amcl
): produces map->base_link transform, but does not publish it. Instead, it uses the inverse of the odom->base_link transform, along with its own map->base_link transform, to compute the map->odom transform, and then it publishes that.In this way, you get map->odom->base_link.
Note, however, that you (a) don't have to use these frame_ids, and (b) you can define and publish all sorts of transforms from any of these, so long as you avoid re-parenting. For your IMU, you want to use static_transform_publisher
(I'd use the tf2_ros
version) and publish a transform from base_link->IMU. That transform should define how your IMU is mounted on your robot.
For ar_sys
, it really depends on the coordinate frame in which the pose data is reported. As long as it adheres to ROS standards and is reported in a world-fixed frame (not attached to the robot), you can either (a) make the your world_frame in ekf_localization_node
the same as the frame_id
in the ar_sys
pose message, or (b) create a static transform from the world_frame
in your ekf_localization_node
config to the frame_id in your ar_sys
message.