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

Revision history [back]

I had a similar issue with navsat_transform_node and GPS sensors that are not mounted at the origin. You'll need to look up the transform from the base frame to the tag frame, rotate it by the robot's orientation in the world frame, then remove that rotated offset from the tag pose, and then fill out a new pose message with the output (change the frame_id to your world frame for that message) and then use that as input to the EKF.

Alternatively, you can create a new frame_id called tag_frame_world or something, and use the logic above to output the rotated base_frame->tag_frame as a transform from the world frame. In other words, you'd constantly broadcast a dynamic transform from odom (or whatever your world_frame is) to tag_frame_world. Then just change the frame_id in your messages to be tag_frame_world. Note that this would still require a new node or modified code in ar_tag_alvar.