Skip to main content

internal Namespace

Definition​

namespace moveit_pro::behaviors::localization::internal { ... }

Classes Index​

structDistanceField

For each grid cell, the distance in metres to the nearest wall cell, capped at max_distance. More...

structResidualStats

Result of scoreEndpoints. More...

structScanMatchInputs

The numeric inputs of ScanMatchResidual, checked by validateScanMatchInputs. More...

Functions Index​

DistanceFieldbuildDistanceField (int width, int height, double resolution, const std::vector< std::int8_t > &occupancy, double max_distance)

Builds a DistanceField from OccupancyGrid data. More...

std::vector< Eigen::Vector2d >polarToCartesian (const std::vector< float > &ranges, double angle_min, double angle_increment, double min_range, double max_range, const Eigen::Isometry3d &target_from_scan)

Converts a planar laser scan from polar (range, bearing) to 2D Cartesian points in a target frame. More...

ResidualStatsscoreEndpoints (const DistanceField &field, const std::vector< Eigen::Vector2d > &endpoints, double inlier_distance)

Scores how well beam endpoints fit the map. More...

tl::expected< void, std::string >validateScanMatchInputs (const ScanMatchInputs &inputs)

Variables Index​

constexpr std::int8_tkOccupiedThreshold = 65

Occupancy value (0-100) at or above which a cell is a wall. Matches nav2's default occupied threshold. More...

constexpr doublekMaxWallDistance = 2.0

Distance cap of the field, in metres. It only has to exceed any useful inlier distance. More...

Functions​

buildDistanceField()​

DistanceField moveit_pro::behaviors::localization::internal::buildDistanceField (int width, int height, double resolution, const std::vector< std::int8_t > & occupancy, double max_distance)

Builds a DistanceField from OccupancyGrid data.

Parameters
width

Columns.

height

Rows.

resolution

Cell size, in metres.

occupancy

Row-major cell values: 0-100 occupancy, or -1 for unknown. Unknown cells count as free.

max_distance

Cap on every distance, in metres.

Returns

An invalid field if a dimension is not positive or occupancy has the wrong size.

Definition at line 35 of file scan_match_scoring.cpp.

polarToCartesian()​

std::vector< Eigen::Vector2d > moveit_pro::behaviors::localization::internal::polarToCartesian (const std::vector< float > & ranges, double angle_min, double angle_increment, double min_range, double max_range, const Eigen::Isometry3d & target_from_scan)

Converts a planar laser scan from polar (range, bearing) to 2D Cartesian points in a target frame.

Beam i has bearing angle_min + i * angle_increment in the scan frame's XY plane. Each beam endpoint is transformed by target_from_scan and its z is dropped. Beams with a range outside [min_range, max_range], NaN, or infinite are skipped, so the result can be shorter than ranges.

Parameters
ranges

Beam ranges, in metres, as in sensor_msgs/LaserScan.

angle_min

Bearing of the first beam, in radians.

angle_increment

Bearing step between beams, in radians.

min_range

Shortest range kept, in metres.

max_range

Longest range kept, in metres.

target_from_scan

Pose of the scan frame in the target frame. A full 3D transform, so tilted or inverted mounts are handled.

Returns

Endpoints of the kept beams, in the target frame, in metres.

Definition at line 77 of file scan_match_scoring.cpp.

scoreEndpoints()​

ResidualStats moveit_pro::behaviors::localization::internal::scoreEndpoints (const DistanceField & field, const std::vector< Eigen::Vector2d > & endpoints, double inlier_distance)

Scores how well beam endpoints fit the map.

Parameters
field

Distance field of the map.

endpoints

Beam endpoints in the grid frame, in metres, e.g. from polarToCartesian.

inlier_distance

An endpoint fits if it is closer than this to a wall, in metres.

Returns

All zeros if field is invalid or endpoints is empty.

Definition at line 99 of file scan_match_scoring.cpp.

validateScanMatchInputs()​

tl::expected< void, std::string > moveit_pro::behaviors::localization::internal::validateScanMatchInputs (const ScanMatchInputs & inputs)
Returns

Nothing if every input is valid, else an error naming the first invalid one.

Definition at line 115 of file scan_match_scoring.cpp.

Variables​

kMaxWallDistance​

constexpr double moveit_pro::behaviors::localization::internal::kMaxWallDistance = 2.0
constexpr

Distance cap of the field, in metres. It only has to exceed any useful inlier distance.

Definition at line 29 of file scan_match_scoring.hpp.

kOccupiedThreshold​

constexpr std::int8_t moveit_pro::behaviors::localization::internal::kOccupiedThreshold = 65
constexpr

Occupancy value (0-100) at or above which a cell is a wall. Matches nav2's default occupied threshold.

Definition at line 26 of file scan_match_scoring.hpp.


The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.