10 #ifndef HRICS_NATURALGRID_H_
11 #define HRICS_NATURALGRID_H_
13 #include "API/Device/robot.hpp"
14 #include "API/ConfigSpace/configuration.hpp"
15 #include "API/Grids/ThreeDGrid.hpp"
38 void computeReachability();
44 bool isInReachableGrid(
const Eigen::Vector3d& WSPoint);
47 bool isReachableWithRA(
const Eigen::Vector3d& WSPoint);
48 bool isReachableWithLA(
const Eigen::Vector3d& WSPoint);
52 void drawVector(
const std::vector< std::pair<double,NaturalCell*> >& cells );
54 std::vector<Eigen::Vector3d>
getBox();
65 void setNaturalCostSpace(
Natural* NCS) { m_NaturalCostSpace = NCS; setGridOrigin(); }
66 Natural* getNaturalCostSpace() {
return m_NaturalCostSpace; }
67 Eigen::Affine3d getRobotOrigin() {
return m_RobotOriginPos; }
79 std::tr1::shared_ptr<Configuration> m_ActualConfig;
80 Eigen::Affine3d m_RobotOriginPos;
std::vector< std::pair< double, NaturalCell * > > getAllReachableCellsSorted()
Reachable Cells sorted
Definition: HRICS_NaturalGrid.cpp:320
Eigen::Vector3d getTranformedToRobotFrame(const Eigen::Vector3d &WSPoint)
Transform the point to the robot frame.
Definition: HRICS_NaturalGrid.cpp:413
NaturalGrid * mergeWith(NaturalGrid *otherGrid)
Fusion Grid
Definition: HRICS_NaturalGrid.cpp:222
void resetCellCost()
Reset Grid Cost.
Definition: HRICS_NaturalGrid.cpp:104
Natural Motion and Arm Confort.
Definition: HRICS_Natural.hpp:33
Eigen::Affine3d getTransformFromRobotPos()
Get the Transform Matrix between the robot and the grid point
Definition: HRICS_NaturalGrid.cpp:382
Definition: ThreeDGrid.hpp:24
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
bool loadFromXmlFile(std::string docname)
Reads the grid from an xml file.
Definition: HRICS_NaturalGrid.cpp:669
std::vector< NaturalCell * > getAllReachableCells()
Reachable Cells return all reachable cells by the human
Definition: HRICS_NaturalGrid.cpp:258
std::vector< NaturalCell * > getAllReachableCellsOneArm(bool right_arm)
Reachable Cells return all reachable by one arm
Definition: HRICS_NaturalGrid.cpp:279
Definition: ThreeDCell.hpp:25
std::vector< Eigen::Vector3d > getBox()
Definition: HRICS_NaturalGrid.cpp:505
void computeAllCellCost()
Compute Grid Cost.
Definition: HRICS_NaturalGrid.cpp:130
API::ThreeDCell * createNewCell(unsigned int index, unsigned int x, unsigned int y, unsigned int z)
Virtual function that creates a new Cell.
Definition: HRICS_NaturalGrid.cpp:84
int robotConfigInCell(int i)
get Config
Definition: HRICS_NaturalGrid.cpp:373
void draw()
Draw a openGl view of the grid.
Definition: HRICS_NaturalGrid.cpp:550
double getCellCostAt(const Eigen::Vector3d &WSPoint)
Get the cell containing WSPoint and returns the cost.
Definition: HRICS_NaturalGrid.cpp:494
Definition: HRICS_NaturalGrid.hpp:22
bool isReachable(const Eigen::Vector3d &WSPoint)
Returns wether a point is reachable in the natural grid.
Definition: HRICS_NaturalGrid.cpp:448
void initReachable()
Compute Grid Accecibility whith right and left hand !
Definition: HRICS_NaturalGrid.cpp:198
bool writeToXmlFile(std::string docname)
Writes the grid to en xml file.
Definition: HRICS_NaturalGrid.cpp:576
void resetReachability()
Reset Grid Reachability.
Definition: HRICS_NaturalGrid.cpp:117