neo_localization2

Summary

The neo_localization package provides a simple but effective replacement for the standard AMCL localization. It is quite similar to a particle filter, except the particles are created from scratch on every update and each particle is optimized using multiple Gauss-Netwon iterations.

It’s main purpose is to achieve a higher accuracy as well as more robustness in challenging environments. Depending on the quality of the map a localization accuracy of up to 1 mm can be achieved.

In addition it will automatically switch into a constrained 1D mode or even into 0D mode (continue with just odometry) in case of insufficient surroundings to localize with.

It is installed on Neobotix platforms as of April 2020 by default.

Location: https://github.com/neobotix/neo_localization2

Nodes

neo_localization_node

Publishes:
  • /tf (if enabled, map frame with odom child)
  • /amcl_pose (for backward-compatibility)
  • /map_pose (same as /amcl_pose)
  • /map_tile
  • /particlecloud
Subscribes:
  • /scan (can change it in parameters)
  • /map
  • /initialpose

Parameters

odom_frame:
Type Default
odom_frame odom
Description

Default local frame id of the robot. For namespace setup, set the frame id with “/” at the beginning

base_frame:
Type Default
base_frame base_link
Description

Default base frame id of the robot. For namespace setup, set the frame id with “/” at the beginning

scan_topic:
Type Default
scan_topic scan
Description

Default scan topic for the localization to subscribe to. For differential robots from Neobotix, it’s always lidar_1/scan_filtered For namespace setup, set the topic without “/” at the beginning.

map_topic:
Type Default
map_topic map
Description

Default map topic for the localization to subscribe to.

map_frame:
Type Default
map_frame map
Description

Default broadcasted map frame.

update_gain:
Type Default
double 0.5
Description

exponential low pass gain for localization update (0 to 1)

confidence_gain:
 
Type Default
double 0.01
Description

time based confidence gain when in 2D / 1D mode

sample_rate:
Type Default
int 10
Description

how many particles (samples) to spread (per update)

loc_update_rate:
 
Type Default
int 10
Description

localization update rate [1/s]

map_update_rate:
 
Type Default
double 0.5
Description

map tile update rate [1/s]

map_size:
Type Default
int 1000
Description

map tile size in pixels

map_downscale:
Type Default
int 0
Description

how often to downscale (half) the original map

num_smooth:
Type Default
int 5
Description

how many 3x3 gaussian smoothing iterations are applied to the map

min_score:
Type Default
double 0.2
Description

minimum score for valid localization (otherwise 0D mode), higher values make it go into 0D mode earlier.

odometry_std_xy:
 
Type Default
double 0.01
Description

odometry error in x and y [m/m], how fast to increase particle spread when in 1D / 0D mode

odometry_std_yaw:
 
Type Default
double 0.01
Description

odometry error in yaw angle [rad/rad], how fast to increase particle spread when in 1D / 0D mode

min_sample_std_xy:
 
Type Default
double 0.025
Description

minimum particle spread in x and y [m]

min_sample_std_yaw:
 
Type Default
double 0.5
Description

initial/maximum particle spread in yaw angle [rad]

constrain_threshold:
 
Type Default
double 0.5
Description

threshold for 1D / 2D position decision making (minimum average second order gradient) if worst gradient direction is below this value we go into 1D mode if both gradient directions are below we may go into 0D mode, depending on disable_threshold higher values will make it go into 1D / 0D mode earlier

constrain_threshold_yaw:
 
Type Default
double 0.2
Description

threshold for 1D / 2D decision making (with or without orientation) higher values will make it go into 1D mode earlier

min_points:
Type Default
double 20
Description

minimum number of points per update

solver_gain:
Type Default
double 0.1
Description

solver update gain, lower gain = more stability / slower convergence

solver_damping:
Type Default
double 1000.0
Description

solver update damping, higher damping = more stability / slower convergence

solver_iteration:
 
Type Default
int 20
Description

number of gauss-newton iterations per sample per scan

transform_timeout:
 
Type Default
double 0.2
Description

maximum wait for getting transforms [s]

broadcast_tf:
Type Default
bool true
Description

if to broadcast map frame

For example, see: https://github.com/neobotix/neo_mpo_700-2/blob/rolling/configs/navigation/navigation.yaml

Usage

neo_localization2 can be launched in conjunction with navigation2 as follows:

Note

Please choose the correct package name depending on your platform.

ros2 launch neo_mpo_700-2 navigation.launch.py

neo_localization2 can also be launched in conjunction with nav2 as follows:

Note

Please choose the correct package name depending on your platform.

ros2 launch neo_mpo_700-2 localization_neo.launch.py