Gazebo with multiple odometery frames
I have been trying to put together a multiple (n=2) Husky robot simulation for testing purposes. I am struggling with getting the namespaces and tf_prefixes setup in a consistent way. Following previous discussions here which builds on the single Husky tutorials, I have been able to get almost there. At this point I believe the gist of my issue is how to tell Gazebo to use a tf_prefix for the "odom" frame.
My understanding is that robot_localization (ekf_localization) takes the imu and odom data generated from Gazebo to generate the odometry messages on the odometry/filtered topic. For the imu I am able to edit the robot_description parameters in the xacro file to have a frameId for each robot. For example...
<gazebo>
<plugin name="imu_controller" filename="libhector_gazebo_ros_imu.so">
<robotNamespace>/r1</robotNamespace>
<frameId>r1_tf/base_link</frameId>
...
</plugin>
</gazebo>
This works as expected and the ekf_localization node is able to work with the imu observations.
What I don't know how to do is to prescribe the same frame prefix (e.g., r1_tf) for the odometry generated by Gazebo. Is there a way to tell Gazebo what tf frame to use for the odometry messages?