GlobalPlanner.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 Fabian Reister ( fabian dot reister at kit dot edu )
17 * @author Christian R. G. Dreher ( c dot dreher at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <memory>
26#include <optional>
27
30
36
38{
39
41 {
43
44 /**
45 * Optional helper trajectory that can be used for visualization or debugging purposes.
46 * It is not meant to be executed by the robot.
47 * This can be helpful when using some indermediate trajectory representations for the planning that should also be visualized.
48 */
49 std::optional<core::GlobalTrajectory> helperTrajectory;
50 };
51
52 /**
53 * @brief Parameters for GlobalPlanner
54 *
55 */
57 {
58 bool foo;
59
60 virtual ~GlobalPlannerParams() = default;
61
62 virtual Algorithms algorithm() const = 0;
63 virtual aron::data::DictPtr toAron() const = 0;
64 };
65
66 /**
67 * @class GlobalPlanner
68 * @ingroup Library-GlobalPlanner
69 *
70 * Base class of all global planners
71 */
73 {
74 public:
76 virtual ~GlobalPlanner() = default;
77
78 virtual std::optional<GlobalPlannerResult> plan(const core::Pose& goal) = 0;
79 virtual std::optional<GlobalPlannerResult> plan(const core::Pose& start,
80 const core::Pose& goal) = 0;
81
82 virtual void
84 const std::string& vizLayerNamePrefix = "global_planner_debug") {
85 // Default: Do nothing
86 };
87
88 protected:
91
92 private:
93 };
94
95 using GlobalPlannerPtr = std::shared_ptr<GlobalPlanner>;
96} // namespace armarx::navigation::global_planning
GlobalPlanner(const core::GeneralConfig &generalConfig, const core::Scene &scene)
virtual std::optional< GlobalPlannerResult > plan(const core::Pose &goal)=0
virtual void visualizeDebugInfo(viz::Client &vizClient, const std::string &vizLayerNamePrefix="global_planner_debug")
virtual std::optional< GlobalPlannerResult > plan(const core::Pose &start, const core::Pose &goal)=0
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
std::shared_ptr< GlobalPlanner > GlobalPlannerPtr
Definition fwd.h:32
virtual aron::data::DictPtr toAron() const =0
std::optional< core::GlobalTrajectory > helperTrajectory
Optional helper trajectory that can be used for visualization or debugging purposes.