robot_localization: Should the odom_frame be equal to the frame_id field specified in the header of the odometry input message?
Background info:
I am working on a simulated robot in Gazebo and I currently adding odometry noise to the odometry published by the Gazebo plugin and then fusing that noisy odometry with IMU data to get an filtered/fused odometry message and transform using robot_localization.
To publish a noisy odometry I run a custom node that subscribes to the odometry message /odom
from Gazebo, adds noise and publishes a new odometry message to the /noisy_odom
topic. This node can also publish a TF from the robot's base_link
frame to a frame that I call noisy_odom
(but I have disabled that TF since I want since robot_localization to compute and broadcast as TF from base_link
as explained below).
Using robot_localization I set world_frame: filtered_odom_frame
and publish_tf: true
because I need robot_localization to produce filtered data as a TF in order to be able to input it to AMCL. I also want that TF to have a frame name that is descriptive and distinguishable from other TF frames such as odom and noisy_odom.
I read here that the value of the world_frame parameter must match either the odom_frame or the map_frame parameter. Since I want a local estimate I set odom_frame: filtered_odom_frame
.
In summary I am using this configuration:
odom_frame: filtered_odom_frame
world_frame: filtered_odom_frame
publish_tf: true
However this configuration does not match the frame_id
field specified in the header of the odometry input message, which is "noisy_odom".
Therefore my question is: Should the odom_frame be equal to the frame_id of the odometry input message?
Is is ok that they differ, or am I messing things up?
I am not getting any error messages.
In the example above if it set it equal to the frame_id
field specified in the header of the odometry input message I would need to configure robot_localization like so:
odom_frame: noisy_odom
world_frame: noisy_odom
publish_tf: true
An the TF broadcasted by robot_localization would be noisy_odom->base_link which is a missleading frame name because the TF represents filtered/fused data.
So, must comply with the restriction that the odom_frame must be equal to the frame_id field specified in the header of the odometry input message?
And how do I set a TF frame name that is descriptive and distinguishable from other TF frames in the event that this was true?
I really appreciate any help you can provide.