|
| bool | add (const Costmap &other, AddMode mode, bool keepThis=false) |
| |
| bool | add (const Costmap &other, float weight=1.0) |
| |
| bool | addCostmapWithSameSizeAndPose (const Costmap &other, AddMode mode) |
| |
| core::Pose2D | centerPose () const |
| |
| | Costmap (const Grid &grid, const Parameters ¶meters, const SceneBounds &sceneBounds, const std::optional< Mask > &mask=std::nullopt, const core::Pose2D &origin=core::Pose2D::Identity()) |
| |
| void | cutToValidBoundingBox () |
| |
| void | excludeUnreachable (const Position &position) |
| |
| void | filter (const Filter &filter) |
| |
| std::optional< Vertex > | findClosestCollisionFreeVertex (const Position &position, float maxDistance, float minClearance=0.F) const |
| | Find the closest position to a given position that meets a clearance.
|
| |
| void | forEachCell (const std::function< void(const Index &)> &f) const |
| |
| void | forEachCellParallel (const std::function< void(const Index &)> &f) const |
| |
| const Grid & | getGrid () const |
| |
| const SceneBounds & | getLocalSceneBounds () const noexcept |
| |
| const std::optional< Mask > & | getMask () const noexcept |
| |
| Grid & | getMutableGrid () |
| |
| std::optional< Costmap::Mask > & | getMutableMask () noexcept |
| |
| std::pair< Index, Index > | getValidBoundingBox () const |
| |
| bool | isInCollision (const Position &p) const |
| |
| bool | isValid (const Index &index) const noexcept |
| | checks whether the cell is masked out
|
| |
| Costmap | mergeInto (const std::vector< Costmap > &costmaps, const std::vector< float > &weights) const |
| | Merge a list of costmaps into this costmap.
|
| |
| std::size_t | numberOfValidElements () const |
| |
| Optimum | optimum () const |
| |
| const core::Pose2D & | origin () const |
| |
| const Parameters & | params () const noexcept |
| |
| void | setOrigin (const core::Pose2D &globalPose) |
| |
| std::pair< int, int > | toIndexUnsanitized (const Eigen::Vector2f &globalPosition) const |
| |
| Position | toPositionGlobal (const Index &index) const |
| |
| Position | toPositionLocal (const Index &index) const |
| |
| Vertex | toVertex (const Position &globalPosition) const |
| |
| std::optional< Costmap::Vertex > | toVertexOrInvalid (const Eigen::Vector2f &globalPosition) const |
| |
| void | validateSizes () const |
| |
| std::optional< float > | value (const Index &index) const |
| |
| std::optional< float > | value (const Position &position) const |
| |
Find the closest position to a given position that meets a clearance.
Searches in expanding circles up to maxDistance for the closest position whose grid value exceeds minClearance.
The default of 0 reproduces a plain collision test, which is what a recovery search wants: any cell the robot fits in at all. Callers that have to satisfy a downstream clearance check must pass that same clearance here – a cell that is merely not inside an obstacle still counts as a collision to any checker with a safety margin, so projecting against 0 and then testing against a margin can never converge.
- Parameters
-
| position | The starting position to search from |
| maxDistance | Maximum search radius [mm] |
| minClearance | Required distance to obstacles [mm] |
- Returns
- std::optional<Vertex> The closest qualifying vertex, or nullopt if none found