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

I have used robot_localization node to fuse my odometry data with IMU. After running it and visualizing in RViz the tf tree is jiggling a lot (maybe due to multiple sources publishing the info at the same time). How do I solve this?

asked 2022-11-18 08:02:20 -0500

pavan_c gravatar image

I am using ROS NOETIC and Pioneer3DX as the mobile robot which publishes Odometry info into /RosAria/pose topic as nav_msgs/Odometry message. Phidgets Spatial IMU is being used which published the IMU data to /imu/data_raw and /imu/data (this uses imu_madgwick filter to get the orientation data) topics as sensor_msgs/imu.

This is my launch file:

<launch>

<node pkg="robot_localization" type="ekf_localization_node" name="ekf_odom_node" output="screen" >

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

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

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

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

   <remap from="odometry/filtered" to="odom/ekf/enc_imu"/>

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

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

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

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

   <param name="transform_time_offset" value="0.0"/>

   <param name="odom0" value="/RosAria/pose"/>

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

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

   <param name="odom0_queue_size" value="10" />

   <rosparam param="odom0_config">[false,  false, false,

                                   false, false, false,

                                   true, true, false,

                                   false, false, true,

                                   false, false, false]</rosparam>

   <param name="imu0" value="/imu/data"/>

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

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

   <param name="imu0_queue_size" value="10" />

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

   <rosparam param="imu0_config">[false,  false, false,

                                  false, false, true,

                                  false, false, false,

                                  false, false, true,

                                  true, false, false]</rosparam>

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

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

   <param name="debug_out_file" value="debug_odom_ekf.txt" />

   <rosparam param="process_noise_covariance">[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, 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, 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,

                                               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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 2.7491722135750453e-06, 0, 0, 0, 0, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.7491722135750453e-06, 0, 0, 0, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.7491722135750453e-06, 0, 0, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.53975837175367e-06, 0, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.53975837175367e-06, 0,

                                               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.53975837175367e-06]</rosparam>

</node>

</launch>

My Odometry data doesn't have ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-11-23 04:52:51 -0500

Kunal Mod gravatar image

I was facing the same problem as both the robot_localization and the diff_drive_controller were publishing the tf's. So I disabled the tf's comming from diff_drive_controller by adding this param: enable_odom_tf: false This solved my problem.

edit flag offensive delete link more

Comments

Thank You for the answer Kunal, it is working. I even got it working with RosAria by creating a duplicate topic with different names of frame_id's so that TF's won't get clashed. Also, can you please let me know how to configure the process noise covariance matrix in the EKF node?

pavan_c gravatar image pavan_c  ( 2022-11-30 00:59:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-11-17 21:16:32 -0500

Seen: 87 times

Last updated: Nov 18 '22