TebObstacleManager.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 Tobias Gröger ( tobias dot groeger at student dot kit dot edu )
17  * @date 2022
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 #pragma once
22 
23 #include <VirtualRobot/CollisionDetection/CollisionModel.h>
24 
26 
30 #include <teb_local_planner/obstacles.h>
31 
33 {
34 
35 
37  {
38  public:
39  using Polygon = std::vector<Eigen::Vector2f>;
40 
41  TebObstacleManager(teb_local_planner::ObstContainer& container) : container(container)
42  {
43  }
44 
45  void clear();
46 
47  size_t size();
48 
50  viz::Layer* visLayer = nullptr);
51  void addPolygonObstacle(const Polygon& polygon, viz::Layer* visLayer = nullptr);
52  void addBoxObstacle(const VirtualRobot::BoundingBox& bbox, viz::Layer* visLayer = nullptr);
53  void addHumanObstacle(const human::Human& human, viz::Layer* visLayer = nullptr);
54 
55  private:
56  teb_local_planner::ObstContainer& container;
58  int visualizationIndex;
59 
60  const std::array<simox::Color, 2> PROXEMIC_ZONE_COLOR = {simox::Color::red(),
61  simox::Color::blue()};
62  };
63 
64 
65 } // namespace armarx::navigation::local_planning
armarx::navigation::memory::LaserScannerFeatures
Definition: types.h:62
armarx::navigation::local_planning::TebObstacleManager::addBoxObstacle
void addBoxObstacle(const VirtualRobot::BoundingBox &bbox, viz::Layer *visLayer=nullptr)
Definition: TebObstacleManager.cpp:68
armarx::navigation::human::Human
Definition: types.h:33
armarx::navigation::human::ProxemicZoneCreator
Definition: ProxemicZoneCreator.h:28
Layer.h
types.h
armarx::navigation::local_planning
This file is part of ArmarX.
Definition: fwd.h:35
armarx::navigation::local_planning::TebObstacleManager::TebObstacleManager
TebObstacleManager(teb_local_planner::ObstContainer &container)
Definition: TebObstacleManager.h:41
ProxemicZoneCreator.h
armarx::navigation::local_planning::TebObstacleManager::Polygon
std::vector< Eigen::Vector2f > Polygon
Definition: TebObstacleManager.h:39
armarx::navigation::local_planning::TebObstacleManager
Definition: TebObstacleManager.h:36
armarx::red
QColor red()
Definition: StyleSheets.h:76
types.h
armarx::navigation::local_planning::TebObstacleManager::clear
void clear()
Definition: TebObstacleManager.cpp:14
armarx::navigation::local_planning::TebObstacleManager::size
size_t size()
Definition: TebObstacleManager.cpp:21
armarx::navigation::local_planning::TebObstacleManager::addLaserScannerFeaturesObstacle
void addLaserScannerFeaturesObstacle(const memory::LaserScannerFeatures &features, viz::Layer *visLayer=nullptr)
Definition: TebObstacleManager.cpp:26
armarx::navigation::local_planning::TebObstacleManager::addHumanObstacle
void addHumanObstacle(const human::Human &human, viz::Layer *visLayer=nullptr)
Definition: TebObstacleManager.cpp:83
armarx::navigation::local_planning::TebObstacleManager::addPolygonObstacle
void addPolygonObstacle(const Polygon &polygon, viz::Layer *visLayer=nullptr)
Definition: TebObstacleManager.cpp:47
armarx::viz::Layer
Definition: Layer.h:12