armarx::navigation::algorithms Namespace Reference

This file is part of ArmarX. More...

Namespaces

namespace  arondto
 
namespace  costmap
 This file is part of ArmarX.
 
namespace  orientation_aware
 This file is part of ArmarX.
 
namespace  spfa
 This file is part of ArmarX.
 
namespace  tsp
 This file is part of ArmarX.
 

Classes

class  Costmap
 
class  CostmapBuilder
 
struct  overloaded
 
struct  Room
 
struct  SceneBounds
 

Enumerations

enum class  CostmapMergeMode { MAX , MIN , AVERAGE }
 Defines how the. More...
 

Functions

void checkSameSize (const std::vector< Costmap > &costmaps)
 
SceneBounds computeSceneBounds (const std::vector< Eigen::Vector2f > &points, const SceneBounds &init, const float margin)
 
SceneBounds computeSceneBounds (const VirtualRobot::SceneObjectSetPtr &obstacles, const std::vector< VirtualRobot::RobotPtr > &articulatedObjects, const SceneBounds &init, const std::vector< Room > &rooms, const float margin, const bool restrictToRooms)
 
orientation_aware::Costmap3D costmap3dFromAron (const armem::wm::EntityInstance &entityInstance)
 
Costmap costmapFromAron (const aron::data::DictPtr &dto)
 
Costmap::Mask dilateMask (const Costmap::Mask &mask, int numIterations)
 
template<typename T, typename Proj>
std::vector< TfilterByRoom (const armarx::navigation::algorithms::Room &room, const std::vector< T > &objects, Proj proj)
 Filter a collection of objects by whether their projected position lies inside a room.
 
Costmap fromAron (const armem::wm::EntityInstance &entityInstance)
 
void fromAron (const arondto::Room &dto, Room &bo)
 
void fromAron (const arondto::ShortestPathFasterAlgorithmParams &dto, spfa::ShortestPathFasterAlgorithm::Parameters &bo)
 
void invalidateOutsideRooms (const std::vector< Room > &rooms, Costmap &costmap)
 
void invalidateOutsideRooms (const std::vector< Room > &rooms, orientation_aware::Costmap3D &costmap)
 
Costmap load (const std::filesystem::path &directory)
 
SceneBounds merge (const std::vector< SceneBounds > &sceneBounds)
 
Costmap mergeAligned (const std::vector< Costmap > &costmaps, const std::vector< float > &weights)
 
Costmap mergeAligned (const std::vector< Costmap > &costmaps, CostmapMergeMode mode)
 
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
 
std::optional< core::Pose2DsampleValidPositionInMap (const algorithms::Costmap &costmap)
 
bool save (const Costmap &costmap, const std::filesystem::path &directory)
 
Costmap scaleCostmap (const Costmap &costmap, float cellSize)
 
void toAron (arondto::Room &dto, const Room &bo)
 
void toAron (arondto::ShortestPathFasterAlgorithmParams &dto, const spfa::ShortestPathFasterAlgorithm::Parameters &bo)
 
template<class DtoT, class BoT>
DtoT toAron (const BoT &bo)
 
armarx::aron::data::DictPtr toAron (const Costmap &bo)
 
armarx::aron::data::DictPtr toAron (const orientation_aware::Costmap3D &bo)
 
Costmap toCostmap (const VirtualRobot::WorkspaceGrid &workspaceGrid)
 
SceneBounds toSceneBounds (const VirtualRobot::WorkspaceGrid::Extends &extends)
 
void visualize (const algorithms::Costmap &costmap, viz::Layer &layer, const std::string &name, const float zOffset)
 
void visualize (const algorithms::orientation_aware::Costmap3D &costmap, std::vector< viz::Layer > &layers, const std::string &name, const float zOffset, bool initializeMask)
 

Detailed Description

This file is part of ArmarX.

ArmarX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

ArmarX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Fabian Reister ( fabian dot reister at kit dot edu )
Date
2021

ArmarX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

ArmarX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Fabian Reister ( fabian dot reister at kit dot edu )
Date
2022

ArmarX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

ArmarX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Fabian Reister ( fabian dot reister at kit dot edu )
Date
2023

ArmarX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

ArmarX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Fabian Reister ( fabian dot reister at kit dot edu )
Date
2025

Enumeration Type Documentation

◆ CostmapMergeMode

enum class CostmapMergeMode
strong

Defines how the.

Enumerator
MAX 
MIN 
AVERAGE 

Definition at line 71 of file util.h.

Function Documentation

◆ checkSameSize()

void checkSameSize ( const std::vector< Costmap > & costmaps)

Definition at line 289 of file util.cpp.

+ Here is the caller graph for this function:

◆ computeSceneBounds() [1/2]

SceneBounds computeSceneBounds ( const std::vector< Eigen::Vector2f > & points,
const SceneBounds & init,
const float margin )

Definition at line 152 of file util.cpp.

◆ computeSceneBounds() [2/2]

SceneBounds computeSceneBounds ( const VirtualRobot::SceneObjectSetPtr & obstacles,
const std::vector< VirtualRobot::RobotPtr > & articulatedObjects,
const SceneBounds & init,
const std::vector< Room > & rooms,
const float margin,
const bool restrictToRooms )

Definition at line 62 of file util.cpp.

+ Here is the caller graph for this function:

◆ costmap3dFromAron()

orientation_aware::Costmap3D costmap3dFromAron ( const armem::wm::EntityInstance & entityInstance)

Definition at line 197 of file aron_conversions.cpp.

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

◆ costmapFromAron()

Costmap costmapFromAron ( const aron::data::DictPtr & dto)

Definition at line 91 of file aron_conversions.cpp.

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

◆ dilateMask()

Costmap::Mask dilateMask ( const Costmap::Mask & mask,
int numIterations )

Dilate the costmap mask to bridge over small gaps in the mask

Definition at line 519 of file util.cpp.

+ Here is the caller graph for this function:

◆ filterByRoom()

template<typename T, typename Proj>
std::vector< T > filterByRoom ( const armarx::navigation::algorithms::Room & room,
const std::vector< T > & objects,
Proj proj )

Filter a collection of objects by whether their projected position lies inside a room.

This function applies a projection callable to each object in objects and retains those objects for which the room reports the projected value as inside (via Room::isInside). The relative order of the returned elements matches the order in objects.

Template Parameters
TType of elements stored in objects. Must be CopyConstructible or MoveConstructible since selected elements are returned by value in a new std::vector<T>.
ProjCallable type for the projection. Must be Invocable with an argument of type const T& (or T) and return a value accepted by armarx::navigation::algorithms::Room::isInside.
Parameters
roomReference to an armarx::navigation::algorithms::Room used for the inside-test.
objectsConstant reference to the input vector of objects to be filtered.
projProjection callable applied to each object to obtain the value checked by room.isInside.
Returns
A std::vector<T> containing copies of the objects for which room.isInside(proj(obj)) returns true. If no objects satisfy the predicate, an empty vector is returned.

@complexity Linear in objects.size(): each element is projected and tested once.

@exceptionsafety Any exceptions thrown by proj or Room::isInside propagate to the caller.

Note
This implementation relies on C++ ranges utilities (ranges::views::filter and ranges::to_vector).

Definition at line 63 of file room_util.h.

+ Here is the call graph for this function:

◆ fromAron() [1/3]

Costmap fromAron ( const armem::wm::EntityInstance & entityInstance)

Definition at line 130 of file aron_conversions.cpp.

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

◆ fromAron() [2/3]

void fromAron ( const arondto::Room & dto,
Room & bo )

Definition at line 277 of file aron_conversions.cpp.

+ Here is the call graph for this function:

◆ fromAron() [3/3]

void fromAron ( const arondto::ShortestPathFasterAlgorithmParams & dto,
spfa::ShortestPathFasterAlgorithm::Parameters & bo )

Definition at line 258 of file aron_conversions.cpp.

◆ invalidateOutsideRooms() [1/2]

void invalidateOutsideRooms ( const std::vector< Room > & rooms,
Costmap & costmap )

Definition at line 493 of file util.cpp.

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

◆ invalidateOutsideRooms() [2/2]

void invalidateOutsideRooms ( const std::vector< Room > & rooms,
orientation_aware::Costmap3D & costmap )

Definition at line 509 of file util.cpp.

◆ load()

Costmap load ( const std::filesystem::path & directory)

Definition at line 54 of file persistence.cpp.

◆ merge()

SceneBounds merge ( const std::vector< SceneBounds > & sceneBounds)

Definition at line 183 of file util.cpp.

◆ mergeAligned() [1/2]

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

Definition at line 349 of file util.cpp.

+ Here is the call graph for this function:

◆ mergeAligned() [2/2]

Costmap mergeAligned ( const std::vector< Costmap > & costmaps,
CostmapMergeMode mode )

Definition at line 303 of file util.cpp.

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

◆ overloaded()

template<class... Ts>
overloaded ( Ts... ) -> overloaded< Ts... >

◆ sampleValidPositionInMap()

std::optional< core::Pose2D > sampleValidPositionInMap ( const algorithms::Costmap & costmap)

Definition at line 431 of file util.cpp.

+ Here is the caller graph for this function:

◆ save()

bool save ( const Costmap & costmap,
const std::filesystem::path & directory )

Definition at line 114 of file persistence.cpp.

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

◆ scaleCostmap()

Costmap scaleCostmap ( const Costmap & costmap,
float cellSize )

Definition at line 373 of file util.cpp.

◆ toAron() [1/5]

void toAron ( arondto::Room & dto,
const Room & bo )

Definition at line 268 of file aron_conversions.cpp.

+ Here is the call graph for this function:

◆ toAron() [2/5]

void toAron ( arondto::ShortestPathFasterAlgorithmParams & dto,
const spfa::ShortestPathFasterAlgorithm::Parameters & bo )

Definition at line 248 of file aron_conversions.cpp.

◆ toAron() [3/5]

template<class DtoT, class BoT>
DtoT toAron ( const BoT & bo)

Definition at line 39 of file aron_conversions.h.

+ Here is the call graph for this function:

◆ toAron() [4/5]

armarx::aron::data::DictPtr toAron ( const Costmap & bo)

Definition at line 70 of file aron_conversions.cpp.

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

◆ toAron() [5/5]

Definition at line 172 of file aron_conversions.cpp.

+ Here is the call graph for this function:

◆ toCostmap()

Costmap toCostmap ( const VirtualRobot::WorkspaceGrid & workspaceGrid)

Definition at line 204 of file util.cpp.

+ Here is the call graph for this function:

◆ toSceneBounds()

SceneBounds toSceneBounds ( const VirtualRobot::WorkspaceGrid::Extends & extends)

Definition at line 176 of file util.cpp.

+ Here is the caller graph for this function:

◆ visualize() [1/2]

void visualize ( const algorithms::Costmap & costmap,
viz::Layer & layer,
const std::string & name,
const float zOffset )

Definition at line 82 of file visualization.cpp.

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

◆ visualize() [2/2]

void visualize ( const algorithms::orientation_aware::Costmap3D & costmap,
std::vector< viz::Layer > & layers,
const std::string & name,
const float zOffset,
bool initializeMask )

Definition at line 118 of file visualization.cpp.

+ Here is the call graph for this function: