Costmap Class Reference

#include <armarx/navigation/algorithms/Costmap.h>

Classes

struct  Filter
 
struct  Optimum
 
struct  Parameters
 
struct  Vertex
 

Public Types

enum  AddMode { MIN, MAX }
 
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 add (const Costmap &other, float weight=1.0)
 
core::Pose2D centerPose () const
 
 Costmap (const Grid &grid, const Parameters &parameters, const SceneBounds &sceneBounds, const std::optional< Mask > &mask=std::nullopt, const core::Pose2D &origin=core::Pose2D::Identity())
 
void filter (const Filter &filter)
 
const GridgetGrid () const
 
const SceneBoundsgetLocalSceneBounds () const noexcept
 
const std::optional< Mask > & getMask () const noexcept
 
GridgetMutableGrid ()
 
std::optional< Costmap::Mask > & getMutableMask () noexcept
 
bool isInCollision (const Position &p) const
 
bool isValid (const Index &index) const noexcept
 checks whether the cell is masked out More...
 
Costmap mergeInto (const std::vector< Costmap > &costmaps, const std::vector< float > &weights) const
 
std::size_t numberOfValidElements () const
 
Optimum optimum () const
 
const core::Pose2Dorigin () const
 
const Parametersparams () const noexcept
 
void setOrigin (const core::Pose2D &globalPose)
 
Position toPositionGlobal (const Index &index) const
 
Position toPositionLocal (const Index &index) const
 
Vertex toVertex (const Position &globalPosition) const
 
std::optional< floatvalue (const Index &index) const
 
std::optional< floatvalue (const Position &position) const
 

Friends

class CostmapBuilder
 
class SocialCostmapBuilder
 

Detailed Description

Definition at line 13 of file Costmap.h.

Member Typedef Documentation

◆ Grid

using Grid = Eigen::MatrixXf

Definition at line 46 of file Costmap.h.

◆ Index

using Index = Eigen::Array2i

Definition at line 44 of file Costmap.h.

◆ Mask

using Mask = Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 49 of file Costmap.h.

◆ Position

using Position = Eigen::Vector2f

Definition at line 45 of file Costmap.h.

Member Enumeration Documentation

◆ AddMode

enum AddMode
strong
Enumerator
MIN 
MAX 

Definition at line 106 of file Costmap.h.

Constructor & Destructor Documentation

◆ Costmap()

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 32 of file Costmap.cpp.

Member Function Documentation

◆ add() [1/2]

bool add ( const Costmap other,
AddMode  mode 
)

Definition at line 314 of file Costmap.cpp.

+ Here is the call graph for this function:

◆ add() [2/2]

bool add ( const Costmap other,
float  weight = 1.0 
)

Definition at line 249 of file Costmap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ centerPose()

core::Pose2D centerPose ( ) const
inline

Definition at line 82 of file Costmap.h.

+ Here is the call graph for this function:

◆ filter()

void filter ( const Filter filter)

Definition at line 175 of file Costmap.cpp.

+ Here is the call graph for this function:

◆ getGrid()

const Costmap::Grid & getGrid ( ) const

Definition at line 236 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ getLocalSceneBounds()

const SceneBounds & getLocalSceneBounds ( ) const
noexcept

Definition at line 126 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ getMask()

const std::optional< Costmap::Mask > & getMask ( ) const
noexcept

Definition at line 392 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ getMutableGrid()

Grid& getMutableGrid ( )
inline

Definition at line 69 of file Costmap.h.

+ Here is the caller graph for this function:

◆ getMutableMask()

std::optional< Costmap::Mask > & getMutableMask ( )
noexcept

Definition at line 398 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ isInCollision()

bool isInCollision ( const Position p) const

Definition at line 242 of file Costmap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValid()

bool isValid ( const Index index) const
noexcept

checks whether the cell is masked out

Definition at line 78 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ mergeInto()

Costmap mergeInto ( const std::vector< Costmap > &  costmaps,
const std::vector< float > &  weights 
) const

Definition at line 425 of file Costmap.cpp.

+ Here is the call graph for this function:

◆ numberOfValidElements()

std::size_t numberOfValidElements ( ) const

Definition at line 497 of file Costmap.cpp.

◆ optimum()

Costmap::Optimum optimum ( ) const

Definition at line 132 of file Costmap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ origin()

const core::Pose2D& origin ( ) const
inline

Definition at line 130 of file Costmap.h.

+ Here is the caller graph for this function:

◆ params()

const Costmap::Parameters & params ( ) const
noexcept

Definition at line 230 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ setOrigin()

void setOrigin ( const core::Pose2D globalPose)
inline

Definition at line 136 of file Costmap.h.

◆ toPositionGlobal()

Costmap::Position toPositionGlobal ( const Index index) const

Definition at line 71 of file Costmap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toPositionLocal()

Costmap::Position toPositionLocal ( const Index index) const

Definition at line 57 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ toVertex()

Costmap::Vertex toVertex ( const Position globalPosition) const

Definition at line 99 of file Costmap.cpp.

+ Here is the caller graph for this function:

◆ value() [1/2]

std::optional< float > value ( const Index index) const

Definition at line 404 of file Costmap.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ value() [2/2]

std::optional< float > value ( const Position position) const

Definition at line 416 of file Costmap.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ CostmapBuilder

friend class CostmapBuilder
friend

Definition at line 18 of file Costmap.h.

◆ SocialCostmapBuilder

friend class SocialCostmapBuilder
friend

Definition at line 19 of file Costmap.h.


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