AStarWithOrientation.h
Go to the documentation of this file.
1/**
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Niklas Arlt ( niklas dot arlt at kit dot edu )
17 * @date 2025
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <optional>
25
27
33
35{
36
37 /**
38 * @brief Parameters for AStarWithOrientation
39 *
40 */
42 {
43 bool includeStartPose{true};
44
45 Algorithms algorithm() const override;
46 aron::data::DictPtr toAron() const override;
47
49 };
50
51 // Implementation class with only the necessary interface
53 {
54 public:
56
58 const Params& params,
59 const std::optional<navigation::algorithms::orientation_aware::Costmap3D>& costmap,
61
62 void updateCostmap(const std::optional<navigation::algorithms::orientation_aware::Costmap3D>& costmap);
63
64 std::optional<GlobalPlannerResult> plan(const core::Pose& start, const core::Pose& goal);
65
66 void visualizeDebugInfo(viz::Client& vizClient,
67 const std::string& vizLayerNamePrefix = "global_planner_debug");
68
69 protected:
71 std::optional<navigation::algorithms::orientation_aware::Costmap3D> costmap;
73
74 private:
75 // state from last execution
76 std::vector<core::GlobalTrajectoryPoint> lastPointsInCollision;
77 };
78
79 /**
80 * @class AStarWithOrientation
81 * @ingroup Library-GlobalPlanner
82 *
83 * Implements an A* planner but is compatible with non-circular robots.
84 * Compared to circular robots, the orientation of non-circular robots is important to not collide with obstacles.
85 *
86 * This class is the integration class for the GlobalPanner base class.
87 */
88 class AStarWithOrientation : virtual public GlobalPlanner
89 {
90 public:
92
93 AStarWithOrientation(const Params& params,
95 const core::Scene& ctx);
96
97 std::optional<GlobalPlannerResult> plan(const core::Pose& goal) override;
98 std::optional<GlobalPlannerResult> plan(const core::Pose& start,
99 const core::Pose& goal) override;
100
102 void
104 const std::string& vizLayerNamePrefix = "global_planner_debug") override;
105
106 protected:
108 };
109
110} // namespace armarx::navigation::global_planning
std::optional< GlobalPlannerResult > plan(const core::Pose &start, const core::Pose &goal)
void updateCostmap(const std::optional< navigation::algorithms::orientation_aware::Costmap3D > &costmap)
std::optional< navigation::algorithms::orientation_aware::Costmap3D > costmap
AStarWithOrientationImpl(const Params &params, const std::optional< navigation::algorithms::orientation_aware::Costmap3D > &costmap, VirtualRobot::RobotPtr robot)
void visualizeDebugInfo(viz::Client &vizClient, const std::string &vizLayerNamePrefix="global_planner_debug")
void visualizeDebugInfo(viz::Client &vizClient, const std::string &vizLayerNamePrefix="global_planner_debug") override
std::optional< GlobalPlannerResult > plan(const core::Pose &goal) override
AStarWithOrientation(const Params &params, const core::GeneralConfig &generalConfig, const core::Scene &ctx)
GlobalPlanner(const core::GeneralConfig &generalConfig, const core::Scene &scene)
virtual void visualizeDebugInfo(viz::Client &vizClient, const std::string &vizLayerNamePrefix="global_planner_debug")
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
Eigen::Isometry3f Pose
Definition basic_types.h:31
This file is part of ArmarX.
Definition fwd.h:30
static AStarWithOrientationParams FromAron(const aron::data::DictPtr &dict)