No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro kilted. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.

ekf_localizer package from autoware_learn repo

amathutils_lib autoware_build_flags autoware_health_checker emergency_handler gnss lanelet2_extension libvectormap libwaypoint_follower map_file object_map op_planner op_ros_helpers op_simu op_utility ros_observer tvm_utility vector_map vector_map_server vehicle_sim_model autoware_connector ekf_localizer gnss_localizer image_processor imm_ukf_pda_track lidar_apollo_cnn_seg_detect lidar_euclidean_cluster_detect lidar_fake_perception lidar_kf_contour_track lidar_localizer lidar_naive_l_shape_detect lidar_point_pillars lidar_shape_estimation naive_motion_predict ndt_cpu ndt_gpu ndt_tku obj_db pcl_omp_registration pixel_cloud_fusion points_downsampler points_preprocessor pos_db range_vision_fusion road_occupancy_processor roi_object_filter trafficlight_recognizer twist_generator vel_pose_diff_checker vision_beyond_track vision_darknet_detect vision_lane_detect vision_segment_enet_detect vision_ssd_detect astar_search costmap_generator decision_maker dp_planner ff_waypoint_follower freespace_planner lane_planner lattice_planner ll2_global_planner mpc_follower op_global_planner op_local_planner op_simulation_package op_utilities pure_pursuit state_machine_lib twist_filter twist_gate way_planner waypoint_maker waypoint_planner autoware_quickstart_examples autoware_can_msgs autoware_config_msgs autoware_external_msgs autoware_lanelet2_msgs autoware_map_msgs autoware_msgs autoware_system_msgs tablet_socket_msgs vector_map_msgs carla_autoware_bridge gazebo_camera_description gazebo_imu_description lgsvl_simulator_bridge vehicle_gazebo_simulation_interface vehicle_gazebo_simulation_launcher wf_simulator autoware_bag_tools autoware_camera_lidar_calibrator autoware_launcher autoware_launcher_rviz calibration_publisher data_preprocessor graph_tools kitti_box_publisher kitti_launch kitti_player lanelet_aisan_converter log_tools map_tf_generator map_tools marker_downsampler mqtt_socket multi_lidar_calibrator oculus_socket pc2_downsampler rosbag_controller runtime_manager sound_player system_monitor tablet_socket twist2odom udon_socket vehicle_engage_panel vehicle_socket decision_maker_panel detected_objects_visualizer fastvirtualscan gazebo_world_description glviewer integrated_viewer points2image rosinterface autoware_rviz_plugins vehicle_description vehicle_model adi_driver as autoware_driveworks_gmsl_interface autoware_driveworks_interface vlg22c_cam custom_msgs garmin hokuyo javad_navsat_driver kvaser sick_lms5xx memsic_imu microstrain_driver nmea_navsat autoware_pointgrey_drivers sick_ldmrs_description sick_ldmrs_driver sick_ldmrs_laser sick_ldmrs_msgs sick_ldmrs_tools vectacam xsens_driver ymc ds4 ds4_driver ds4_msgs lanelet2 lanelet2_core lanelet2_examples lanelet2_io lanelet2_maps lanelet2_matching lanelet2_projection lanelet2_python lanelet2_routing lanelet2_traffic_rules lanelet2_validation mrt_cmake_modules

Package Summary

Tags No category tags.
Version 1.12.0
License Apache 2.0
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description autoware src learn and recode.
Checkout URI https://github.com/is-whale/autoware_learn.git
VCS Type git
VCS Version 1.14
Last Updated 2025-03-14
Dev Status UNKNOWN
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The ekf_localizer package

Additional Links

No additional links.

Maintainers

  • horibe

Authors

No additional authors.

Overview

The Extend Kalman Filter Localizer estimates robust and less noisy robot pose and twist by integrating the 2D vehicle dynamics model with input ego-pose and ego-twist messages. The algorithm is designed especially for fast moving robot such as autonomous driving system.

Flowchart

The overall flowchart of the ekf_localizer is described below.

Features

This package includes the following features:

  • Time delay compensation for input messages, which enables proper integration of input information with varying time delay. This is important especially for high speed moving robot, such as autonomous driving vehicle. (see following figure).
  • Automatic estimation of yaw bias prevents modeling errors caused by sensor mounting angle errors, which can improve estimation accuracy.
  • Mahalanobis distance gate enables probabilistic outlier detection to determine which inputs should be used or ignored.
  • Smooth update, the Kalman Filter measurement update is typically performed when a measurement is obtained, but it can cause large changes in the estimated value especially for low frequency measurements. Since the algorithm can consider the measurement time, the measurement data can be divided into multiple pieces and integrated smoothly while maintaining consistency (see following figure).

####

Launch

The ekf_localizer starts with the default parameters with the following command.

roslaunch ekf_localizer ekf_localizer.launch

The parameters and input topic names can be set in the ekf_localizer.launch file.

Node

Subscribed Topics

  • measured_pose_with_covariance (geometry_msgs/PoseWithCovarianceStamped)

    Input pose source with measurement covariance matrix, used when use_pose_with_covariance is true.

  • measured_twist_with_covariance (geometry_msgs/PoseWithCovarianceStamped)

    Input twist source with measurement covariance matrix, used when use_twist_with_covariance is true.

  • measured_pose (geometry_msgs/PoseStamped)

    Input pose source, used when use_pose_with_covariance is false.

  • measured_twist (geometry_msgs/TwistStamped)

    Input twist source, used when use_twist_with_covariance is false.

  • initialpose (geometry_msgs/PoseWithCovarianceStamped)

    Initial pose for EKF. The estimated pose is initialized with zeros at start. It is initialized with this message whenever published.

Published Topics

  • ekf_pose (geometry_msgs/PoseStamped)

    Estimated pose.

  • ekf_pose_with_covariance (geometry_msgs/PoseWithCovarianceStamped)

    Estimated pose with covariance.

  • ekf_twist (geometry_msgs/TwistStamped)

    Estimated twist.

  • ekf_twist_with_covariance (geometry_msgs/TwistWithCovarianceStamped)

    Estimated twist with covariance.

Published TF

  • ekf_pose

    TF from “map” coordinate to estimated pose.

Functions

Predict

The current robot state is predicted from previously estimated data using a given prediction model. This calculation is called at constant interval (predict_frequency [Hz]). The prediction equation is described at the end of this page.

Measurement Update

Before update, the Mahalanobis distance is calculated between the measured input and the predicted state, the measurement update is not performed for inputs where the Mahalanobis distance exceeds the given threshold.

The predicted state is updated with the latest measured inputs, measured_pose and measured_twist. The updates are performed with the same frequency as prediction, usually at a high frequency, in order to enable smooth state estimation.

Parameter description

The parameters are set in launch/ekf_localizer.launch .

For Node

Name Type Description Default value
show_debug_info bool Flag to display debug info false
predict_frequency double Frequency for filtering and publishing [Hz] 50.0
tf_rate double Frqcuency for tf broadcasting [Hz] 10.0
extend_state_step int Max delay step which can be dealt with in EKF. Large number increases computational cost. 50
enable_yaw_bias_estimation bool Flag to enable yaw bias estimation true

For pose measurement

Name Type Description Default value
pose_additional_delay double Additional delay time for pose measurement [s] 0.0
pose_measure_uncertainty_time double Measured time uncertainty used for covariance calculation [s] 0.01
pose_rate double Approximated input pose rate used for covariance calculation [Hz] 10.0
pose_gate_dist double Limit of Mahalanobis distance used for outliers detection 10000.0
use_pose_with_covariance bool Flag to use covariance in pose_with_covarianve message false
pose_stddev_x double Standard deviation for pose position x [m] (used when use_pose_with_covariance is false) 0.05
pose_stddev_y double Standard deviation for pose position y [m] (used when use_pose_with_covariance is false) 0.05
pose_stddev_yaw double Standard deviation for pose yaw angle [rad] (used when use_pose_with_covariance is false) 0.025

For twist measurement

|Name|Type|Description|Default value| |:—|:—|:—|:—| |twist_additional_delay|double|Additional delay time for twist [s]|0.0| |twist_rate|double|Approximated input twist rate used for covariance calculation [Hz]|10.0| |twist_gate_dist|double|Limit of Mahalanobis distance used for outliers detection|10000.0| |use_twist_with_covariance|bool|Flag to use covariance in twist_with_covariance message|false| |twist_stddev_vx|double|Standard deviation for twist linear x [m/s] (used when use_twist_with_covariance is false) |0.2| |twist_stddev_wz|double|Standard deviation for twist angular z [rad/s] (used when use_twist_with_covariance is false) |0.03|

For process noise

|Name|Type|Description|Default value| |:—|:—|:—|:—| |proc_stddev_vx_c|double|Standard deviation of process noise in time differentiation expression of linear velocity x, noise for d_vx = 0|2.0| |proc_stddev_wz_c|double|Standard deviation of process noise in time differentiation expression of angular velocity z, noise for d_wz = 0|0.2| |proc_stddev_yaw_c|double|Standard deviation of process noise in time differentiation expression of yaw, noise for d_yaw = omege |0.005| |proc_stddev_yaw_bias_c|double|Standard deviation of process noise in time differentiation expression of yaw_bias, noise for d_yaw_bias = 0|0.001|

note: process noise for position x & y are calculated automatically from nonlinear dynamics.

How to turn EKF parameters

0. Preliminaries

  • Check header time in pose and twist message is set to sensor time appropriately, because time delay is calculated from this value. If it is difficult to set appropriate time due to timer synchronization problem, use twist_additional_delay and pose_additional_delay to correct the time.
  • Check the relation between measurement pose and twist is appropriate (whether the derivative of pose has similar value to twist). This discrepancy is caused mainly by unit error (such as comfusing radian/degree) or bias noise, and it causes large estimation errors.

1. Set sensor parameters

Set sensor-rate and standard-deviation from the basic information of the sensor. The pose_measure_uncertainty_time is for uncertainty of the header timestamp data.

  • pose_measure_uncertainty_time
  • pose_rate
  • pose_stddev_x
  • pose_stddev_y
  • pose_stddev_yaw
  • twist_rate
  • twist_stddev_vx
  • twist_stddev_wz

2. Set process model parameters

  • proc_stddev_vx_c : set to maximum linear acceleration
  • proc_stddev_wz_c : set to maximum angular acceleration
  • proc_stddev_yaw_c : This parameter describes the correlation between the yaw and yaw-rate. Large value means the change in yaw does not correlate to the estiamted yaw-rate. If this is set to 0, it means the change in estimate yaw is equal to yaw-rate. Usually this should be set to 0.
  • proc_stddev_yaw_bias_c : This parameter is the standard deviation for the rate of change in yaw bias. In most cases, yaw bias is constant, so it can be very small, but must be non-zero.

3. Tune sensor standard deviation parameters with rosbag simulation.

If the position measurement seems more reliable, make these parameters smaller. If the estimated position seems to be noisy due to pose measurement noise, make these values bigger.

  • pose_stddev_x
  • pose_stddev_y
  • pose_stddev_yaw

If the twist measurement seems more reliable, make these parameters smaller. If the estimated twist seems to be noisy due to pose measurement noise, make these values bigger.

  • twist_stddev_vx
  • twist_stddev_wz

Kalman Filter Model

kinematics model in update function

where b_k is the yaw-bias.

time delay model

Test Result with Autoware NDT

CHANGELOG
No CHANGELOG found.

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/ekf_localizer.launch
      • show_debug_info [default: false]
      • enable_yaw_bias_estimation [default: True]
      • predict_frequency [default: 50.0]
      • extend_state_step [default: 50]
      • use_pose_with_covariance [default: false]
      • input_pose_name [default: in_pose]
      • input_pose_with_cov_name [default: in_pose_with_covariance]
      • pose_additional_delay [default: 0.0]
      • pose_measure_uncertainty_time [default: 0.01]
      • pose_rate [default: 10.0]
      • pose_gate_dist [default: 10000.0]
      • pose_stddev_x [default: 0.05]
      • pose_stddev_y [default: 0.05]
      • pose_stddev_yaw [default: 0.025]
      • use_twist_with_covariance [default: false]
      • input_twist_name [default: in_twist]
      • input_twist_with_cov_name [default: in_twist_with_covariance]
      • twist_additional_delay [default: 0.0]
      • twist_rate [default: 10.0]
      • twist_gate_dist [default: 10000.0]
      • twist_stddev_vx [default: 0.2]
      • twist_stddev_wz [default: 0.03]
      • proc_stddev_yaw_c [default: 0.005]
      • proc_stddev_yaw_bias_c [default: 0.001]
      • proc_stddev_vx_c [default: 0.1]
      • proc_stddev_wz_c [default: 0.05]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ekf_localizer at Robotics Stack Exchange

No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.