hpp-corbaserver: src/obstacle.impl.hh Source File

hpp-corbaserver 9.0.2 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
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
6 // met:
7 //
8 // 1. Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright
12 // notice, this list of conditions and the following disclaimer in the
13 // documentation and/or other materials provided with the distribution.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26 // DAMAGE.
27 //
28 // This software is provided "as is" without warranty of any kind,
29 // either expressed or implied, including but not limited to the
30 // implied warranties of fitness for a particular purpose.
31 //
32 // See the COPYING file for more information.
33
34 #ifndef HPP_CORBASERVER_OBSTACLE_IMPL_HH
35 #define HPP_CORBASERVER_OBSTACLE_IMPL_HH
36 #include <coal/data_types.h>
37
38 #include <hpp/corbaserver/fwd.hh>
39 #include <hpp/corbaserver/object-map.hh>
40 #include <hpp/corbaserver/obstacle-idl.hh>
41 #include <hpp/core/problem-solver.hh>
42 #include <map>
43 #include <string>
44
46 namespace hpp {
47 namespace corbaServer {
48 namespace impl {
49 class Obstacle : public virtual POA_hpp::corbaserver::Obstacle {
50 public:
51 Obstacle();
52
53 void setServer(ServerPlugin* server) { server_ = server; }
54
55 virtual void loadObstacleModel(const char* filename, const char* prefix);
56
57 virtual void loadObstacleModelFromString(const char* urdfString,
58 const char* prefix);
59
60 virtual void loadPointCloudFromFilename(const char* objectName,
61 const char* filename);
62
63 virtual void loadPointCloudFromPoints(const char* objectName,
64 const CORBA::Double resolution,
65 const floatSeqSeq& points);
66
67 virtual void loadPolyhedron(const char* name, const char* filename);
68
69 virtual void removeObstacleFromJoint(const char* objectName,
70 const char* jointName, Boolean collision,
71 Boolean distance);
72
73 virtual void removeObstacle(const char* objectName);
74
75 virtual void cutObstacle(const char* objectName, const floatSeq& aabb);
76
77 virtual void addObstacle(const char* polyhedronName, Boolean collision,
78 Boolean distance);
79
80 virtual void moveObstacle(const char* polyName, const Transform_ cfg);
81
82 virtual void getObstaclePosition(const char* objectName, Transform_ cfg);
83
84 virtual Names_t* getObstacleNames(bool collision, bool distance);
85
86 virtual void createPolyhedron(const char* polyhedronName);
87
88 virtual void createBox(const char* boxName, Double x, Double y, Double z);
89
90 virtual void createSphere(const char* name, Double radius);
91
92 virtual void createCylinder(const char* name, Double radius, Double length);
93
94 virtual ULong addPoint(const char* polyhedronName, Double x, Double y,
95 Double z);
96
97 virtual ULong addTriangle(const char* polyhedronName, ULong pt1, ULong pt2,
98 ULong pt3);
99
100 private:
101 CollisionObjectPtr_t getObstacleByName(const char* name);
102
104 ObjectMap objectMap_;
105
107 ServerPlugin* server_;
108
110 core::ProblemSolverPtr_t problemSolver();
111 };
112
113 } // namespace impl
114 } // end of namespace corbaServer.
115 } // end of namespace hpp.
116
117 #endif
Names_t
Definition: common-idl.hh:78
floatSeqSeq
Definition: common-idl.hh:803
floatSeq
Definition: common-idl.hh:689
hpp::corbaServer::ObjectMap
Definition: object-map.hh:41
hpp::corbaServer::ServerPlugin
Definition: server-plugin.hh:50
hpp::corbaServer::impl::Obstacle
Definition: obstacle.impl.hh:49
hpp::corbaServer::impl::Obstacle::createCylinder
virtual void createCylinder(const char *name, Double radius, Double length)
hpp::corbaServer::impl::Obstacle::createSphere
virtual void createSphere(const char *name, Double radius)
hpp::corbaServer::impl::Obstacle::Obstacle
Obstacle()
hpp::corbaServer::impl::Obstacle::removeObstacle
virtual void removeObstacle(const char *objectName)
hpp::corbaServer::impl::Obstacle::loadObstacleModelFromString
virtual void loadObstacleModelFromString(const char *urdfString, const char *prefix)
hpp::corbaServer::impl::Obstacle::removeObstacleFromJoint
virtual void removeObstacleFromJoint(const char *objectName, const char *jointName, Boolean collision, Boolean distance)
hpp::corbaServer::impl::Obstacle::moveObstacle
virtual void moveObstacle(const char *polyName, const Transform_ cfg)
hpp::corbaServer::impl::Obstacle::loadPolyhedron
virtual void loadPolyhedron(const char *name, const char *filename)
hpp::corbaServer::impl::Obstacle::loadPointCloudFromFilename
virtual void loadPointCloudFromFilename(const char *objectName, const char *filename)
hpp::corbaServer::impl::Obstacle::getObstaclePosition
virtual void getObstaclePosition(const char *objectName, Transform_ cfg)
hpp::corbaServer::impl::Obstacle::addTriangle
virtual ULong addTriangle(const char *polyhedronName, ULong pt1, ULong pt2, ULong pt3)
hpp::corbaServer::impl::Obstacle::createBox
virtual void createBox(const char *boxName, Double x, Double y, Double z)
hpp::corbaServer::impl::Obstacle::cutObstacle
virtual void cutObstacle(const char *objectName, const floatSeq &aabb)
hpp::corbaServer::impl::Obstacle::addPoint
virtual ULong addPoint(const char *polyhedronName, Double x, Double y, Double z)
hpp::corbaServer::impl::Obstacle::loadPointCloudFromPoints
virtual void loadPointCloudFromPoints(const char *objectName, const CORBA::Double resolution, const floatSeqSeq &points)
hpp::corbaServer::impl::Obstacle::getObstacleNames
virtual Names_t * getObstacleNames(bool collision, bool distance)
hpp::corbaServer::impl::Obstacle::addObstacle
virtual void addObstacle(const char *polyhedronName, Boolean collision, Boolean distance)
hpp::corbaServer::impl::Obstacle::setServer
void setServer(ServerPlugin *server)
Definition: obstacle.impl.hh:53
hpp::corbaServer::impl::Obstacle::loadObstacleModel
virtual void loadObstacleModel(const char *filename, const char *prefix)
hpp::corbaServer::impl::Obstacle::createPolyhedron
virtual void createPolyhedron(const char *polyhedronName)
hpp::core::ProblemSolver
fwd.hh
hpp::corbaServer::CollisionObjectPtr_t
pinocchio::CollisionObjectPtr_t CollisionObjectPtr_t
Definition: fwd.hh:63
hpp
Implement CORBA interface `‘Obstacle’'.
hpp::Transform_
double Transform_[7]
Element of SE(3) represented by a vector and a unit quaternion.
Definition: common.idl:38
object-map.hh
obstacle-idl.hh
problem-solver.hh