CostmapBuilder.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 
24 #include <VirtualRobot/VirtualRobot.h>
25 
27 
29 {
30 
32  {
33  public:
35  const VirtualRobot::SceneObjectSetPtr& obstacles,
36  const std::vector<VirtualRobot::RobotPtr>& articulatedObjects,
37  const Costmap::Parameters& parameters,
38  const std::string& robotCollisonModelName);
39 
40  Costmap create(const SceneBounds& init = SceneBounds());
41 
42  static Eigen::MatrixXf createUniformGrid(const SceneBounds& sceneBounds,
43  const Costmap::Parameters& parameters);
44 
45  private:
46  float computeCost(const Costmap::Position& position,
47  VirtualRobot::RobotPtr& collisionRobot,
48  const VirtualRobot::CollisionModelPtr& robotCollisionModel);
49 
50  void fillGridCosts(Costmap& costmap);
51 
52  void initializeMask(Costmap& costmap);
53 
54  const VirtualRobot::RobotPtr robot;
55  const VirtualRobot::SceneObjectSetPtr obstacles;
56  const std::vector<VirtualRobot::RobotPtr> articulatedObjects;
57  const Costmap::Parameters parameters;
58  const std::string robotCollisionModelName;
59  };
60 
61 } // namespace armarx::navigation::algorithms
armarx::navigation::algorithms
This file is part of ArmarX.
Definition: aron_conversions.cpp:13
armarx::navigation::algorithms::CostmapBuilder::createUniformGrid
static Eigen::MatrixXf createUniformGrid(const SceneBounds &sceneBounds, const Costmap::Parameters &parameters)
Definition: CostmapBuilder.cpp:91
Costmap.h
armarx::navigation::algorithms::Costmap::Position
Eigen::Vector2f Position
Definition: Costmap.h:47
armarx::navigation::algorithms::SceneBounds
Definition: types.h:29
armarx::navigation::algorithms::CostmapBuilder
Definition: CostmapBuilder.h:31
armarx::navigation::algorithms::CostmapBuilder::create
Costmap create(const SceneBounds &init=SceneBounds())
Definition: CostmapBuilder.cpp:61
armarx::navigation::algorithms::CostmapBuilder::CostmapBuilder
CostmapBuilder(const VirtualRobot::RobotPtr &robot, const VirtualRobot::SceneObjectSetPtr &obstacles, const std::vector< VirtualRobot::RobotPtr > &articulatedObjects, const Costmap::Parameters &parameters, const std::string &robotCollisonModelName)
Definition: CostmapBuilder.cpp:44
armarx::navigation::algorithms::Costmap::Parameters
Definition: Costmap.h:21
armarx::navigation::algorithms::Costmap
Definition: Costmap.h:13
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18