Costmap3D Class Reference

#include <armarx/navigation/algorithms/orientation_aware/Costmap3D.h>

Classes

struct  Optimum
 
struct  Parameters
 
struct  Rotation
 
struct  Vertex
 

Public Types

using Grid = std::vector<Eigen::MatrixXf>
 
using Index = Eigen::Array2i
 
using Mask = Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic>
 
using Position = Eigen::Vector2f
 
using RotationDegrees = float
 
using RotationIndex = int
 

Public Member Functions

core::Pose2D centerPose (std::optional< Rotation > rotation=std::nullopt) const
 
Rotation closestRotationFromDegrees (RotationDegrees degrees) const
 
void convertToPseudoSDF ()
 
void convertToPseudoSDFForRotation (RotationIndex rot_index)
 
 Costmap3D (const Grid &grid, const Parameters &parameters, const SceneBounds &sceneBounds, const std::optional< Mask > &mask=std::nullopt, const core::Pose2D &origin=core::Pose2D::Identity())
 
Costmap costmapForOrientation (RotationIndex rotationIndex, bool initializeMask=false) const
 
void cutToValidBoundingBox ()
 
const GridgetGrid () const
 
const SceneBoundsgetLocalSceneBounds () const noexcept
 
const std::optional< Mask > & getMask () const noexcept
 
GridgetMutableGrid ()
 
std::optional< Costmap3D::Mask > & getMutableMask () noexcept
 
Index getSize () const
 
std::pair< Index, IndexgetValidBoundingBox () const
 
core::Pose2D globalPose (const Index &index, const RotationDegrees &rotationDeg) const
 
bool isInCollision (const Position &p, std::optional< Rotation > rotation=std::nullopt) const
 
bool isMaskedOut (const Index &index) const noexcept
 
bool isValid (const Index &index) const noexcept
 checks whether the cell is masked out
 
bool isWithinRange (const Index &index) const noexcept
 
std::size_t numberOfValidElements () const
 
Optimum optimum (Rotation rotation=ALL_ORIENTATIONS) const
 
const core::Pose2Dorigin () const
 
const Parametersparams () const noexcept
 
RotationDegrees rotationDegrees (const core::Pose2D &pose) const
 
Rotation rotationFromIndex (RotationIndex index) const
 
Eigen::Rotation2Df rotationLocal (const RotationDegrees degrees) const
 
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 RotationIndex rot_index) const
 
std::optional< floatvalue (const Position &position, const RotationDegrees rotation_degrees) const
 
float value_ignore_mask (const Index &index, const RotationIndex rot_index) const
 

Static Public Member Functions

static Costmap3D WithSameDimsAs (const Costmap3D &other, const Grid &grid, const std::optional< Mask > &mask=std::nullopt)
 Create a Costmap3D with the same dimensions and parameters as the given one.
 

Static Public Attributes

static constexpr Rotation ALL_ORIENTATIONS = {.index = -1, .degrees = -1}
 

Friends

class Costmap3DBuilder
 
class smoothing::Costmap3DWrapper
 

Detailed Description

Definition at line 23 of file Costmap3D.h.

Member Typedef Documentation

◆ Grid

using Grid = std::vector<Eigen::MatrixXf>

Definition at line 55 of file Costmap3D.h.

◆ Index

using Index = Eigen::Array2i

Definition at line 50 of file Costmap3D.h.

◆ Mask

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

Definition at line 61 of file Costmap3D.h.

◆ Position

using Position = Eigen::Vector2f

Definition at line 51 of file Costmap3D.h.

◆ RotationDegrees

Definition at line 58 of file Costmap3D.h.

◆ RotationIndex

using RotationIndex = int

Definition at line 57 of file Costmap3D.h.

Constructor & Destructor Documentation

◆ Costmap3D()

Costmap3D ( 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 27 of file Costmap3D.cpp.

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

Member Function Documentation

◆ centerPose()

core::Pose2D centerPose ( std::optional< Rotation > rotation = std::nullopt) const
inline

Definition at line 139 of file Costmap3D.h.

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

◆ closestRotationFromDegrees()

Costmap3D::Rotation closestRotationFromDegrees ( RotationDegrees degrees) const

Definition at line 184 of file Costmap3D.cpp.

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

◆ convertToPseudoSDF()

void convertToPseudoSDF ( )

Definition at line 493 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ convertToPseudoSDFForRotation()

void convertToPseudoSDFForRotation ( RotationIndex rot_index)

Definition at line 506 of file Costmap3D.cpp.

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

◆ costmapForOrientation()

Costmap costmapForOrientation ( RotationIndex rotationIndex,
bool initializeMask = false ) const

Definition at line 466 of file Costmap3D.cpp.

◆ cutToValidBoundingBox()

void cutToValidBoundingBox ( )

Definition at line 342 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ getGrid()

const Costmap3D::Grid & getGrid ( ) const

Definition at line 271 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ getLocalSceneBounds()

const SceneBounds & getLocalSceneBounds ( ) const
noexcept

Definition at line 196 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ getMask()

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

Definition at line 294 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ getMutableGrid()

Grid & getMutableGrid ( )
inline

Definition at line 125 of file Costmap3D.h.

◆ getMutableMask()

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

Definition at line 300 of file Costmap3D.cpp.

◆ getSize()

Costmap3D::Index getSize ( ) const

Definition at line 460 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ getValidBoundingBox()

std::pair< Costmap3D::Index, Costmap3D::Index > getValidBoundingBox ( ) const

Definition at line 426 of file Costmap3D.cpp.

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

◆ globalPose()

core::Pose2D globalPose ( const Index & index,
const RotationDegrees & rotationDeg ) const
inline

Definition at line 108 of file Costmap3D.h.

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

◆ isInCollision()

bool isInCollision ( const Position & p,
std::optional< Rotation > rotation = std::nullopt ) const

Definition at line 277 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ isMaskedOut()

bool isMaskedOut ( const Index & index) const
noexcept

Definition at line 124 of file Costmap3D.cpp.

◆ isValid()

bool isValid ( const Index & index) const
noexcept

checks whether the cell is masked out

Definition at line 87 of file Costmap3D.cpp.

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

◆ isWithinRange()

bool isWithinRange ( const Index & index) const
noexcept

Definition at line 107 of file Costmap3D.cpp.

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

◆ numberOfValidElements()

std::size_t numberOfValidElements ( ) const

Definition at line 381 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ optimum()

Costmap3D::Optimum optimum ( Rotation rotation = ALL_ORIENTATIONS) const

Definition at line 202 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ origin()

const core::Pose2D & origin ( ) const
inline

Definition at line 188 of file Costmap3D.h.

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

◆ params()

const Costmap3D::Parameters & params ( ) const
noexcept

Definition at line 265 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ rotationDegrees()

RotationDegrees rotationDegrees ( const core::Pose2D & pose) const
inline

Definition at line 115 of file Costmap3D.h.

◆ rotationFromIndex()

Costmap3D::Rotation rotationFromIndex ( RotationIndex index) const

Definition at line 166 of file Costmap3D.cpp.

◆ rotationLocal()

Eigen::Rotation2Df rotationLocal ( const RotationDegrees degrees) const
inline

Definition at line 102 of file Costmap3D.h.

◆ setOrigin()

void setOrigin ( const core::Pose2D & globalPose)
inline

Definition at line 194 of file Costmap3D.h.

+ Here is the call graph for this function:

◆ toPositionGlobal()

Costmap3D::Position toPositionGlobal ( const Index & index) const

Definition at line 80 of file Costmap3D.cpp.

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

◆ toPositionLocal()

Costmap3D::Position toPositionLocal ( const Index & index) const

Definition at line 66 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ toVertex()

Costmap3D::Vertex toVertex ( const Position & globalPosition) const

Definition at line 138 of file Costmap3D.cpp.

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

◆ value() [1/2]

std::optional< float > value ( const Index & index,
const RotationIndex rot_index ) const

Definition at line 312 of file Costmap3D.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 RotationDegrees rotation_degrees ) const

Definition at line 331 of file Costmap3D.cpp.

+ Here is the call graph for this function:

◆ value_ignore_mask()

float value_ignore_mask ( const Index & index,
const RotationIndex rot_index ) const

Definition at line 306 of file Costmap3D.cpp.

+ Here is the caller graph for this function:

◆ WithSameDimsAs()

Costmap3D WithSameDimsAs ( const Costmap3D & other,
const Grid & grid,
const std::optional< Mask > & mask = std::nullopt )
static

Create a Costmap3D with the same dimensions and parameters as the given one.

Only the content (grid and mask) are altered.

Parameters
otherThe Costmap3D providing the dimensions and parameters
grid
mask
Returns
Costmap3D

Definition at line 485 of file Costmap3D.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Costmap3DBuilder

friend class Costmap3DBuilder
friend

Definition at line 26 of file Costmap3D.h.

◆ smoothing::Costmap3DWrapper

friend class smoothing::Costmap3DWrapper
friend

Definition at line 27 of file Costmap3D.h.

Member Data Documentation

◆ ALL_ORIENTATIONS

Rotation ALL_ORIENTATIONS = {.index = -1, .degrees = -1}
staticconstexpr

Definition at line 120 of file Costmap3D.h.


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