1 #ifndef MIGHTABILITIESGRIDS_HPP
2 #define MIGHTABILITIESGRIDS_HPP
5 #include "API/Grids/ThreeDGrid.hpp"
6 #include "API/Grids/TwoDGrid.hpp"
7 #include "worldState.hpp"
10 #include "API/planningAPI.hpp"
12 #include "move3d-headless.h"
13 #include "Planner-pkg.h"
14 #include "Collision-pkg.h"
38 std::map<typeCells, std::vector<MightabilitiesCell*> > cells;
45 std::vector<MightabilitiesCell*> getListFromType(typeCells tc);
49 std::vector<std::pair<typeCells, std::vector<MightabilitiesCell*> > > lists;
62 void init(Eigen::Vector3i size, std::vector<double> envSize);
63 void init(
double samplingRate , std::vector<double> envSize);
67 void placeVisball(p3d_point p);
69 void computeMights(std::vector<Robot*> agents, std::vector<Robot *> supports, std::vector<typeCells> abilities);
71 std::vector<MightabilitiesCell*> getCellsFromEntity(
Robot* entity);
73 std::vector<MightabilitiesCell*> mergeVectors(std::vector<MightabilitiesCell*> c1,std::vector<MightabilitiesCell*> c2);
79 bool computeVisballCollision();
96 void show(std::vector< std::pair<Robot*,typeCells> > toShow);
98 void setSampleRate(
double SR) { _samplingRate = SR; }
100 std::vector<MightabilitiesCell*> getList(
Robot* ag);
101 std::vector<MightabilitiesCell*> getList(
Robot* ag, typeCells tc);
102 std::vector<MightabilitiesCell*> getList(std::vector< std::pair<Robot*,typeCells> > rpc);
110 double _samplingRate;
112 std::vector<agentLinkedCells> _ALC;
114 std::map<Robot*, typeCellLists* > listMapAgentsType;
116 std::vector< std::pair<Robot*,typeCells> > _toShow;
117 std::vector<MightabilitiesCell*> _allWorldCells;
132 void addAgent(
Robot* ag);
133 void removeAgent(
Robot* ag);
134 bool belongToAgent(
Robot* ag);
135 bool belongToAtLeastOneAgent();
137 void addTypeC(
Robot* ag, typeCells tc);
138 void removeTypeC(
Robot *ag, typeCells tc);
139 bool belongToTypeC(
Robot* ag, typeCells tc);
141 void setObject(
Robot* r){_object = r;}
142 Robot* getObject(){
return _object;}
144 void setIsSupport(
bool v) {isSupport = v;}
145 bool isItSupport() {
return isSupport;}
148 std::vector< std::pair<Robot*, typeCells> > agentTypeBelongings;
156 #endif // MIGHTABILITIESGRIDS_HPP
void draw()
Draw a openGl view of the grid.
Definition: mightabilitiesGrids.cpp:814
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ThreeDGrid()
Constructor.
Definition: ThreeDGrid.cpp:21
Definition: ThreeDGrid.hpp:24
Definition: mightabilitiesGrids.hpp:122
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: mightabilitiesGrids.hpp:52
Definition: ThreeDCell.hpp:25
Definition: worldState.hpp:30
Definition: mightabilitiesGrids.hpp:42
Definition: mightabilitiesGrids.hpp:33
API::ThreeDCell * createNewCell(unsigned int index, unsigned int x, unsigned int y, unsigned int z)
Virtual function that creates a new Cell.
Definition: mightabilitiesGrids.cpp:799