Attention: Answers.ros.org is deprecated as of August the 11th, 2023. Please visit robotics.stackexchange.com to ask a new question. This site will remain online in read-only mode during the transition and into the foreseeable future. Selected questions and answers have been migrated, and redirects have been put in place to direct users to the corresponding questions on Robotics Stack Exchange. Additional details are available here.
When I override the frame it also overrides the topic.
ekf publishes on "/robot_pose_ekf/odom_combined" but if I change the frame as follows:
<param name="output_frame" value="odom"/>
then if publilshes under topic:
"/robot_pose_ekf/odom"
I thought they where separate setting the topic override via a remap.
Is this correct. I am still relativity new to ROS so maybe I have something else set wrong.
<!-- no cammer or scanner used just wheel and imu -->
<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
<param name="freq" value="10.0"/>
<param name="sensor_timeout" value="1.0"/>
<param name="odom_used" value="true"/>
<param name="vo_used" value="false"/>
<param name="imu_used" value="true"/>
<param name="debug" value="false"/>
<param name="self_diagnose" value="false"/>
<remap from="imu_data" to="/rrbot/imu_data"/>
<param name="output_frame" value="odom"/>
</node>
The "frame" orresponds to a link (reference frame) in your robot, not the output topic of the node. To remap, use the <remap> tag.
Update: After your clarification, I suggest renaming the frame and output topic with the output_frame parameter and then using remap change the topic back to odom_combined:
Ah, ok, I missed that. Then maybe use remap to get the original output topic while having the frame changed? The way the node interprets the `output_frame` parameter is completetly up to its implementation, so to know what exactly it does maybe have a look at the code.
I accept this as a work around however I disagree with having to go to source to find out how to interface works with a documented service nor a questionable use concerning frames and topics.
My point only was that it is quite easy to look up in the source what is happening exactly if something is not behaving the way you want it to. Of course better documentation is always preferrable. Please feel free to update the wiki documentation with a better explanation of the parameters.
And while remapping is something that works the same for all nodes, there is no convention about how a parameter with the suffix "_frame" is supposed to behave. That is completely up to the node implementor to decide.
What you can do is mapping the tf to something like tf_ignore, which detaches it from tf completely. Then use the topic only: The pose can then be published as tf transformation with an additional node like this: https://github.com/ct2034/cob_navigat...
This makes it all a bit more flexible and transparent but also less performant.
Ah I got it now. I actually thought the OP worrying about the frame_id in the header of the pose message, so I didn't immediately get your reference to tf. It turns out the that frame_id is actually hardcoded to always be "odom".