internal Namespace
Definition
Classes Index
| struct | DistanceField |
|
For each grid cell, the distance in metres to the nearest wall cell, capped at max_distance. More... | |
| struct | ResidualStats |
|
Result of scoreEndpoints. More... | |
| struct | ScanMatchInputs |
|
The numeric inputs of ScanMatchResidual, checked by validateScanMatchInputs. More... | |
Functions Index
| DistanceField | buildDistanceField (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... | |
| ResidualStats | scoreEndpoints (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_t | kOccupiedThreshold = 65 |
|
Occupancy value (0-100) at or above which a cell is a wall. Matches nav2's default occupied threshold. More... | |
| constexpr double | kMaxWallDistance = 2.0 |
|
Distance cap of the field, in metres. It only has to exceed any useful inlier distance. More... | |
Functions
buildDistanceField()
|
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()
|
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()
|
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()
|
- 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 |
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 |
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.