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

ekf frame vs topic - remapping issue

asked 2014-07-22 14:39:39 -0500

rnunziata gravatar image

updated 2014-07-22 22:03:05 -0500

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>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-07-22 19:06:24 -0500

demmeln gravatar image

updated 2014-07-24 06:06:17 -0500

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:

  <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"/>
    <remap from="odom" to="odom_combined"/>
  </node>

To see how exactly the parameter is used, have a look at the source code.

edit flag offensive delete link more

Comments

Maybe I was not clear when I override the frame it overrides both the frame and the topic.

rnunziata gravatar image rnunziata  ( 2014-07-22 22:01:05 -0500 )edit

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.

demmeln gravatar image demmeln  ( 2014-07-24 06:03:05 -0500 )edit

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.

rnunziata gravatar image rnunziata  ( 2014-07-24 11:15:59 -0500 )edit

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.

demmeln gravatar image demmeln  ( 2014-07-25 10:19:38 -0500 )edit

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.

demmeln gravatar image demmeln  ( 2014-07-25 10:21:11 -0500 )edit
0

answered 2014-07-25 08:30:43 -0500

ct2034 gravatar image

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.

edit flag offensive delete link more

Comments

Not sure how this is answering the question...

demmeln gravatar image demmeln  ( 2014-07-25 10:18:19 -0500 )edit

This makes it all a bit more flexible and transparent but also less performant.

ct2034 gravatar image ct2034  ( 2014-07-25 10:39:26 -0500 )edit

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".

demmeln gravatar image demmeln  ( 2014-07-25 11:05:45 -0500 )edit

Is there any advantage of your proposal compared to using the parameter and remapping the pose topic?

demmeln gravatar image demmeln  ( 2014-07-25 11:06:16 -0500 )edit

This makes it all a bit more flexible and transparent but also less performant.

ct2034 gravatar image ct2034  ( 2014-07-25 12:08:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-22 14:39:39 -0500

Seen: 794 times

Last updated: Jul 25 '14