MapModel.h
Go to the documentation of this file.
1 // SVN $HeadURL$
2 // SVN $Id$
3 
4 /*
5  * 6D localization for humanoid robots
6  *
7  * Copyright 2009-2012 Armin Hornung, University of Freiburg
8  * http://www.ros.org/wiki/humanoid_localization
9  *
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, version 3.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef HUMANOID_LOCALIZATION_MAPMODEL_H_
25 #define HUMANOID_LOCALIZATION_MAPMODEL_H_
26 
27 #include <omp.h>
28 #include <ros/ros.h>
30 #include <octomap_msgs/GetOctomap.h>
32 
34 
35 namespace humanoid_localization{
36 
37 class MapModel{
38 public:
40  virtual ~MapModel();
41 
42  //void setMap(boost::shared_ptr<octomap::OcTree> map);
44 
50  virtual void verifyPoses(Particles& particles);
51 
52  virtual void initGlobal(Particles& particles,
53  double z, double roll, double pitch,
54  const Vector6d& initNoise,
55  UniformGeneratorT& rngUniform, NormalGeneratorT& rngNormal);
56 
59  virtual bool isOccupied(const octomap::point3d& position) const;
60  virtual bool isOccupied(octomap::OcTreeNode* node) const = 0;
61  virtual double getFloorHeight(const tf::Transform& pose) const = 0;
62 
71  void getHeightlist(double x, double y, double totalHeight, std::vector<double>& heights);
72 
73 
74 protected:
76 
77  double m_motionMeanZ;
82 
83 };
84 
85 
86 class DistanceMap : public MapModel{
87 public:
89  virtual ~DistanceMap();
90 
91  virtual bool isOccupied(octomap::OcTreeNode* node) const;
92  virtual double getFloorHeight(const tf::Transform& pose) const;
93 
94 };
95 
96 
97 class OccupancyMap : public MapModel{
98 public:
100  virtual ~OccupancyMap();
101 
102  virtual bool isOccupied(octomap::OcTreeNode* node) const;
103  virtual double getFloorHeight(const tf::Transform& pose) const;
104 };
105 
106 }
107 #endif
virtual void verifyPoses(Particles &particles)
Definition: MapModel.cpp:52
MapModel(ros::NodeHandle *nh)
Definition: MapModel.cpp:27
boost::shared_ptr< octomap::OcTree > getMap() const
Definition: MapModel.cpp:48
boost::variate_generator< EngineT &, NormalDistributionT > NormalGeneratorT
standard normal-distributed noise
TFSIMD_FORCE_INLINE const tfScalar & y() const
boost::shared_ptr< octomap::OcTree > m_map
Definition: MapModel.h:75
boost::variate_generator< EngineT &, UniformDistributionT > UniformGeneratorT
uniform noise in range [0,1)
Eigen::Matrix< double, 6, 1 > Vector6d
TFSIMD_FORCE_INLINE const tfScalar & x() const
virtual bool isOccupied(const octomap::point3d &position) const
Definition: MapModel.cpp:195
virtual void initGlobal(Particles &particles, double z, double roll, double pitch, const Vector6d &initNoise, UniformGeneratorT &rngUniform, NormalGeneratorT &rngNormal)
Definition: MapModel.cpp:133
TFSIMD_FORCE_INLINE const tfScalar & z() const
void getHeightlist(double x, double y, double totalHeight, std::vector< double > &heights)
Definition: MapModel.cpp:173
virtual double getFloorHeight(const tf::Transform &pose) const =0
std::vector< Particle > Particles


humanoid_localization
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Mon Jun 10 2019 13:38:31