@@ -159,6 +159,7 @@ class ICartesianSolver
159
159
*/
160
160
virtual bool invDyn (const std::vector<double > &q, std::vector<double > &t) = 0;
161
161
162
+ #ifndef SWIG_PREPROCESSOR_SHOULD_SKIP_THIS
162
163
/* *
163
164
* @brief Perform inverse dynamics
164
165
*
@@ -174,8 +175,31 @@ class ICartesianSolver
174
175
*
175
176
* @return true on success, false otherwise
176
177
*/
177
- virtual bool invDyn (const std::vector<double > &q,const std::vector<double > &qdot, const std::vector<double > &qdotdot,
178
- const std::vector< std::vector<double > > &fexts, std::vector<double > &t) = 0;
178
+ [[deprecated(" use `const std::vector<double> &ftip` signature instead" )]]
179
+ virtual bool invDyn (const std::vector<double > &q, const std::vector<double > &qdot, const std::vector<double > &qdotdot,
180
+ const std::vector<std::vector<double >> &fexts, std::vector<double > &t)
181
+ {
182
+ return invDyn (q, qdot, qdotdot, fexts.back (), t);
183
+ }
184
+ #endif
185
+
186
+ /* *
187
+ * @brief Perform inverse dynamics
188
+ *
189
+ * @param q Vector describing current position in joint space (meters or degrees).
190
+ * @param qdot Vector describing current velocity in joint space (meters/second or degrees/second).
191
+ * @param qdotdot Vector describing current acceleration in joint space (meters/second² or degrees/second²).
192
+ * @param ftip Vector describing an external force applied to the robot tip, expressed in cartesian space;
193
+ * first three elements denote translational acceleration (meters/second²), last three denote
194
+ * angular acceleration (radians/second²).
195
+ * @param t 6-element vector describing desired forces in cartesian space; first
196
+ * three elements denote translational acceleration (meters/second²), last three denote
197
+ * angular acceleration (radians/second²).
198
+ *
199
+ * @return true on success, false otherwise
200
+ */
201
+ virtual bool invDyn (const std::vector<double > &q, const std::vector<double > &qdot, const std::vector<double > &qdotdot,
202
+ const std::vector<double > &ftip, std::vector<double > &t) = 0;
179
203
};
180
204
181
205
} // namespace roboticslab
0 commit comments