0
$\begingroup$

Rosanswers logo

hello, I have a nomadic scout 2-wheel robot with a kinect sensor that is able to navigate inside a map by means of the ros (groovy) navigation stack. An odometry topic is provided by the robot, and the /odom --> /base_link transform too. I want to feed the ekf_localization node with the position the robot provided by our Vicon MoCap system, in order to fuse it with the odometry information. I have a map, provided by a map server, and the robot pose coming from Vicon is published as a PoseWithCovarianceStamped topic, with ref_frame_id = 'map'. So I want to use ekf_localization node in the second mode, with world_frame = 'map', and I expect the /map --> /odom tf from ekf_localization node. What I see is that ekf_localization node is publishing /odom --> /base_link transform too, overwriting the odometry-generated transform each other. So the ekf_localization node seems working in the first mode, and it does not sense the /odom --> /base_link tf, already published by the robot.

this is my ekf launch file:

<launch>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">

      <param name="frequency" value="30"/>

      <param name="sensor_timeout" value="0.1"/>

      <param name="two_d_mode" value="true"/>

      <param name="pose0" value="/scoutPose"/>

      <param name="odom0" value="/odom"/>

      <rosparam param="pose0_config">[true, true, false, true, true, true, false, false, false, false, false, false]</rosparam>

      <rosparam param="odom0_config">[true, true, false, true, true, true, false, false, false, false, false, false]</rosparam>

      <param name="pose0_differential" value="true"/>

      <param name="odom0_differential" value="false"/>

      <param name="debug" value="true"/>

      <param name="debug_out_file"  value="/home/robouser/debug_ekf_localization.txt"/>

      <param name="map_frame" value="map"/>

      <param name="world_frame" value="map"/>

      <param name="odom_frame" value="odom"/>

      <param name="base_link_frame" value="base_link"/>

      <rosparam param="process_noise_covariance">[0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.05, 0.0, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0, 0.002, 0.0, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0, 0.002, 0.0,
                                                  0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.004]</rosparam>

    </node>

</launch>

and this is the vicon launch file:

<launch>
        <node pkg="vicon_bridge" type="vicon_bridge" name="vicon" output="screen">
                <param name="stream_mode" value="ClientPull" type="str" />
                <param name="datastream_hostport" value="ivy:801" type="str" />
                <param name="tf_ref_frame_id" value="/map" type="str" />
        </node>
</launch>

the debug file shows the warning message shown in the subject. What could be the problem?

thank you in advance.

Roberto


Originally posted by roberto colella on ROS Answers with karma: 1 on 2015-09-17

Post score: 0


Original comments

Comment by Tom Moore on 2015-09-18:
Please post a sample message for every input topic. Also, how did you check that the EKF is also publishing the odom->base_link transform? Are you inferring that from the warning, or did you use another method?

Comment by Tom Moore on 2015-09-22:
I believe that the transform was being published, but what I'm not sure of is that the EKF was publishing it. Your odometry source will often broadcast that transform as well. If your world_frame is set to map, the EKF will not broadcast a transform from odom->base_link.

Comment by roberto colella on 2015-09-22:
With world_frame = map the ekf should publish the map --> odom transform. What happens is that it publishes odom->base_link transform instead. I am sure that EKF was publishing the odom->base_link transform, I checked with tf_monitor, rviz, rostopic echo...

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Adding answer as a comment isn't long enough.

Re: which transform the EKF is publishing, a few things:

  1. First, see the code here. The filter should always use your world_frame parameter as the parent frame for its tf broadcast. You're using the groovy version, and perhaps there's something going on there that I don't recall, but I'm pretty sure it works as well.
  2. The tools you listed tell you what transforms are being broadcast, but only tf_monitor can tell you which node is broadcasting it. Can you please post the output of tf_monitor?
  3. If for whatever reason the EKF is publishing that transform (as determined by the tf_monitor output and the test I suggested above), then please post your full launch file for every node you're running.

EDIT: Removing things you've already investigated, sorry.


Originally posted by Tom Moore with karma: 13689 on 2015-09-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.