9 #include <armarx/navigation/algorithms/aron/ShortestPathFasterAlgorithmParams.aron.generated.h>
24 toAron(
const std::optional<Costmap::Mask>& mask)
26 if (not mask.has_value())
39 Costmap::Mask::value_type>(nav);
47 dto.cellSize =
bo.params().cellSize;
53 auto arn = dto.toAron();
54 arn->setElementCopy(
"mask",
toAron(
bo.getMask()));
55 arn->setElementCopy(
"grid",
toAron(
bo.getGrid()));
63 const auto aronDto = armem::tryCast<algorithms::arondto::Costmap>(entityInstance);
65 const auto& dto = *aronDto;
72 const auto gridNavigator =
78 aron::converter::AronEigenConverter::ConvertToDynamicMatrix<Costmap::Grid::value_type>(
82 std::optional<Costmap::Mask> mask;
84 if (
const auto maskNavigator =
88 Costmap::Mask::value_type>(*maskNavigator);
92 .
min = dto.origin.head<2>(),
93 .
max = dto.origin.head<2>() +
94 Eigen::Vector2f{grid.rows() * dto.cellSize, grid.cols() * dto.cellSize}};
96 return {grid, parameters, sceneBounds, mask};
100 toAron(arondto::ShortestPathFasterAlgorithmParams& dto,
103 dto.obstacleDistanceCosts =
bo.obstacleDistanceCosts;
104 dto.obstacleMaxDistance =
bo.obstacleMaxDistance;
105 dto.obstacleDistanceWeight =
bo.obstacleDistanceWeight;
106 dto.obstacleCostExponent =
bo.obstacleCostExponent;
111 fromAron(
const arondto::ShortestPathFasterAlgorithmParams& dto,
114 bo.obstacleDistanceCosts = dto.obstacleDistanceCosts;
115 bo.obstacleMaxDistance = dto.obstacleMaxDistance;
116 bo.obstacleDistanceWeight = dto.obstacleDistanceWeight;
117 bo.obstacleCostExponent = dto.obstacleCostExponent;