libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
SpaceIndex.h
1 #ifndef SPACEINDEX_H
2 #define SPACEINDEX_H
3 
4 #include <vector>
5 #include <Eigen/Eigen>
6 
7 #include "Logging/Logger.h"
8 #include "API/project.hpp"
9 #include "utils/Geometry.h"
10 
11 
13 {
14  MOVE3D_STATIC_LOGGER;
15 public:
16  SpaceIndex();
17  ~SpaceIndex();
18 
19  bool compute();
20 
21  double freeVolume() const;
22  double occupiedVolume() const;
23 
24  double distance(SpaceIndex const &other);
25 
26  double checkCell(p3d_vector3 p);
27 
28  bool isCellFree(Eigen::Vector3d p);
29  void setCellFree(Eigen::Vector3d p,bool free);
30 private:
31  double _cellRadius;
32  double _distance;
33  Eigen::Vector3d _center;
34 
35  std::vector<Eigen::Vector3d> _free;
36  std::vector<Eigen::Vector3d> _occup;
37  std::vector<bool> _grid;
38 
39  std::vector<std::pair<double,unsigned int> > _sorted_robot;
40 
41 };
42 
43 #endif // SPACEINDEX_H
Definition: SpaceIndex.h:12
This file implements macros to help with the logging, in a way similar to ROS, using log4cxx...