|
|
#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 | |
| std::pair< Rotation, Rotation > | bracketingRotationsFromDegrees (RotationDegrees degrees) const |
| The two orientation slices bracketing the given continuous rotation. | |
| 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 ¶meters, 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 () |
| std::optional< Vertex > | findClosestCollisionFreeVertex (const Position &position, RotationDegrees orientationDeg, float maxDistance, float minClearance=0.F) const |
| Find the closest position where the robot fits at the given continuous orientation with more than minClearance distance to obstacles. | |
| Index | findClosestValidIndex (const Index &index) |
| const Grid & | getGrid () const |
| const SceneBounds & | getLocalSceneBounds () const noexcept |
| const std::optional< Mask > & | getMask () const noexcept |
| Grid & | getMutableGrid () |
| std::optional< Costmap3D::Mask > & | getMutableMask () noexcept |
| Index | getSize () const |
| std::pair< Index, Index > | getValidBoundingBox () const |
| core::Pose2D | globalPose (const Index &index, const RotationDegrees &rotationDeg) const |
| bool | isFreeWithClearance (const Position &p, RotationDegrees orientationDeg, float clearance=0.F) const |
| Whether the robot fits at the given position and continuous orientation with more than the given obstacle clearance. | |
| 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::Pose2D & | origin () const |
| const Parameters & | params () 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< float > | value (const Index &index, const RotationIndex rot_index) const |
| std::optional< float > | value (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 |
Definition at line 23 of file Costmap3D.h.
| using Grid = std::vector<Eigen::MatrixXf> |
Definition at line 55 of file Costmap3D.h.
| using Index = Eigen::Array2i |
Definition at line 50 of file Costmap3D.h.
| using Mask = Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> |
Definition at line 61 of file Costmap3D.h.
| using Position = Eigen::Vector2f |
Definition at line 51 of file Costmap3D.h.
| using RotationDegrees = float |
Definition at line 58 of file Costmap3D.h.
| using RotationIndex = int |
Definition at line 57 of file Costmap3D.h.
| 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 29 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::pair< Costmap3D::Rotation, Costmap3D::Rotation > bracketingRotationsFromDegrees | ( | RotationDegrees | degrees | ) | const |
The two orientation slices bracketing the given continuous rotation.
If the rotation lies exactly on a slice, that slice and its successor are returned. The second slice wraps around to index 0 for rotations in the last segment.
Definition at line 198 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 177 of file Costmap3D.h.
Here is the call graph for this function:
Here is the caller graph for this function:| Costmap3D::Rotation closestRotationFromDegrees | ( | RotationDegrees | degrees | ) | const |
Definition at line 186 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void convertToPseudoSDF | ( | ) |
| void convertToPseudoSDFForRotation | ( | RotationIndex | rot_index | ) |
Definition at line 577 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Costmap costmapForOrientation | ( | RotationIndex | rotationIndex, |
| bool | initializeMask = false ) const |
Definition at line 537 of file Costmap3D.cpp.
| void cutToValidBoundingBox | ( | ) |
| std::optional< Costmap3D::Vertex > findClosestCollisionFreeVertex | ( | const Position & | position, |
| RotationDegrees | orientationDeg, | ||
| float | maxDistance, | ||
| float | minClearance = 0.F ) const |
Find the closest position where the robot fits at the given continuous orientation with more than minClearance distance to obstacles.
The two orientation slices bracketing the orientation are overlapped (element-wise minimum) and the resulting 2D costmap is searched in expanding circles up to maxDistance. Intended for recovery planning when the robot is standing in collision.
| position | The starting position to search from |
| orientationDeg | The robot's continuous orientation [deg] |
| maxDistance | Maximum search radius [mm] |
| minClearance | Required distance to obstacles [mm] |
Definition at line 325 of file Costmap3D.cpp.
Here is the call graph for this function:| Costmap3D::Index findClosestValidIndex | ( | const Index & | index | ) |
| const Costmap3D::Grid & getGrid | ( | ) | const |
|
noexcept |
|
noexcept |
|
inline |
Definition at line 133 of file Costmap3D.h.
|
noexcept |
Definition at line 371 of file Costmap3D.cpp.
| Costmap3D::Index getSize | ( | ) | const |
| std::pair< Costmap3D::Index, Costmap3D::Index > getValidBoundingBox | ( | ) | const |
Definition at line 497 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 116 of file Costmap3D.h.
Here is the call graph for this function:
Here is the caller graph for this function:| bool isFreeWithClearance | ( | const Position & | p, |
| RotationDegrees | orientationDeg, | ||
| float | clearance = 0.F ) const |
Whether the robot fits at the given position and continuous orientation with more than the given obstacle clearance.
Checks the two orientation slices bracketing the continuous orientation, so the result is conservative with respect to the orientation discretization.
Definition at line 309 of file Costmap3D.cpp.
Here is the call graph for this function:
|
noexcept |
Definition at line 126 of file Costmap3D.cpp.
|
noexcept |
checks whether the cell is masked out
Definition at line 89 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Definition at line 109 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::size_t numberOfValidElements | ( | ) | const |
| Costmap3D::Optimum optimum | ( | Rotation | rotation = ALL_ORIENTATIONS | ) | const |
|
inline |
Definition at line 226 of file Costmap3D.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
|
inline |
Definition at line 123 of file Costmap3D.h.
| Costmap3D::Rotation rotationFromIndex | ( | RotationIndex | index | ) | const |
|
inline |
Definition at line 110 of file Costmap3D.h.
|
inline |
| Costmap3D::Position toPositionGlobal | ( | const Index & | index | ) | const |
Definition at line 82 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Costmap3D::Position toPositionLocal | ( | const Index & | index | ) | const |
| Costmap3D::Vertex toVertex | ( | const Position & | globalPosition | ) | const |
Definition at line 140 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< float > value | ( | const Index & | index, |
| const RotationIndex | rot_index ) const |
Definition at line 383 of file Costmap3D.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< float > value | ( | const Position & | position, |
| const RotationDegrees | rotation_degrees ) const |
| float value_ignore_mask | ( | const Index & | index, |
| const RotationIndex | rot_index ) const |
Definition at line 377 of file Costmap3D.cpp.
|
static |
Create a Costmap3D with the same dimensions and parameters as the given one.
Only the content (grid and mask) are altered.
| other | The Costmap3D providing the dimensions and parameters |
| grid | |
| mask |
Definition at line 556 of file Costmap3D.cpp.
Here is the call graph for this function:
|
friend |
Definition at line 26 of file Costmap3D.h.
|
friend |
Definition at line 27 of file Costmap3D.h.
Definition at line 128 of file Costmap3D.h.