act-on-set.hpp 19.7 KB
Newer Older
1
//
2
// Copyright (c) 2015-2018 CNRS
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//
// This file is part of Pinocchio
// Pinocchio 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.
//
// Pinocchio 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
// Pinocchio If not, see
// <http://www.gnu.org/licenses/>.

Nicolas Mansard's avatar
Nicolas Mansard committed
18
19
20
#ifndef __se3_act_on_set_hpp__
#define __se3_act_on_set_hpp__

21
#include "pinocchio/macros.hpp"
Nicolas Mansard's avatar
Nicolas Mansard committed
22
23
24
25
26
27
#include "pinocchio/spatial/fwd.hpp"

namespace se3
{
  namespace forceSet
  {
28
29
30
31
    ///
    /// \brief SE3 action on a set of forces, represented by a 6xN matrix whose each
    ///        column represent a spatial force.
    ///
Nicolas Mansard's avatar
Nicolas Mansard committed
32
    template<typename Mat,typename MatRet>
33
34
35
36
37
38
39
40
41
42
43
44
    static void se3Action(const SE3 & m,
                          const Eigen::MatrixBase<Mat> & iF,
                          Eigen::MatrixBase<MatRet> const & jF);
    
    ///
    /// \brief Inverse SE3 action on a set of forces, represented by a 6xN matrix whose each
    ///        column represent a spatial force.
    ///
    template<typename Mat,typename MatRet>
    static void se3ActionInverse(const SE3 & m,
                                 const Eigen::MatrixBase<Mat> & iF,
                                 Eigen::MatrixBase<MatRet> const & jF);
45
46
47
48
49
    
    ///
    /// \brief Action of a motion on a set of forces, represented by a 6xN matrix whose each
    ///        column represent a spatial force.
    ///
50
    template<typename MotionDerived, typename Mat,typename MatRet>
51
    static void motionAction(const MotionDense<MotionDerived> & v,
52
53
                             const Eigen::MatrixBase<Mat> & iF,
                             Eigen::MatrixBase<MatRet> const & jF);
Nicolas Mansard's avatar
Nicolas Mansard committed
54
55
56
57
  }  // namespace forceSet

  namespace motionSet
  {
58
    ///
59
    /// \brief SE3 action on a set of motions, represented by a 6xN matrix whose
60
61
    ///        column represent a spatial motion.
    ///
Nicolas Mansard's avatar
Nicolas Mansard committed
62
    template<typename Mat,typename MatRet>
63
64
65
66
67
    static void se3Action(const SE3 & m,
                          const Eigen::MatrixBase<Mat> & iV,
                          Eigen::MatrixBase<MatRet> const & jV);
    
    ///
68
    /// \brief Inverse SE3 action on a set of motions, represented by a 6xN matrix whose
69
70
71
72
73
74
    ///        column represent a spatial motion.
    ///
    template<typename Mat,typename MatRet>
    static void se3ActionInverse(const SE3 & m,
                                 const Eigen::MatrixBase<Mat> & iV,
                                 Eigen::MatrixBase<MatRet> const & jV);
75
76
    
    ///
77
78
    /// \brief Action of a motion on a set of motions, represented by a 6xN matrix whose
    ///        columns represent a spatial motion.
79
    ///
80
    template<typename MotionDerived, typename Mat,typename MatRet>
81
    static void motionAction(const MotionDense<MotionDerived> & v,
82
83
                             const Eigen::MatrixBase<Mat> & iF,
                             Eigen::MatrixBase<MatRet> const & jF);
84
85
86
87
88
89
90
91
92
    
    ///
    /// \brief Action of an Inertia matrix on a set of motions, represented by a 6xN matrix whose
    ///        columns represent a spatial motion.
    ///
    template<typename Scalar, int Options, typename Mat,typename MatRet>
    static void inertiaAction(const InertiaTpl<Scalar,Options> & I,
                              const Eigen::MatrixBase<Mat> & iF,
                              Eigen::MatrixBase<MatRet> const & jF);
Nicolas Mansard's avatar
Nicolas Mansard committed
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  }  // namespace MotionSet

  /* --- DETAILS --------------------------------------------------------- */

  namespace internal 
  {

    template<typename Mat,typename MatRet, int NCOLS>
    struct ForceSetSe3Action
    {
      /* Compute jF = jXi * iF, where jXi is the dual action matrix associated
       * with m, and iF, jF are matrices whose columns are forces. The resolution
       * is done by block operation. It is less efficient than the colwise
       * operation and should not be used. */ 
107
108
109
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF);
Nicolas Mansard's avatar
Nicolas Mansard committed
110
      
111
112
113
114
115
116
117
    };
    
    template<typename MotionDerived, typename Mat,typename MatRet, int NCOLS>
    struct ForceSetMotionAction
    {
      /* Compute dF = v ^ F, where  is the dual action operation associated
       * with v, and F, dF are matrices whose columns are forces. */
118
      static void run(const MotionDense<MotionDerived> & v,
119
120
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF);
Nicolas Mansard's avatar
Nicolas Mansard committed
121
122
123
124
125
126
127
128
      
    };

    template<typename Mat,typename MatRet>
    struct ForceSetSe3Action<Mat,MatRet,1>
    {
      /* Compute jF = jXi * iF, where jXi is the dual action matrix associated with m,
       * and iF, jF are vectors. */
129
130
131
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF)
Nicolas Mansard's avatar
Nicolas Mansard committed
132
      { 
133
134
135
136
137
138
139
140
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        Eigen::VectorBlock<const Mat,3> linear = iF.template head<3>();
        Eigen::VectorBlock<const Mat,3> angular = iF.template tail<3>();
        
        const_cast<Eigen::MatrixBase<MatRet> &>(jF).template head <3>() = m.rotation()*linear;
        const_cast<Eigen::MatrixBase<MatRet> &>(jF).template tail <3>() = (m.translation().cross(jF.template head<3>())
                                  + m.rotation()*angular);
Nicolas Mansard's avatar
Nicolas Mansard committed
141
      }
142
143
144
145
146
    };
    
    template<typename MotionDerived, typename Mat, typename MatRet>
    struct ForceSetMotionAction<MotionDerived,Mat,MatRet,1>
    {
147
      static void run(const MotionDense<MotionDerived> & v,
148
149
150
151
152
153
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF)
      {
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        
154
155
156
157
        typedef ForceRef<Mat> ForceRefOnMat;
        typedef ForceRef<MatRet> ForceRefOnMatRet;
        ForceRefOnMatRet fout(const_cast<Eigen::MatrixBase<MatRet> &>(jF).derived());
        ForceRefOnMat(iF.derived()).motionAction(v,fout);
158
      }
Nicolas Mansard's avatar
Nicolas Mansard committed
159
160
161
162
163
164
165
    };

    /* Specialized implementation of block action, using colwise operation.  It
     * is empirically much faster than the true block operation, although I do
     * not understand why. */
    template<typename Mat,typename MatRet,int NCOLS>
    void ForceSetSe3Action<Mat,MatRet,NCOLS>::
166
167
168
    run(const SE3 & m,
        const Eigen::MatrixBase<Mat> & iF,
        Eigen::MatrixBase<MatRet> const & jF)
Nicolas Mansard's avatar
Nicolas Mansard committed
169
170
    {
      for(int col=0;col<jF.cols();++col) 
171
172
173
174
175
      {
        typename MatRet::ColXpr jFc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jF).col(col);
        forceSet::se3Action(m,iF.col(col),jFc);
      }
Nicolas Mansard's avatar
Nicolas Mansard committed
176
    }
177
    
178
179
    template<typename MotionDerived, typename Mat,typename MatRet,int NCOLS>
    void ForceSetMotionAction<MotionDerived,Mat,MatRet,NCOLS>::
180
    run(const MotionDense<MotionDerived> & v,
181
182
183
184
185
186
187
        const Eigen::MatrixBase<Mat> & iF,
        Eigen::MatrixBase<MatRet> const & jF)
    {
      for(int col=0;col<jF.cols();++col)
      {
        typename MatRet::ColXpr jFc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jF).col(col);
188
        forceSet::motionAction(v,iF.col(col),jFc);
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
    
    template<typename Mat,typename MatRet, int NCOLS>
    struct ForceSetSe3ActionInverse
    {
      /* Compute jF = jXi * iF, where jXi is the dual action matrix associated
       * with m, and iF, jF are matrices whose columns are forces. The resolution
       * is done by block operation. It is less efficient than the colwise
       * operation and should not be used. */
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF);
      
    };
    
    template<typename Mat,typename MatRet>
    struct ForceSetSe3ActionInverse<Mat,MatRet,1>
    {
      /* Compute jF = jXi * iF, where jXi is the dual action matrix associated with m,
       * and iF, jF are vectors. */
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF)
      {
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        Eigen::VectorBlock<const Mat,3> linear = iF.template head<3>();
        Eigen::VectorBlock<const Mat,3> angular = iF.template tail<3>();
        
        const_cast<Eigen::MatrixBase<MatRet> &>(jF).template head <3>()
        = angular - m.translation().cross(linear); // use as temporary variable (TODO: check performance gains)
        const_cast<Eigen::MatrixBase<MatRet> &>(jF).template tail <3>()
        = m.rotation().transpose()* jF.template head <3>();
        const_cast<Eigen::MatrixBase<MatRet> &>(jF).template head <3>()
        = m.rotation().transpose()*linear;
      }
      
    };
    
    /* Specialized implementation of block action, using colwise operation.  It
     * is empirically much faster than the true block operation, although I do
     * not understand why. */
    template<typename Mat,typename MatRet,int NCOLS>
    void ForceSetSe3ActionInverse<Mat,MatRet,NCOLS>::
    run(const SE3 & m,
        const Eigen::MatrixBase<Mat> & iF,
        Eigen::MatrixBase<MatRet> const & jF)
    {
      for(int col=0;col<jF.cols();++col)
      {
        typename MatRet::ColXpr jFc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jF).col(col);
        forceSet::se3ActionInverse(m,iF.col(col),jFc);
      }
    }
Nicolas Mansard's avatar
Nicolas Mansard committed
245
246
247
248
249
250

  } // namespace internal

  namespace forceSet
  {
    template<typename Mat,typename MatRet>
251
    static void se3Action(const SE3 & m,
252
253
                          const Eigen::MatrixBase<Mat> & iF,
                          Eigen::MatrixBase<MatRet> const & jF)
Nicolas Mansard's avatar
Nicolas Mansard committed
254
255
256
    {
      internal::ForceSetSe3Action<Mat,MatRet,Mat::ColsAtCompileTime>::run(m,iF,jF);
    }
257
    
258
259
260
261
262
263
264
265
    template<typename Mat,typename MatRet>
    static void se3ActionInverse(const SE3 & m,
                                 const Eigen::MatrixBase<Mat> & iF,
                                 Eigen::MatrixBase<MatRet> const & jF)
    {
      internal::ForceSetSe3ActionInverse<Mat,MatRet,Mat::ColsAtCompileTime>::run(m,iF,jF);
    }
    
266
    template<typename MotionDerived, typename Mat,typename MatRet>
267
    static void motionAction(const MotionDense<MotionDerived> & v,
268
269
                             const Eigen::MatrixBase<Mat> & iF,
                             Eigen::MatrixBase<MatRet> const & jF)
270
    {
271
      internal::ForceSetMotionAction<MotionDerived,Mat,MatRet,Mat::ColsAtCompileTime>::run(v,iF,jF);
272
    }
Nicolas Mansard's avatar
Nicolas Mansard committed
273
274
275
276
277
278
279
280
281
282
283

  }  // namespace forceSet


  namespace internal 
  {

    template<typename Mat,typename MatRet, int NCOLS>
    struct MotionSetSe3Action
    {
      /* Compute jF = jXi * iF, where jXi is the action matrix associated
284
       * with m, and iF, jF are matrices whose columns are motions. */
285
286
287
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF);
Nicolas Mansard's avatar
Nicolas Mansard committed
288
      
289
    };
Nicolas Mansard's avatar
Nicolas Mansard committed
290
291
292
293
294
295

    template<typename Mat,typename MatRet>
    struct MotionSetSe3Action<Mat,MatRet,1>
    {
      /* Compute jV = jXi * iV, where jXi is the action matrix associated with m,
       * and iV, jV are 6D vectors representing spatial velocities. */
296
297
298
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV)
Nicolas Mansard's avatar
Nicolas Mansard committed
299
      { 
300
301
302
303
304
305
306
307
308
309
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        Eigen::VectorBlock<const Mat,3> linear = iV.template head<3>();
        Eigen::VectorBlock<const Mat,3> angular = iV.template tail<3>();
        
        /* ( R*v + px(Rw),  Rw ) */
        const_cast<Eigen::MatrixBase<MatRet> &>(jV).template tail <3>()
        = m.rotation()*angular;
        const_cast<Eigen::MatrixBase<MatRet> &>(jV).template head <3>()
        = (m.translation().cross(jV.template tail<3>()) + m.rotation()*linear);
Nicolas Mansard's avatar
Nicolas Mansard committed
310
      }
311
312
    };
    
Nicolas Mansard's avatar
Nicolas Mansard committed
313
314
315
316
317
    /* Specialized implementation of block action, using colwise operation.  It
     * is empirically much faster than the true block operation, although I do
     * not understand why. */
    template<typename Mat,typename MatRet,int NCOLS>
    void MotionSetSe3Action<Mat,MatRet,NCOLS>::
318
319
320
    run(const SE3 & m,
        const Eigen::MatrixBase<Mat> & iV,
        Eigen::MatrixBase<MatRet> const & jV)
Nicolas Mansard's avatar
Nicolas Mansard committed
321
    {
322
323
324
325
326
327
      for(int col=0;col<jV.cols();++col)
      {
        typename MatRet::ColXpr jVc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jV).col(col);
        motionSet::se3Action(m,iV.col(col),jVc);
      }
Nicolas Mansard's avatar
Nicolas Mansard committed
328
    }
329
    
330
331
332
333
334
335
336
337
338
339
340
    template<typename MotionDerived, typename Mat,typename MatRet, int NCOLS>
    struct MotionSetMotionAction
    {
      /* Compute dV = v ^ V, where  is the action operation associated
       * with v, and V, dV are matrices whose columns are motions. */
      static void run(const MotionDense<MotionDerived> & v,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV);
      
    };
    
341
342
    template<typename MotionDerived, typename Mat,typename MatRet,int NCOLS>
    void MotionSetMotionAction<MotionDerived,Mat,MatRet,NCOLS>::
343
    run(const MotionDense<MotionDerived> & v,
344
345
346
347
348
349
350
        const Eigen::MatrixBase<Mat> & iV,
        Eigen::MatrixBase<MatRet> const & jV)
    {
      for(int col=0;col<jV.cols();++col)
      {
        typename MatRet::ColXpr jVc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jV).col(col);
351
        motionSet::motionAction(v,iV.col(col),jVc);
352
353
      }
    }
354
    
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
    template<typename MotionDerived, typename Mat,typename MatRet>
    struct MotionSetMotionAction<MotionDerived,Mat,MatRet,1>
    {
      static void run(const MotionDense<MotionDerived> & v,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV)
      {
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        
        typedef MotionRef<Mat> MotionRefOnMat;
        typedef MotionRef<MatRet> MotionRefOnMatRet;
        MotionRefOnMatRet mout(const_cast<Eigen::MatrixBase<MatRet> &>(jV).derived());
        MotionRefOnMat(iV.derived()).motionAction(v,mout);
      }
    };
    
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    template<typename Mat,typename MatRet, int NCOLS>
    struct MotionSetSe3ActionInverse
    {
      /* Compute jF = jXi * iF, where jXi is the action matrix associated
       * with m, and iF, jF are matrices whose columns are motions. The resolution
       * is done by block operation. It is less efficient than the colwise
       * operation and should not be used. */
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iF,
                      Eigen::MatrixBase<MatRet> const & jF);
      
    };
    
    template<typename Mat,typename MatRet>
    struct MotionSetSe3ActionInverse<Mat,MatRet,1>
    {
      /* Compute jV = jXi * iV, where jXi is the action matrix associated with m,
       * and iV, jV are 6D vectors representing spatial velocities. */
      static void run(const SE3 & m,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV)
      {
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        Eigen::VectorBlock<const Mat,3> linear = iV.template head<3>();
        Eigen::VectorBlock<const Mat,3> angular = iV.template tail<3>();
        
        const_cast<Eigen::MatrixBase<MatRet> &>(jV).template tail <3>()
        = linear - m.translation().cross(angular); // use as temporary variable
        const_cast<Eigen::MatrixBase<MatRet> &>(jV).template head <3>()
        = m.rotation().transpose()*jV.template tail<3>();
        const_cast<Eigen::MatrixBase<MatRet> &>(jV).template tail <3>()
        = m.rotation().transpose()*angular;
      }
    };
    
    /* Specialized implementation of block action, using colwise operation.  It
     * is empirically much faster than the true block operation, although I do
     * not understand why. */
    template<typename Mat,typename MatRet,int NCOLS>
    void MotionSetSe3ActionInverse<Mat,MatRet,NCOLS>::
    run(const SE3 & m,
        const Eigen::MatrixBase<Mat> & iV,
        Eigen::MatrixBase<MatRet> const & jV)
    {
      for(int col=0;col<jV.cols();++col)
      {
        typename MatRet::ColXpr jVc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jV).col(col);
        motionSet::se3ActionInverse(m,iV.col(col),jVc);
      }
    }
    
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
    template<typename Scalar, int Options, typename Mat,typename MatRet, int NCOLS>
    struct MotionSetInertiaAction
    {
      /* Compute dV = v ^ V, where  is the action operation associated
       * with v, and V, dV are matrices whose columns are motions. */
      static void run(const InertiaTpl<Scalar,Options> & I,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV);
      
    };
    
    template<typename Scalar, int Options, typename Mat,typename MatRet,int NCOLS>
    void MotionSetInertiaAction<Scalar,Options,Mat,MatRet,NCOLS>::
    run(const InertiaTpl<Scalar,Options> & I,
        const Eigen::MatrixBase<Mat> & iV,
        Eigen::MatrixBase<MatRet> const & jV)
    {
      for(int col=0;col<jV.cols();++col)
      {
        typename MatRet::ColXpr jVc
        = const_cast<Eigen::MatrixBase<MatRet> &>(jV).col(col);
        motionSet::inertiaAction(I,iV.col(col),jVc);
      }
    }
    
    template<typename Scalar, int Options, typename Mat,typename MatRet>
    struct MotionSetInertiaAction<Scalar,Options,Mat,MatRet,1>
    {
      static void run(const InertiaTpl<Scalar,Options> & I,
                      const Eigen::MatrixBase<Mat> & iV,
                      Eigen::MatrixBase<MatRet> const & jV)
      {
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(Mat);
        EIGEN_STATIC_ASSERT_VECTOR_ONLY(MatRet);
        
        typedef MotionRef<Mat> MotionRefOnMat;
        typedef ForceRef<MatRet> ForceRefOnMatRet;
        ForceRefOnMatRet fout(const_cast<Eigen::MatrixBase<MatRet> &>(jV).derived());
        I.__mult__(MotionRefOnMat(iV.derived()),fout);
      }
    };
466
    
Nicolas Mansard's avatar
Nicolas Mansard committed
467
468
469
470
471
472

  } // namespace internal

  namespace motionSet
  {
    template<typename Mat,typename MatRet>
473
474
475
    static void se3Action(const SE3 & m,
                          const Eigen::MatrixBase<Mat> & iV,
                          Eigen::MatrixBase<MatRet> const & jV)
Nicolas Mansard's avatar
Nicolas Mansard committed
476
477
478
    {
      internal::MotionSetSe3Action<Mat,MatRet,Mat::ColsAtCompileTime>::run(m,iV,jV);
    }
479
    
480
481
    template<typename Mat,typename MatRet>
    static void se3ActionInverse(const SE3 & m,
482
483
                                 const Eigen::MatrixBase<Mat> & iV,
                                 Eigen::MatrixBase<MatRet> const & jV)
484
485
486
487
    {
      internal::MotionSetSe3ActionInverse<Mat,MatRet,Mat::ColsAtCompileTime>::run(m,iV,jV);
    }
    
488
    template<typename MotionDerived, typename Mat,typename MatRet>
489
    static void motionAction(const MotionDense<MotionDerived> & v,
490
491
                             const Eigen::MatrixBase<Mat> & iV,
                             Eigen::MatrixBase<MatRet> const & jV)
492
    {
493
      internal::MotionSetMotionAction<MotionDerived,Mat,MatRet,Mat::ColsAtCompileTime>::run(v,iV,jV);
494
    }
495
496
497
498
499
500
501
502
    
    template<typename Scalar, int Options, typename Mat,typename MatRet>
    static void inertiaAction(const InertiaTpl<Scalar,Options> & I,
                              const Eigen::MatrixBase<Mat> & iV,
                              Eigen::MatrixBase<MatRet> const & jV)
    {
      internal::MotionSetInertiaAction<Scalar,Options,Mat,MatRet,Mat::ColsAtCompileTime>::run(I,iV,jV);
    }
Nicolas Mansard's avatar
Nicolas Mansard committed
503
504
505
506
507
508
509

  }  // namespace motionSet


} // namespace se3

#endif // ifndef __se3_act_on_set_hpp__