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

remap "odometry/filtered" to "odom" causes weird behaviour in final odom output

asked 2023-03-11 06:50:30 -0500

Rahulwashere gravatar image

** bag files attached! please help,

Hello, so i have been trying to use ekf ros package on ROS MELODIC, i have successfully implemented MPU 6050 using this code MPU 6050 ROSSERIAL NODE. My tf tree looks like this image description

my ekf.yaml file looks like this

frequency: 100

two_d_mode: true

publish_tf: true

odom_frame: odom
base_link_frame: base_link
world_frame: odom
map_frame: map

odom0: /odom
odom0_config: [false,false,false,

odom0_differential: false

imu0: /imu/data
imu0_config: [false,false,false,

imu0_differential: false

imu0_remove_gravitational_acceleration: true

dynamic_process_noise_covariance: true

initial_state: [1.0,  2.0,  0.0,
               0.0,  0.0,  1.83,
               0.0,  0.0,  0.0,
               0.0,  0.0,  0.0,
               0.0,  0.0,  0.0]

My navigation launch file looks like this

  <!-- Arguments -->
  <arg name="open_rviz" default="true"/>
  <arg name="move_forward_only" default="false"/>
  <arg name="map_file" default="$(find xbotrealversionone_navigation)/map_provider/maps/test2.yaml"/>

  <!-- xbotreal -->

  <!-- Map server -->
  <node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/>

  <!-- AMCL -->
  <include file="$(find xbotrealversionone_navigation)/launch/amcl.launch">
    <!--param name="odom_frame_id" value="odometry/filtered"/-->


  <!-- move_base -->
  <include file="$(find xbotrealversionone_navigation)/launch/move_base.launch">
    <arg name="move_forward_only" value="$(arg move_forward_only)"/>
    <!--param name="odom_frame_id" value="odometry/filtered"/-->


  <!-- rviz -->
  <group if="$(arg open_rviz)"> 
    <node pkg="rviz" type="rviz" name="rviz" required="true"
          args="-d $(find xbotrealversionone_description)/urdf.rviz"/>

  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
    <rosparam command="load" file="$(find xbotrealversionone_navigation)/configuration_files/ekf.yaml"/>
    <!--remap from="odometry/filtered" to="odom"/-->

The issue is when i comment out the <remap="odometry filtered"="" to="odom"/> i can visualize odometry filtered and odom both in rviz. their behaviour is pretty good. the localization is consitent with very very low drift which amcl takes care. however when i use the remap, cause i want to be able to do autonomous navigation. all of a sudden my robot starts to drift in x-direction with my /odom rapidly jumping to zero and then to some value, in a wave fashion.

edit retag flag offensive close merge delete



A possible reason for this symptom is that you're somehow wrapping the EKF output back into one of its inputs.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2023-03-12 08:12:26 -0500 )edit

i thought we were supposed to do it ?? however instead today i tried feeding odometry/filtered to amcl as well as move_base , i could perform the navigation robustly. but were we not supposed to remap this parameter.

Rahulwashere gravatar image Rahulwashere  ( 2023-03-12 08:48:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2023-03-13 07:43:24 -0500

Mike Scheutzow gravatar image

If you want to rename the output topic of the EKF to /odom, then you also have to rename any input topic already using that topic name to something else.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2023-03-11 06:50:30 -0500

Seen: 191 times

Last updated: Mar 13 '23