18#include <armarx/navigation/algorithms/aron/Costmap.aron.generated.h>
19#include <armarx/navigation/algorithms/aron/Costmap3D.aron.generated.h>
20#include <armarx/navigation/algorithms/aron/Room.aron.generated.h>
21#include <armarx/navigation/algorithms/aron/ShortestPathFasterAlgorithmParams.aron.generated.h>
40 toAron(
const std::optional<Costmap::Mask>& mask)
42 if (not mask.has_value())
54 Costmap::Mask::value_type>(
nav);
61 for (
const auto& layer : bo)
63 list->addElement(
toAron(layer));
79 const Eigen::Isometry2f origin =
83 auto arn = dto.toAron();
93 const auto aronDto = algorithms::arondto::Costmap::FromAron(dto);
97 .cellSize = aronDto.cellSize,
98 .robotRadius = aronDto.robotRadius};
101 const auto gridNavigator =
111 std::optional<Costmap::Mask> mask;
113 if (
const auto maskNavigator =
117 Costmap::Mask::value_type>(*maskNavigator);
121 .min = Eigen::Vector2f::Zero(),
122 .max = Eigen::Vector2f{grid.rows() * aronDto.cellSize, grid.cols() * aronDto.cellSize}};
126 return {grid, parameters, sceneBounds, mask, origin};
134 const auto& dto = *aronDto;
139 .cellSize = dto.cellSize,
140 .robotRadius = dto.robotRadius};
143 const auto gridNavigator =
153 std::optional<Costmap::Mask> mask;
155 if (
const auto maskNavigator =
159 Costmap::Mask::value_type>(*maskNavigator);
163 .min = Eigen::Vector2f::Zero(),
164 .max = Eigen::Vector2f{grid.rows() * dto.cellSize, grid.cols() * dto.cellSize}};
168 return {grid, parameters, sceneBounds, mask, origin};
174 orientation_aware::arondto::Costmap3D dto;
185 const Eigen::Isometry2f origin =
189 auto arn = dto.toAron();
196 orientation_aware::Costmap3D
202 const auto& dto = *aronDto;
208 .cellSize = dto.cellSize,
209 .orientations = dto.orientations,
210 .robotModel = {.rootNode = dto.rootNode,
211 .packageName = dto.robotModelPackage,
212 .relativePath = dto.robotModelPath}};
216 const auto gridNavigator =
218 const auto layerNavigators = gridNavigator->getElements();
219 for (
const auto& layerNavigator : layerNavigators)
225 orientation_aware::Costmap3D::Grid::value_type::value_type>(*ndArrayNavigator));
229 std::optional<Costmap::Mask> mask;
231 if (
const auto maskNavigator =
235 Costmap::Mask::value_type>(*maskNavigator);
239 .min = Eigen::Vector2f::Zero(),
240 .max = Eigen::Vector2f{grid[0].rows() * dto.cellSize, grid[0].cols() * dto.cellSize}};
244 return {grid, parameters, sceneBounds, mask, origin};
248 toAron(arondto::ShortestPathFasterAlgorithmParams& dto,
258 fromAron(
const arondto::ShortestPathFasterAlgorithmParams& dto,
const DataT & data() const
Client-side working entity instance.
static Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > ConvertToDynamicMatrix(const data::NDArray &nav)
static data::NDArrayPtr ConvertFromMatrix(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &mat)
static PointerType DynamicCast(const VariantPtr &n)
const Grid & getGrid() const
const core::Pose2D & origin() const
const SceneBounds & getLocalSceneBounds() const noexcept
const Parameters & params() const noexcept
Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic > Mask
const std::optional< Mask > & getMask() const noexcept
const core::Pose2D & origin() const
const SceneBounds & getLocalSceneBounds() const noexcept
const Grid & getGrid() const
const std::optional< Mask > & getMask() const noexcept
std::vector< Eigen::MatrixXf > Grid
const Parameters & params() const noexcept
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
std::string const GlobalFrame
Variable of the global coordinate system.
std::optional< AronClass > tryCast(const wm::EntityInstance &item)
Tries to cast a armem::EntityInstance to AronClass.
std::shared_ptr< Dict > DictPtr
std::shared_ptr< List > ListPtr
std::shared_ptr< NDArray > NDArrayPtr
This file is part of ArmarX.
armarx::aron::data::DictPtr toAron(const Costmap &bo)
Costmap costmapFromAron(const aron::data::DictPtr &dto)
Costmap fromAron(const armem::wm::EntityInstance &entityInstance)
orientation_aware::Costmap3D costmap3dFromAron(const armem::wm::EntityInstance &entityInstance)
std::vector< Eigen::Vector2f > to2D(const std::vector< Eigen::Vector3f > &v)
std::vector< Eigen::Vector3f > to3D(const std::vector< Eigen::Vector2f > &v)
float cellSize
How big each cell is in the uniform grid.
std::vector< Eigen::Vector2f > polygon
int orientations
How many orientations of the robot each cell contains.
float cellSize
How big each cell is in the uniform grid.
struct armarx::navigation::algorithms::orientation_aware::Costmap3D::Parameters::RobotModel robotModel
bool obstacleDistanceCosts
float obstacleMaxDistance
For ARMAR-7 the following was tested:
float obstacleCostExponent
float obstacleDistanceWeight