hpp-corbaserver 6.0.0
Corba server for Humanoid Path Planner applications
Loading...
Searching...
No Matches
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
41#include <hpp/core/problem-solver.hh>
42#include <map>
43#include <string>
44
46namespace hpp {
47namespace corbaServer {
48namespace impl {
49class Obstacle : public virtual POA_hpp::corbaserver::Obstacle {
50 public:
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
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
Definition common-idl.hh:78
Definition common-idl.hh:803
Definition common-idl.hh:689
Definition object-map.hh:41
Definition server-plugin.hh:50
Definition obstacle.impl.hh:49
virtual void createCylinder(const char *name, Double radius, Double length)
virtual void createSphere(const char *name, Double radius)
virtual void removeObstacle(const char *objectName)
virtual void loadObstacleModelFromString(const char *urdfString, const char *prefix)
virtual void removeObstacleFromJoint(const char *objectName, const char *jointName, Boolean collision, Boolean distance)
virtual void moveObstacle(const char *polyName, const Transform_ cfg)
virtual void loadPolyhedron(const char *name, const char *filename)
virtual void loadPointCloudFromFilename(const char *objectName, const char *filename)
virtual void getObstaclePosition(const char *objectName, Transform_ cfg)
virtual ULong addTriangle(const char *polyhedronName, ULong pt1, ULong pt2, ULong pt3)
virtual void createBox(const char *boxName, Double x, Double y, Double z)
virtual void cutObstacle(const char *objectName, const floatSeq &aabb)
virtual ULong addPoint(const char *polyhedronName, Double x, Double y, Double z)
virtual void loadPointCloudFromPoints(const char *objectName, const CORBA::Double resolution, const floatSeqSeq &points)
virtual void addObstacle(const char *polyhedronName, Boolean collision, Boolean distance)
void setServer(ServerPlugin *server)
Definition obstacle.impl.hh:53
virtual void loadObstacleModel(const char *filename, const char *prefix)
virtual Names_t * getObstacleNames(bool collision, bool distance)
virtual void createPolyhedron(const char *polyhedronName)
ReturnType::Object_var makeServantDownCast(Server *server, const typename ServantBaseType::Storage &t)
Definition servant-base.hh:407
pinocchio::CollisionObjectPtr_t CollisionObjectPtr_t
Definition fwd.hh:63
Implement CORBA interface `‘Obstacle’'.
Definition client.hh:46
double Transform_[7]
Element of SE(3) represented by a vector and a unit quaternion.
Definition common.idl:38