hpp-corbaserver  4.9.0
Corba server for Humanoid Path Planner applications
obstacle.impl.hh
Go to the documentation of this file.
1 // Copyright (C) 2009, 2010 by Florent Lamiraux, Thomas Moulard, JRL.
2 //
3 // This file is part of the hpp-corbaserver.
4 //
5 // This software is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the
7 // implied warranties of fitness for a particular purpose.
8 //
9 // See the COPYING file for more information.
10 
11 #ifndef HPP_CORBASERVER_OBSTACLE_IMPL_HH
12 # define HPP_CORBASERVER_OBSTACLE_IMPL_HH
13 # include <map>
14 # include <string>
15 
16 #include <hpp/fcl/data_types.h>
17 
19 # include <hpp/corbaserver/fwd.hh>
20 # include <hpp/corbaserver/obstacle-idl.hh>
22 
24 namespace hpp
25 {
26  namespace corbaServer
27  {
28  namespace impl
29  {
30  class Obstacle : public virtual POA_hpp::corbaserver::Obstacle
31  {
32  public:
33  Obstacle ();
34 
35  void setServer (ServerPlugin* server)
36  {
37  server_ = server;
38  }
39 
40  virtual void loadObstacleModel (const char* filename,
41  const char* prefix);
42 
43  virtual void loadObstacleModelFromString
44  (const char* urdfString, const char* prefix);
45 
46  virtual void loadPolyhedron (const char* name, const char* filename);
47 
48  virtual void removeObstacleFromJoint
49  (const char* objectName, const char* jointName, Boolean collision,
50  Boolean distance);
51 
52  virtual void removeObstacle (const char* objectName);
53 
54  virtual void cutObstacle (const char* objectName, const floatSeq& aabb);
55 
56  virtual void
57  addObstacle (const char* polyhedronName, Boolean collision,
58  Boolean distance);
59 
60  virtual void
61  moveObstacle (const char* polyName, const Transform_ cfg);
62 
63  virtual void getObstaclePosition (const char* objectName,
64  Transform_ cfg);
65 
66  virtual Names_t* getObstacleNames (bool collision, bool distance);
67 
68  virtual void
69  createPolyhedron (const char* polyhedronName);
70 
71  virtual void createBox
72  (const char* boxName, Double x, Double y, Double z);
73 
74  virtual void
75  createSphere (const char* name, Double radius);
76 
77  virtual void
78  createCylinder (const char* name, Double radius, Double length);
79 
80  virtual ULong
81  addPoint
82  (const char* polyhedronName, Double x, Double y, Double z);
83 
84  virtual ULong
86  (const char* polyhedronName, ULong pt1, ULong pt2, ULong pt3);
87 
88 
89  private:
90  CollisionObjectPtr_t getObstacleByName (const char* name);
91 
93  ObjectMap objectMap_;
94 
96  ServerPlugin* server_;
97 
99  core::ProblemSolverPtr_t problemSolver();
100  };
101 
102  } // end of namespace implementation.
103  } // end of namespace corbaServer.
104 } // end of namespace hpp.
105 
106 #endif
Definition: server-plugin.hh:44
virtual ULong addPoint(const char *polyhedronName, Double x, Double y, Double z)
virtual void getObstaclePosition(const char *objectName, Transform_ cfg)
Implement CORBA interface ``Obstacle&#39;&#39;.
sequence< string > Names_t
Sequence of names.
Definition: common.idl:22
virtual void removeObstacle(const char *objectName)
virtual void createPolyhedron(const char *polyhedronName)
virtual void loadObstacleModel(const char *filename, const char *prefix)
void setServer(ServerPlugin *server)
Definition: obstacle.impl.hh:35
virtual void createBox(const char *boxName, Double x, Double y, Double z)
AABB aabb
virtual void removeObstacleFromJoint(const char *objectName, const char *jointName, Boolean collision, Boolean distance)
pinocchio::CollisionObjectPtr_t CollisionObjectPtr_t
Definition: fwd.hh:41
virtual void moveObstacle(const char *polyName, const Transform_ cfg)
virtual void cutObstacle(const char *objectName, const floatSeq &aabb)
FCL_REAL radius
virtual void createCylinder(const char *name, Double radius, Double length)
double Transform_[7]
Element of SE(3) represented by a vector and a unit quaternion.
Definition: common.idl:36
virtual void loadObstacleModelFromString(const char *urdfString, const char *prefix)
virtual void loadPolyhedron(const char *name, const char *filename)
virtual void createSphere(const char *name, Double radius)
FCL_REAL length[2]
virtual ULong addTriangle(const char *polyhedronName, ULong pt1, ULong pt2, ULong pt3)
Definition: object-map.hh:29
virtual void addObstacle(const char *polyhedronName, Boolean collision, Boolean distance)
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:32
virtual Names_t * getObstacleNames(bool collision, bool distance)
Definition: obstacle.impl.hh:30
FCL_REAL distance(const KDOP< N > &other, Vec3f *P=NULL, Vec3f *Q=NULL) const