rbprmbuilder.idl 10.4 KB
Newer Older
Steve Tonneau's avatar
Steve Tonneau committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2015 CNRS
// Author: Steve Tonneau
//
// This file is part of hpp-manipulation-corba.
// hpp-manipulation-corba is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-manipulation-corba is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Lesser Public License for more details.  You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-manipulation-corba.  If not, see
// <http://www.gnu.org/licenses/>.

Steve Tonneau's avatar
Steve Tonneau committed
18
19
#ifndef HPP_RBPRM_CORBA_BUILDER_IDL
# define HPP_RBPRM_CORBA_BUILDER_IDL
Steve Tonneau's avatar
Steve Tonneau committed
20
21
22
23
24
25
26
27
28
29

# include <hpp/corbaserver/common.idl>

module hpp
{
  module corbaserver {
  module rbprm {
  interface RbprmBuilder
  {
    /// Create a Device for the ROM of the robot
Steve Tonneau's avatar
Steve Tonneau committed
30
    /// This function can be called several times to include several ROMs (one for each limb)
Steve Tonneau's avatar
Steve Tonneau committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
    /// The device automatically has an anchor joint called "base_joint" as
    /// root joint.
    /// \param romRobotName the name of the robot range of motion.
    ///  Load robot model
    /// \param rootJointType type of root joint among "anchor", "freeflyer",
    /// "planar",
    /// \param packageName Name of the ROS package containing the model,
    /// \param modelName Name of the package containing the model
    /// \param urdfSuffix suffix for urdf file,
    ///
    /// The ros url are built as follows:
    /// "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
    /// "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"
    ///
    void loadRobotRomModel (in string romRobotName, in string rootJointType,
             in string packageName, in string modelName,
             in string urdfSuffix, in string srdfSuffix)
      raises (Error);


Steve Tonneau's avatar
Steve Tonneau committed
51
    /// Create a RbprmDevice for the root of the robot
Steve Tonneau's avatar
Steve Tonneau committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

    /// The device automatically has an anchor joint called "base_joint" as
    /// root joint.
    /// \param trunkRobotName the name of the robot trunk used for collision.
    /// \param rootJointType type of root joint among "anchor", "freeflyer",
    /// "planar",
    /// \param packageName Name of the ROS package containing the model,
    /// \param modelName Name of the package containing the model
    /// \param urdfSuffix suffix for urdf file,
    ///
    /// The ros url are built as follows:
    /// "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
    /// "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"
    ///
    void loadRobotCompleteModel (in string trunkRobotName, in string rootJointType,
             in string packageName, in string modelName,
             in string urdfSuffix, in string srdfSuffix)
      raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

    /// Create a RbprmFullBody object
    /// The device automatically has an anchor joint called "base_joint" as
    /// root joint.
    /// \param trunkRobotName the name of the robot trunk used for collision.
    /// \param rootJointType type of root joint among "anchor", "freeflyer",
    /// "planar",
    /// \param packageName Name of the ROS package containing the model,
    /// \param modelName Name of the package containing the model
    /// \param urdfSuffix suffix for urdf file,
    ///
    /// The ros url are built as follows:
    /// "package://${packageName}/urdf/${modelName}${urdfSuffix}.urdf"
    /// "package://${packageName}/srdf/${modelName}${srdfSuffix}.srdf"
    ///
    void loadFullBodyRobot (in string trunkRobotName, in string rootJointType,
             in string packageName, in string modelName,
             in string urdfSuffix, in string srdfSuffix)
      raises (Error);

Steve Tonneau's avatar
Steve Tonneau committed
90
91
92
93
94
95
96
97
98
    /// Set Rom constraints for the configuration shooter
    /// a configuration will only be valid if all roms indicated
    /// are colliding with the environment.
    /// If no roms are indicated, a configuration will be valid if any rom
    /// is colliding with the environment.
    ///
    void setFilter (in Names_t roms)
      raises (Error);

99
100
101
102
103
104
105
106
107
108
    /// Set Rom surface constraints for the configuration shooter
    /// a Rom configuration will only be valid it collides with a surface
    /// the normal of which is colinear to the indicated normal,
    /// modulated by a range value.
    /// \param normal prefered contact surface normal direction
    /// \param range tolerance between surface normal and desired surface normal. If the dot
    /// product of the normal is greater than range then the surface will be accepted.
    ///
    void setNormalFilter(in string romName, in floatSeq normal, in double range) raises (Error);

Steve Tonneau's avatar
Steve Tonneau committed
109
110
111
112
113
114
115
    /// Sets limits on robot orientation, described according to Euler's ZYX rotation order
    ///
    /// \param limitszyx 6D vector with the lower and upperBound for each rotation axis in sequence
    /// expressed in gradients
    /// [z_inf, z_sup, y_inf, y_sup, x_inf, x_sup]
    void boundSO3(in floatSeq limitszyx) raises (Error);

Steve Tonneau's avatar
Steve Tonneau committed
116
117
118
119
120
    /// Get Sample configuration by its id
    /// \param sampleName name of the limb from which to retrieve a sample
    /// \param sampleId id of the desired samples
    /// \return dofArray Array of degrees of freedom corresponding to the current configuration of the robot
    /// , to which the desired limb configuration has been assigned.
Steve Tonneau's avatar
Steve Tonneau committed
121
    floatSeq getSampleConfig(in string sampleName, in unsigned short sampleId) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
122
123
124
125
126
127
128


    /// Get the end effector position of a given limb configuration
    /// \param sampleName name of the limb from which to retrieve a sample
    /// \param sampleId id of the desired samples
    /// \return world position of the limb end effector given the current robot configuration and the
    /// and the selected sample
Steve Tonneau's avatar
Steve Tonneau committed
129
    floatSeq getSamplePosition(in string sampleName, in unsigned short sampleId) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
130

Steve Tonneau's avatar
Steve Tonneau committed
131
132
133
134
    /// Generate all possible contact in a given configuration
    /// \param dofArray initial configuration of the robot
    /// \param direction desired direction of motion for the robot
    /// \return transformed configuration for which all possible contacts have been created
Steve Tonneau's avatar
Steve Tonneau committed
135
    floatSeq generateContacts(in floatSeq dofArray, in floatSeq direction) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
136
137
138
139
140
141
142

    /// Given a configuration and a limb, returns the id of all samples potentially in contact with the
    /// environment, ordered by their efficiency
    /// \param name name of the considered limb
    /// \param dofArray considered configuration of the robot
    /// \param direction desired direction of motion for the robot
    /// \return transformed configuration for which all possible contacts have been created
143
    floatSeq getContactSamplesIds(in string name, in floatSeq dofArray, in floatSeq direction) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
144

Steve Tonneau's avatar
Steve Tonneau committed
145
146
147
148
149
150
151
152
153
154
155
    /// Specifies a subchain of the robot as a limb, which can be used to create contacts.
    /// A limb must consist in a simple kinematic chain, where every node has only one child
    /// \param id user given name of the new limb
    /// \param limb robot joint corresponding to the root of the limb (ex a shoulder or ankle joint)
    /// \param effector robot joint corresponding to the effector of the limb (ex a hand or foot joint)
    /// \param offset contact point of the effector, expressed as an offset from the joint root
    /// \param normal normal vector to consider for contact creation. For instance for a foot, typically
    /// normal is aligned with the -z vertical axis, to create a contact with the plant of the robot
    /// \param x width of the rectangle surface contact of the effector
    /// \param y length of the rectangle surface contact of the effector
    /// \param samples number of samples to generate for the limb (a typical value is 10000)
156
    /// \param heuristicName heuristic used to bias sample selection
Steve Tonneau's avatar
Steve Tonneau committed
157
    /// \param resolution resolution of the octree used to store the samples (a typical value is 0.01 meters)
Steve Tonneau's avatar
Steve Tonneau committed
158
    void addLimb(in string id, in string limb, in string effector, in floatSeq offset, in floatSeq normal,
159
                 in double x, in double y, in unsigned short samples, in string heuristicName, in double resolution) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
160
161
162
163
164

    /// Set the start state of a contact generation problem
    /// environment, ordered by their efficiency
    /// \param dofArray start configuration of the robot
    /// \param contactLimbs ids of the limb in contact for the state
Steve Tonneau's avatar
Steve Tonneau committed
165
    void setStartState(in floatSeq dofArray, in Names_t contactLimbs) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
166
167
168
169
170
171


    /// Set the end state of a contact generation problem
    /// environment, ordered by their efficiency
    /// \param dofArray end configuration of the robot
    /// \param contactLimbs ids of the limb in contact for the state
Steve Tonneau's avatar
Steve Tonneau committed
172
    void setEndState(in floatSeq dofArray, in Names_t contactLimbs) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
173
174
175
176
177

    /// Provided a path has already been computed, interpolates it and generates the statically stable
    /// constact configurations along it. setStartState and setEndState must have been called prior
    /// to this function. If these conditions are not met an error is raised.
    /// \param timestep normalized step for generation along the path (ie the path has a length of 1).
178
179
    /// \param path path computed.
    floatSeqSeq interpolate(in double timestep, in double path) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
180
181
182
183

    /// Saves the last computed states by the function interpolate in a filename.
    /// Raises an error if interpolate has not been called, or the file could not be opened.
    /// \param filename name of the file used to save the contacts.
Steve Tonneau's avatar
Steve Tonneau committed
184
    void saveComputedStates(in string filename) raises (Error);
Steve Tonneau's avatar
Steve Tonneau committed
185

186
187
188
189
190
191
192
193
194
195
196
197
198
    /// returns the size and transforms of all boxes of the octree for a limb
    /// \param limbname name of the considered limb
    /// \param dofArray considered configuration of the robot
    /// \return transformed configuration for which all possible contacts have been created
    floatSeqSeq GetOctreeBoxes(in string limbname, in floatSeq dofArray) raises (Error);


    /// returns octree transform for a given robot configuration
    /// \param limbname name of the considered limb
    /// \param dofArray considered configuration of the robot
    /// \return size 7 position + quaternion of the octree root
    floatSeq getOctreeTransform(in string limbname, in floatSeq dofArray) raises (Error);

Steve Tonneau's avatar
Steve Tonneau committed
199
200
201
202
203
  }; // interface Robot
  }; // module rbprm
  }; // module corbaserver
}; // module hpp

Steve Tonneau's avatar
Steve Tonneau committed
204
#endif // HPP_RBPRM_CORBA_BUILDER_IDL