5 #define EIGEN_USE_NEW_STDVECTOR
6 #include <Eigen/StdVector>
7 #include <Eigen/Geometry>
9 #include "API/Device/joint.hpp"
10 #include "API/Device/objectrob.hpp"
11 #include "API/ConfigSpace/configuration.hpp"
13 #include <libmove3d/hri/hri.h>
51 Robot(rob* R ,
bool copy =
false );
58 rob* copyRobotStruct(rob* robotPt);
160 std::tr1::shared_ptr<Configuration>
shoot(
bool samplePassive =
false);
162 std::tr1::shared_ptr<Configuration> shootDirections(std::tr1::shared_ptr<Configuration> from ,
int nactive,
int scale=1);
169 std::tr1::shared_ptr<Configuration>
shootDir(
bool samplePassive =
false);
233 std::tr1::shared_ptr<Configuration>
getGoTo();
272 void getListOfPassiveJoints(std::list<Joint *> & passiveJoints);
274 unsigned getNbConf()
const {
return _Robot->nconf; }
276 confPtr_t getConf(
unsigned i) {
291 bool isActiveCcConstraint();
296 void activateCcConstraint();
301 void deactivateCcConstraint();
308 unsigned int getBaseJointIndex();
313 std::tr1::shared_ptr<Configuration> shootRandomDirection();
318 std::tr1::shared_ptr<Configuration> shootBase();
323 std::tr1::shared_ptr<Configuration> shootBaseWithoutCC();
328 std::tr1::shared_ptr<Configuration> shootAllExceptBase();
344 bool isCarryingObject(
int armId);
347 bool isAgent(){
return isAnAgent;}
348 void isAgent(
bool isAg){isAnAgent = isAg;}
350 void attachObj(
Robot* obj,
int jointId);
351 void dettachObj(
Robot* obj);
352 void dettachObj(
int jointId);
353 bool isObjectAttached();
354 bool isObjectAttached(
Robot* obj,
int jointId);
356 p3d_rob *whichObjectAttached(
int jointId);
357 p3d_rob* isAttached();
365 Scene* m_ActiveScene;
368 std::vector<Joint*> m_Joints;
370 Eigen::Vector3d m_ObjectBoxCenter;
371 Eigen::Vector3d m_ObjectBoxDimentions;
374 extern Robot* API_activeRobot;
ObjectRob * getObjectRob()
return objectRob related to the robot if possible
Definition: robot.cpp:118
bool setAndUpdateHumanArms(Configuration &q)
set and update Human Arms
Definition: robot.cpp:630
Eigen::Vector3d getJointPos(int id)
Get the Robot joint Position.
Definition: robot.cpp:736
std::tr1::shared_ptr< Configuration > shootFreeFlyer(double *box)
shoots the active free flyer inside a box
Joint * getJoint(unsigned int i)
Gets the ith joint structure.
void initObjectBox()
Initializes the box in which the FF Will be sampled.
Definition: robot.cpp:229
int setAndUpdate(Configuration &q, bool withoutFreeFlyers=false)
place le Robot dans une Configuration
Definition: robot.cpp:595
bool isInCollisionWithOthersAndEnv()
Returns true if the robot is in colision with obstacles or other robots.
Definition: robot.cpp:669
bool isInCollision()
Returns true if the robot is in colision with obstacles, other robots and self.
Definition: robot.cpp:644
Scene * getActiveScene()
Returns the active scene involving the robot.
Definition: robot.hpp:101
std::vector< Eigen::Vector3d > getObjectBox()
Returns the Object Box.
Definition: robot.cpp:180
unsigned int getNumberOfJoints()
Get the number of Joints.
Definition: robot.cpp:149
std::tr1::shared_ptr< Configuration > getNewConfig()
Returns a new configuration.
Definition: robot.cpp:700
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: objectrob.hpp:22
void setHriAgent(HRI_AGENT *ag)
set hri_agent related to the robot if possible
Definition: robot.cpp:113
Class that represents a Scene, Described by a p3d file.
Definition: scene.hpp:22
bool setAndUpdateMultiSol(Configuration &q)
place le Robot dans une Configuration
Definition: robot.cpp:612
void setObjectRob(ObjectRob *ore)
set hri_agent related to the robot if possible
Definition: robot.cpp:123
This class holds a Joint and is associated with a Body (Link) It's the basic element of a kinematic c...
Definition: joint.hpp:27
Definition: trajectory.hpp:40
std::tr1::shared_ptr< Configuration > shootQuadConf()
Sampling method for quadrotor configurations.
Definition: robot.cpp:435
Eigen::Matrix4d getJointAbsPos(int id)
Get the Robot joint AbsPos.
Definition: robot.cpp:705
void setGoTo(Configuration &conf)
Sets the Goto Position of the Robot.
Definition: robot.cpp:689
std::tr1::shared_ptr< Configuration > getCurrentPos()
Returns the Robot current Configuration.
Definition: robot.cpp:694
std::tr1::shared_ptr< Configuration > getInitialPosition()
obtient la Configuration current du Robot
Definition: robot.cpp:674
int setAndUpdateFreeFlyer(const Eigen::Vector3d &pos)
set and update the active free flyer
Definition: robot.cpp:582
traj * getTrajStruct()
Gets traj associated with Robot.
Definition: robot.cpp:138
std::tr1::shared_ptr< Configuration > shootDir(bool samplePassive=false)
obtient une Configuration-Direction aléatoire pour le Robot
Definition: robot.cpp:574
virtual ~Robot()
Destructeur de la classe.
Definition: robot.cpp:86
rob * getRobotStruct()
obtient la structure p3d_rob de la classe
Definition: robot.cpp:129
unsigned int getNumberOfActiveDoF()
Get Number of active DoFs.
Definition: robot.cpp:755
Classe représentant une Configuration d'un Robot.
Definition: configuration.hpp:25
API::Trajectory getCurrentTraj()
Gets the current trajectory.
Definition: robot.cpp:143
void setAndUpdateWithoutConstraints(Configuration &q)
place le Robot dans une Configuration, without checking the cinematic constraints.
Definition: robot.cpp:622
void setInitialPosition(Configuration &conf)
Sets the Initial Position of the Robot.
Definition: robot.cpp:679
Robot(rob *R, bool copy=false)
Constructeur de la classe.
Definition: robot.cpp:67
Joint * getIthActiveDoFJoint(unsigned int ithActiveDoF, unsigned int &ithDofOnJoint)
Get Number of active DoFs.
Definition: robot.cpp:782
std::tr1::shared_ptr< Configuration > shoot(bool samplePassive=false)
tire une Configuration aléatoire pour le Robot
Definition: robot.cpp:495
HRI_AGENT * getHriAgent()
return hri_agent related to the robot if possible
Definition: robot.cpp:107
const std::vector< Joint * > & getAllJoints()
Returns an vector of all robot joints.
Definition: robot.cpp:175
std::tr1::shared_ptr< Configuration > getGoTo()
obtient la Configuration GoTo du Robot
Definition: robot.cpp:684
std::string getName()
obtient le nom du Robot
Definition: robot.cpp:102
void setActiveScene(Scene *sc)
Associate an active scene to the robot.
Definition: robot.hpp:96