|
|
#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 |
| 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 |
| Costmap3D | ( | const Grid & | grid, |
| const Parameters & | parameters, | ||
| const SceneBounds & | sceneBounds, | ||
| const std::optional< Mask > & | mask = std::nullopt, | ||
| const core::Pose2D & | origin = core::Pose2D::Identity() ) |
| 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.
|
inline |
| Costmap3D::Rotation closestRotationFromDegrees | ( | RotationDegrees | degrees | ) | const |
| void convertToPseudoSDF | ( | ) |
| void convertToPseudoSDFForRotation | ( | RotationIndex | rot_index | ) |
| Costmap costmapForOrientation | ( | RotationIndex | rotationIndex, |
| bool | initializeMask = false ) const |
| 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] |
| Costmap3D::Index findClosestValidIndex | ( | const Index & | index | ) |
| const Costmap3D::Grid & getGrid | ( | ) | const |
|
noexcept |
|
noexcept |
|
inline |
|
noexcept |
| Costmap3D::Index getSize | ( | ) | const |
| std::pair< Costmap3D::Index, Costmap3D::Index > getValidBoundingBox | ( | ) | const |
|
inline |
| 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.
|
noexcept |
|
noexcept |
checks whether the cell is masked out
|
noexcept |
| std::size_t numberOfValidElements | ( | ) | const |
| Costmap3D::Optimum optimum | ( | Rotation | rotation = ALL_ORIENTATIONS | ) | const |
|
inline |
|
noexcept |
|
inline |
| Costmap3D::Rotation rotationFromIndex | ( | RotationIndex | index | ) | const |
|
inline |
|
inline |
| Costmap3D::Position toPositionGlobal | ( | const Index & | index | ) | const |
| Costmap3D::Position toPositionLocal | ( | const Index & | index | ) | const |
| Costmap3D::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 |
|
friend |
|
friend |