SimulatedHuman.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 * @date 2022
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
28
30{
31
33 {
34 float goalDistanceThreshold = 100; // [mm]
35
36 float minLinearVelocity = 100; // [mm/s]
37 float maxLinearVelocity = 200; // [mm/s]
38 };
39
41 {
42 public:
44
45 SimulatedHuman(const algorithms::Costmap& distanceField, const Params& params = Params());
46
47 Human update();
48
51 {
52 return human_;
53 }
54
57 {
58 return globalTrajectory_;
59 }
60
62 trajectory() const
63 {
64 return globalTrajectory_;
65 }
66
67 bool goalReached() const;
68
69 /**
70 * @brief resets the human to the given pose and replans the global optimal trajectory
71 *
72 * @param pose
73 */
74 void reinitialize(const core::Pose2D& pose);
75
76 protected:
77 void initialize();
78
79 void step();
80
81 enum class State
82 {
86 };
87
88
89 private:
90 const algorithms::Costmap distanceField_;
91
92 State state_ = State::Idle;
93
94 human::Human human_;
95
96 core::GlobalTrajectory globalTrajectory_;
97
98 const Params params_;
99 };
100
101} // namespace armarx::navigation::human::simulation
Class that offers the main functionality needed to create a statechart.
Definition State.h:54
const core::GlobalTrajectory & trajectory() const
void reinitialize(const core::Pose2D &pose)
resets the human to the given pose and replans the global optimal trajectory
SimulatedHuman(const algorithms::Costmap &distanceField, const Params &params=Params())
Eigen::Isometry2f Pose2D
Definition basic_types.h:34
This file is part of ArmarX.