-
Notifications
You must be signed in to change notification settings - Fork 88
/
SequencePlayerService.idl
256 lines (225 loc) · 10.4 KB
/
SequencePlayerService.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
/**
* @file SequencePlayerService.idl
* @brief Services for the sequence player interface
*/
module OpenHRP
{
typedef sequence<double> dSequence;
typedef sequence<dSequence> dSequenceSequence;
typedef sequence<boolean> bSequence;
interface SequencePlayerService
{
typedef sequence<string> StrSequence;
enum interpolationMode {
LINEAR, ///< linear interpolation
HOFFARBIB ///< minimum jerk interpolation by Hoff & Arbib
};
/**
* @brief Wait until the last goal posture is sent to the robot
*/
void waitInterpolation();
/**
* @brief Wait until the last goal posture is sent to the robot
* @param gname name of the joint group
*/
boolean waitInterpolationOfGroup(in string gname);
/**
* @brief Interpolate all joint angles on robot using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot.
* @param jvs sequence of joint angles
* @param tm duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAngles(in dSequence jvs, in double tm);
/**
* @brief Interpolate joint angles on robot using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot.
* @param jvs sequence of joint angles
* @param mask binary vector which selects joints to be interpolated
* @param tm duration
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesWithMask(in dSequence jvs, in bSequence mask,
in double tm);
/**
* @brief Interpolate just one joint angle specified by \em jname using duration \em tm. Function returns without waiting for interpolation to finish
* @param jname joint name
* @param jv joint angle
* @param tm duration [s]
* @return true if set successuflly, false otherwise
*/
boolean setJointAngle(in string jname, in double jv, in double tm);
/**
* @brief Interpolate position of the base link. Function returns without waiting for interpolation to finish
* @param pos position of the base link [m]
* @param tm duration [s]
* @return true if set successfully, false otherwise
*/
boolean setBasePos(in dSequence pos, in double tm);
/**
* @brief Interpolate Roll-Pitch-Yaw angles of the base link. Function returns without waiting for interpolation to finish
* @param rpy Roll-Pitch-Yaw angles of the base link [rad]
* @param tm duration [s]
* @return true if set successfully, false otherwise
*/
boolean setBaseRpy(in dSequence rpy, in double tm);
/**
* @brief Interpolate ZMP. Function returns without waiting for interpolation to finish
* @param zmp ZMP in the base link frame [m]
* @param tm duration [s]
* @return true if set successfully, false otherwise
*/
boolean setZmp(in dSequence zmp, in double tm);
/**
* @brief Interpolate X, Y, Z and Roll Pitch Yaw of the target joint/link group, wrt world coords Function returns without waiting for interpolation to finish
* @param gname name of the joint group
* @param xyz : X,Y,Z position of the target link [m]
* @param rpy : Roll-Pitch-Yaw angles of the target link [rad]
* @param tm duration [s]
* @return true if set successfully, false otherwise
*/
boolean setTargetPose(in string name, in dSequence xyz, in dSequence rpy, in double tm);
/**
* @brief Utility functions to check whether intepolation is going on. Functions return immediately
* @return true if interpolation queue is empty, false otherwise
*/
boolean isEmpty();
/**
* @brief load pattern files and start to playback.
* @param basename basename of the pattern files. \<basename\>.pos, \<basename\>.zmp, \<basename\>.waist and \<basename\>.gsens are used.
* @param tm Duration to the initial posture in \<basename\>.pos [s]
*/
void loadPattern(in string basename, in double tm);
/**
* @brief playback a pattern
* @param pos sequence of joint angles
* @param rpy sequence of Roll-Pitch-Yaw angles of the base link [rad]
* @param zmp sequence of ZMP [m]
* @param tm sequence of duration beetween postures [s]
*/
void playPattern(in dSequenceSequence pos,
in dSequenceSequence rpy,
in dSequenceSequence zmp,
in dSequence tm);
/**
* @brief clear pattern data in playback queue. This function returns after the queue becomes empty.
*/
void clear();
/**
* @brief clear pattern data in playback queue. This function returns immediately
*/
void clearNoWait();
/**
* @brief set interpolation mode.
* @param i_mode_ new interpolation mode
* @return true if set successfully, false otherwise
*/
boolean setInterpolationMode(in interpolationMode i_mode_);
/**
* @brief set to output data port by value of input data port
* @return true if set successfully, false otherwise
*/
boolean setInitialState();
/**
* @brief add a joint group
* @param gname name of the joint group
* @param jnames list of joint name
* @return true if the group is added successfully, false otherwise
*/
boolean addJointGroup(in string gname, in StrSequence jnames);
/**
* @brief remove a joint group
* @param gname name of the joint group
* @return true if the group is removed successfully, false otherwise
*/
boolean removeJointGroup(in string gname);
/**
* @brief Interpolate joint angles in a group using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot.
* @param gname name of the joint group
* @param jvs sequence of joint angles
* @param tm duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesOfGroup(in string gname, in dSequence jvs, in double tm);
/**
* @brief clear pattern data with joint group
* @param gname name of the joint group
* @param tm duration toward termination [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean clearOfGroup(in string gname, in double tm);
/**
* @brief play back apattern with joint group
* @param gname name of the joint group
* @param pos sequence of joint angles
* @param tm sequence of duration beetween postures [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean playPatternOfGroup(in string gname, in dSequenceSequence pos, in dSequence tm);
/**
* @brief set parameters to solve ik, used in setTargetPose
* @param pos error threshold for position
* @param rot error threshold for rotation
*/
void setMaxIKError(in double pos, in double rot);
/**
* @brief set parameters to solve ik, used in setTargetPose
* @param max_iteration max iteration
*/
void setMaxIKIteration(in short max_iteration);
/**
* @brief Interpolate Wrenches. Function returns without waiting for interpolation to finish
* @param wrenches Wrenches [N], [Nm]
* @param tm duration [s]
* @return true if set successfully, false otherwise
*/
boolean setWrenches(in dSequence wrenches, in double tm);
/**
* @brief Interpolate all joint angles on robot using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot. If this function called during the robot moves, it overwrite current goal.
* @param jvs sequence of sequence of joint angles [rad]
* @param tm sequence of duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesSequence(in dSequenceSequence jvss, in dSequence tms);
/**
* @brief Interpolate all joint angles on robot using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot. If this function called during the robot moves, it overwrite current goal.
* @param jvs sequence of sequence of joint angles [rad]
* @param mask binary vector which selects joints to be interpolated
* @param tm sequence of duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesSequenceWithMask(in dSequenceSequence jvss, in bSequence mask, in dSequence tms);
/**
* @brief Interpolate all joint angles in groups, using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot. If this function called during the robot moves, it overwrite current goal.
* @param gname name of the joint group
* @param jvs sequence of sequence of joint angles [rad]
* @param tm sequence of duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesSequenceOfGroup(in string gname, in dSequenceSequence jvss, in dSequence tms);
/**
* @brief Interpolate all joint angles, using duration specified by \em tm. Returns without waiting for whole sequence to be sent to robot. If this function called during the robot moves, it overwrite current goal.
* @param jvss sequence of sequence of joint angles [rad]
* @param vels sequence of sequence of velocities [rad/s]
* @param accs sequence of sequence of torques [N]
* @param poss sequence of weist pos [mm]
* @param rpys sequence of weist rpy [rad]
* @param accs sequence of weist acc [m/ss]
* @param zmps sequence of weist zmp [mm]
* @param wrenches sequence of wrenches [N, Nm]
* @param optionss sequence of options []
* @param tms sequence of duration [s]
* @return true joint angles are set successfully, false otherwise
*/
boolean setJointAnglesSequenceFull(in dSequenceSequence jvss, in dSequenceSequence vels, in dSequenceSequence torques, in dSequenceSequence poss, in dSequenceSequence rpys, in dSequenceSequence accs, in dSequenceSequence zmps, in dSequenceSequence wrenchs, in dSequenceSequence optionals, in dSequence tms);
/**
* @brief clear current JointAngles
* @return true joint angles are set successfully, false otherwise
*/
boolean clearJointAngles();
/**
* @brief clear current JointAnglesOfGroup
* @param gname name of the joint group
* @return true joint angles are set successfully, false otherwise
*/
boolean clearJointAnglesOfGroup(in string gname);
};
};