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

EKF odometry/filtered at 9Hz while /odometry input at 99Hz

asked 2023-06-29 15:40:24 -0500

Dan__2022 gravatar image

Hi!

I've read all posts regarding slow EKF odometry/filtered topic output, and still have no solution found.

SImpliest EKF config, just fusing the odometry from Gazebo differential drive.

1 When Gazebo differential drive in robot_description.urdf is set to publish tf <publish_odom_tf>true</publish_odom_tf>

and EKF publish_tf: false -> EKF provides odometry/filtered topic at ~100HZ and is precise, in rviz odom has no delays - just perfect

2 When Gazebo differential drive set not to publish tf <publish_odom_tf>false</publish_odom_tf>

and EKF publish_tf: true -> EKF gives 9HZ of odometry/filtered topic and odometry in rviz is always 'late' and moves very very slow, the robot has already stopped, the odom - still moving slowly

odometry topic itself is published by Gazebo at ~99Hz - no problems here

What is wrong with the config, please, help me

Thanks!

diff_drive section from robot_description.urdf

 <plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'>
      <ros>
        <namespace>/demo</namespace>
      </ros>

      <!-- wheels -->
      <left_joint>drivewhl_l_joint</left_joint>
      <right_joint>drivewhl_r_joint</right_joint>

      <!-- kinematics -->
      <wheel_separation>0.4</wheel_separation>
      <wheel_diameter>0.2</wheel_diameter>

      <!-- limits -->   
      <max_wheel_torque>20</max_wheel_torque>
      <max_wheel_acceleration>1.0</max_wheel_acceleration>

      <!-- output -->
      <publish_odom>true</publish_odom>
      <publish_odom_tf>false</publish_odom_tf>
      <publish_wheel_tf>true</publish_wheel_tf>

      <odometry_frame>odom</odometry_frame>
      <robot_base_frame>base_link</robot_base_frame>
    </plugin>

ekf.yaml

ekf_filter_local_node:
    ros__parameters:

        use_sim_time: true
        frequency: 30.0
        sensor_timeout: 0.1
        transform_time_offset: 0.0
        two_d_mode: true
        publish_acceleration: true

        publish_tf: true

        print_diagnostics: true
        debug: false
        reset_on_time_jump: true

        # transform odom->base_link

        map_frame: map              # Defaults to "map" if unspecified
        odom_frame: odom            # Defaults to "odom" if unspecified
        base_link_frame: base_link  # Defaults to "base_link" if unspecified
        world_frame: odom           # Defaults to the value of odom_frame if unspecified


        odom0: demo/odom
        odom0_config: [true,  true,  false,
                       false, false, false,
                       false, false, false,
                       false, false, true,
                       false, false, false]
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-30 09:40:32 -0500

Dan__2022 gravatar image

updated 2023-06-30 09:41:27 -0500

I thought, if odometry topic from gazevo diff drive plugin is published at 99Hz, the clock is also published at high rate - no. So, according to this I added gazebo.yaml

gazebo:
  ros__parameters:
    publish_rate: 100.0

and in gazebo launch loaded this config yaml. Now the ekf is as needed - ~30Hz .

But the problem witn slow odom in rviz remains, robot moves 5 times faster, then odom. Will ask another question separately as the frequency problem is solved.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-06-29 15:40:24 -0500

Seen: 56 times

Last updated: Jun 30 '23