10 #ifndef HRICS_NATURAL_HPP
11 #define HRICS_NATURAL_HPP
13 #include "API/planningAPI.hpp"
15 #include "HRI_costspace/Grid/HRICS_NaturalGrid.hpp"
16 #include "HRI_costspace/Grid/HRICS_NaturalCell.hpp"
22 #include <libmove3d/hri/hri.h>
45 void initNaturalJustin();
46 void initNaturalAchile();
47 void initNaturalHerakles();
48 void initNaturalOldDude();
52 void setRobotToConfortPosture();
58 double getCost(
const Eigen::Vector3d& WSPoint,
bool useLeftvsRightArm,
bool withEffect =
false);
78 void setRobotColorFromConfiguration(
bool toSet);
118 void computeAllCellCost();
119 void computeAllReachableCellCost();
121 std::vector< std::pair<double,Eigen::Vector3d> > getReachableWSPoint();
127 bool IsHuman() {
return m_IsHuman; }
128 Robot* getRobot() {
return m_Robot; }
129 NaturalGrid* getGrid() {
return m_Grid; }
139 int m_IndexObjectDof;
141 bool m_computeNbOfIK;
145 bool m_BestPointsSorted;
163 HRI_AGENTS* m_Agents;
172 int m_JOINT_ARM_RIGTH_SHOULDER;
173 int m_JOINT_ARM_RIGTH_ELBOW;
174 int m_JOINT_ARM_RIGTH_WRIST;
176 int m_JOINT_ARM_LEFT_SHOULDER;
177 int m_JOINT_ARM_LEFT_ELBOW;
178 int m_JOINT_ARM_LEFT_WRIST;
181 int m_CONFIG_INDEX_SPINE;
182 int m_CONFIG_INDEX_HEAD;
184 int m_CONFIG_INDEX_ARM_RIGTH_SHOULDER;
185 int m_CONFIG_INDEX_ARM_RIGTH_ELBOW;
186 int m_CONFIG_INDEX_ARM_RIGTH_WRIST;
188 int m_CONFIG_INDEX_ARM_LEFT_SHOULDER;
189 int m_CONFIG_INDEX_ARM_LEFT_ELBOW;
190 int m_CONFIG_INDEX_ARM_LEFT_WRIST;
196 std::tr1::shared_ptr<Configuration> m_q_Confort;
201 std::tr1::shared_ptr<Configuration> m_q_ConfortWeigths;
212 std::vector<double> m_mg;
217 std::vector<double> m_armHeightL;
218 std::vector<double> m_armHeightR;
220 std::tr1::shared_ptr<Configuration> m_q_Init;
221 std::tr1::shared_ptr<Configuration> m_q_Goal;
226 std::vector< NaturalCell* > m_SortedCells;
double getWorkspaceCost(const Eigen::Vector3d &WSPoint)
Get the cost of a point in the grid.
Definition: HRICS_Natural.cpp:1231
bool getWorkspaceIsReachable(const Eigen::Vector3d &WSPoint)
Is point reachable in workspace.
Definition: HRICS_Natural.cpp:1244
bool computeIsReachableOnly(const Eigen::Vector3d &WSPoint, bool leftArm)
Compute if the Workspace Point is Reachable Move the robot.
Definition: HRICS_Natural.cpp:1388
double getConfigCost()
Get the cost of the current configuration.
Definition: HRICS_Natural.cpp:858
Eigen::Affine3d getGridOriginMatrix()
Computation on the Grid.
Definition: HRICS_Natural.cpp:1437
double basicNaturalArmCost(bool useLeftvsRightArm)
Others.
Definition: HRICS_Natural.cpp:1071
std::vector< Eigen::Vector3d > getSortedReachableWSPoint()
Get the sorted cells.
Definition: HRICS_Natural.cpp:1511
Natural Motion and Arm Confort.
Definition: HRICS_Natural.hpp:33
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
double getDiscomfort()
Discomfort : This function evaluates the joint displacement from the VRS project at Iwoa...
Definition: HRICS_Natural.cpp:930
void initGeneral()
Initilize the parameters for the Natural Cost space.
Definition: HRICS_Natural.cpp:60
bool computeIsReachableAndMove(const Eigen::Vector3d &WSPoint, bool leftArm)
Compute if the Workspace Point is Reachable Move the robot.
Definition: HRICS_Natural.cpp:1290
void setGrid(NaturalGrid *grid)
Basic setters.
Definition: HRICS_Natural.hpp:134
double getNumberOfIKCost(const Eigen::Vector3d &WSPoint)
Simple number of IK Cost.
Definition: HRICS_Natural.cpp:1252
int getObjectDof()
Basic accesors.
Definition: HRICS_Natural.hpp:126
double getCustomDistConfig(Configuration &q)
Compute the classic square distance between two configurations with weight.
Definition: HRICS_Natural.cpp:999
std::vector< double > getUpperBodyHeigth(bool useReference=true)
Discomfort : This function evaluates the different in heigth of each body regarding the confort posit...
Definition: HRICS_Natural.cpp:939
Classe représentant une Configuration d'un Robot.
Definition: configuration.hpp:25
double getEnergy()
Energy : This function evaluates the joint displacement from the VRS project at Iwoa.
Definition: HRICS_Natural.cpp:908
Definition: HRICS_NaturalGrid.hpp:22
double getJointDisplacement()
Get the 3 component of natural cost space.
Definition: HRICS_Natural.cpp:899
void initHumanBaseGrid(std::vector< double > box)
Definition: HRICS_Natural.cpp:785
NaturalGrid * computeNaturalGrid()
compute a NaturalGrid (calling class NaturalGrid) by using Env variable.
Definition: HRICS_Natural.cpp:1470
double getCost(const Eigen::Vector3d &WSPoint, bool useLeftvsRightArm, bool withEffect=false)
Computes the cost for a Workspace point.
Definition: HRICS_Natural.cpp:1185