|
|
#include <armarx/navigation/algorithms/Costmap.h>
Classes | |
| struct | Filter |
| struct | Optimum |
| struct | Parameters |
| struct | Vertex |
Public Types | |
| enum class | AddMode { MIN , MAX , MULTIPLY } |
| using | Grid = Eigen::MatrixXf |
| using | Index = Eigen::Array2i |
| using | Mask = Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> |
| using | Position = Eigen::Vector2f |
Public Member Functions | |
| 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) const |
| Find the closest collision-free position to a given position. | |
| 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 |
Static Public Member Functions | |
| static Costmap | WithSameDimsAs (const Costmap &other, const Grid &grid, const std::optional< Mask > &mask=std::nullopt) |
| Create a costmap with the same dimensions and parameters as the given one. | |
Friends | |
| class | CostmapBuilder |
| class | SocialCostmapBuilder |
| using Mask = Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> |
| Costmap | ( | const Grid & | grid, |
| const Parameters & | parameters, | ||
| const SceneBounds & | sceneBounds, | ||
| const std::optional< Mask > & | mask = std::nullopt, | ||
| const core::Pose2D & | origin = core::Pose2D::Identity() ) |
Definition at line 31 of file Costmap.cpp.
Definition at line 446 of file Costmap.cpp.
Definition at line 376 of file Costmap.cpp.
Definition at line 321 of file Costmap.cpp.
|
inline |
| void cutToValidBoundingBox | ( | ) |
Definition at line 562 of file Costmap.cpp.
| void excludeUnreachable | ( | const Position & | position | ) |
Definition at line 748 of file Costmap.cpp.
| void filter | ( | const Filter & | filter | ) |
Definition at line 244 of file Costmap.cpp.
| std::optional< Costmap::Vertex > findClosestCollisionFreeVertex | ( | const Position & | position, |
| float | maxDistance ) const |
Find the closest collision-free position to a given position.
Searches in expanding circles up to maxDistance for the closest position that is not in collision (grid value > 0).
| position | The starting position to search from |
| maxDistance | Maximum search radius [mm] |
Definition at line 860 of file Costmap.cpp.
| void forEachCell | ( | const std::function< void(const Index &)> & | f | ) | const |
Definition at line 219 of file Costmap.cpp.
| void forEachCellParallel | ( | const std::function< void(const Index &)> & | f | ) | const |
Definition at line 231 of file Costmap.cpp.
| const Costmap::Grid & getGrid | ( | ) | const |
Definition at line 308 of file Costmap.cpp.
|
noexcept |
Definition at line 165 of file Costmap.cpp.
|
noexcept |
Definition at line 529 of file Costmap.cpp.
|
noexcept |
Definition at line 535 of file Costmap.cpp.
| std::pair< Costmap::Index, Costmap::Index > getValidBoundingBox | ( | ) | const |
Definition at line 715 of file Costmap.cpp.
| bool isInCollision | ( | const Position & | p | ) | const |
Definition at line 314 of file Costmap.cpp.
|
noexcept |
checks whether the cell is masked out
Definition at line 82 of file Costmap.cpp.
| Costmap mergeInto | ( | const std::vector< Costmap > & | costmaps, |
| const std::vector< float > & | weights ) const |
Merge a list of costmaps into this costmap.
| costmaps | list of other costmaps |
| weights | [weights of other costmaps..., weights of this costmap] |
Definition at line 596 of file Costmap.cpp.
| std::size_t numberOfValidElements | ( | ) | const |
Definition at line 671 of file Costmap.cpp.
| Costmap::Optimum optimum | ( | ) | const |
Definition at line 171 of file Costmap.cpp.
|
inline |
|
noexcept |
Definition at line 302 of file Costmap.cpp.
|
inline |
| std::pair< int, int > toIndexUnsanitized | ( | const Eigen::Vector2f & | globalPosition | ) | const |
Definition at line 116 of file Costmap.cpp.
| Costmap::Position toPositionGlobal | ( | const Index & | index | ) | const |
Definition at line 75 of file Costmap.cpp.
| Costmap::Position toPositionLocal | ( | const Index & | index | ) | const |
Definition at line 61 of file Costmap.cpp.
| Costmap::Vertex toVertex | ( | const Position & | globalPosition | ) | const |
Definition at line 146 of file Costmap.cpp.
| std::optional< Costmap::Vertex > toVertexOrInvalid | ( | const Eigen::Vector2f & | globalPosition | ) | const |
Definition at line 132 of file Costmap.cpp.
| void validateSizes | ( | ) | const |
Definition at line 46 of file Costmap.cpp.
Definition at line 541 of file Costmap.cpp.
Definition at line 553 of file Costmap.cpp.
|
static |
Create a costmap with the same dimensions and parameters as the given one.
Only the content (grid and mask) are altered.
| other | The costmap providing the dimensions and parameters |
| grid | |
| mask |
Definition at line 854 of file Costmap.cpp.