hpp-pinocchio  4.14.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
liegroup.hh
Go to the documentation of this file.
1 // Copyright (c) 2017, Joseph Mirabel
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // 1. Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in the
14 // documentation and/or other materials provided with the distribution.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27 // DAMAGE.
28 
29 #ifndef HPP_PINOCCHIO_LIEGROUP_HH
30 #define HPP_PINOCCHIO_LIEGROUP_HH
31 
32 #include <pinocchio/multibody/joint/fwd.hpp>
33 // #include <pinocchio/multibody/liegroup/liegroup.hpp>
34 
40 
41 namespace hpp {
42 namespace pinocchio {
43 typedef ::pinocchio::JointModelCompositeTpl<value_type, 0, JointCollectionTpl>
45 
53  template <typename JointModel>
54  struct operation {};
55 };
58 
66  template <typename JointModel>
67  struct operation {};
68 };
69 
71 //---------------- RnxSOnLieGroupMap -------------------------------//
72 // JointModelRevolute, JointModelRevoluteUnbounded, JointModelRevoluteUnaligned,
73 // JointModelRevoluteUnboundedUnaligned
74 template <typename Scalar, int Options, int Axis>
76  ::pinocchio::JointModelRevoluteTpl<Scalar, Options, Axis> > {
78 };
79 template <typename Scalar, int Options, int Axis>
80 struct RnxSOnLieGroupMap::operation<
81  ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, Axis> > {
82  typedef liegroup::SpecialOrthogonalOperation<2> type;
83 };
84 template <typename Scalar, int Options>
85 struct RnxSOnLieGroupMap::operation<
86  ::pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options> > {
87  typedef liegroup::VectorSpaceOperation<1, true> type;
88 };
89 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
90 template <typename Scalar, int Options>
91 struct RnxSOnLieGroupMap::operation<
92  ::pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options> > {
93  typedef liegroup::SpecialOrthogonalOperation<2> type;
94 };
95 #endif
96 
97 // JointModelPrismaticTpl, JointModelPrismaticUnaligned, JointModelTranslation
98 template <typename Scalar, int Options, int Axis>
99 struct RnxSOnLieGroupMap::operation<
100  ::pinocchio::JointModelPrismaticTpl<Scalar, Options, Axis> > {
101  typedef liegroup::VectorSpaceOperation<1, false> type;
102 };
103 template <typename Scalar, int Options>
104 struct RnxSOnLieGroupMap::operation<
105  ::pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options> > {
106  typedef liegroup::VectorSpaceOperation<1, false> type;
107 };
108 template <typename Scalar, int Options>
109 struct RnxSOnLieGroupMap::operation<
110  ::pinocchio::JointModelTranslationTpl<Scalar, Options> > {
111  typedef liegroup::VectorSpaceOperation<3, false> type;
112 };
113 
114 // JointModelSpherical, JointModelSphericalZYX,
115 template <typename Scalar, int Options>
116 struct RnxSOnLieGroupMap::operation<
117  ::pinocchio::JointModelSphericalTpl<Scalar, Options> > {
118  typedef liegroup::SpecialOrthogonalOperation<3> type;
119 };
120 template <typename Scalar, int Options>
121 struct RnxSOnLieGroupMap::operation<
122  ::pinocchio::JointModelSphericalZYXTpl<Scalar, Options> > {
123  typedef liegroup::VectorSpaceOperation<3, true> type;
124 };
125 
126 // JointModelFreeFlyer, JointModelPlanar
127 template <typename Scalar, int Options>
128 struct RnxSOnLieGroupMap::operation<
129  ::pinocchio::JointModelFreeFlyerTpl<Scalar, Options> > {
130  typedef liegroup::CartesianProductOperation<
131  liegroup::VectorSpaceOperation<3, false>,
132  liegroup::SpecialOrthogonalOperation<3> >
133  type;
134 };
135 template <typename Scalar, int Options>
136 struct RnxSOnLieGroupMap::operation<
137  ::pinocchio::JointModelPlanarTpl<Scalar, Options> > {
138  typedef liegroup::CartesianProductOperation<
139  liegroup::VectorSpaceOperation<2, false>,
140  liegroup::SpecialOrthogonalOperation<2> >
141  type;
142 };
143 
144 //---------------- DefaultLieGroupMap ------------------------------------//
145 
146 // JointModelRevolute, JointModelRevoluteUnbounded, JointModelRevoluteUnaligned,
147 // JointModelRevoluteUnboundedUnaligned
148 template <typename Scalar, int Options, int Axis>
149 struct DefaultLieGroupMap::operation<
150  ::pinocchio::JointModelRevoluteTpl<Scalar, Options, Axis> > {
151  typedef liegroup::VectorSpaceOperation<1, true> type;
152 };
153 template <typename Scalar, int Options, int Axis>
154 struct DefaultLieGroupMap::operation<
155  ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, Axis> > {
156  typedef liegroup::SpecialOrthogonalOperation<2> type;
157 };
158 template <typename Scalar, int Options>
159 struct DefaultLieGroupMap::operation<
160  ::pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options> > {
161  typedef liegroup::VectorSpaceOperation<1, true> type;
162 };
163 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
164 template <typename Scalar, int Options>
165 struct DefaultLieGroupMap::operation<
166  ::pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options> > {
167  typedef liegroup::SpecialOrthogonalOperation<2> type;
168 };
169 #endif
170 
171 // JointModelPrismaticTpl, JointModelPrismaticUnaligned, JointModelTranslation
172 template <typename Scalar, int Options, int Axis>
173 struct DefaultLieGroupMap::operation<
174  ::pinocchio::JointModelPrismaticTpl<Scalar, Options, Axis> > {
175  typedef liegroup::VectorSpaceOperation<1, false> type;
176 };
177 template <typename Scalar, int Options>
178 struct DefaultLieGroupMap::operation<
179  ::pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options> > {
180  typedef liegroup::VectorSpaceOperation<1, false> type;
181 };
182 template <typename Scalar, int Options>
183 struct DefaultLieGroupMap::operation<
184  ::pinocchio::JointModelTranslationTpl<Scalar, Options> > {
185  typedef liegroup::VectorSpaceOperation<3, false> type;
186 };
187 
188 // JointModelSpherical, JointModelSphericalZYX,
189 template <typename Scalar, int Options>
190 struct DefaultLieGroupMap::operation<
191  ::pinocchio::JointModelSphericalTpl<Scalar, Options> > {
192  typedef liegroup::SpecialOrthogonalOperation<3> type;
193 };
194 template <typename Scalar, int Options>
195 struct DefaultLieGroupMap::operation<
196  ::pinocchio::JointModelSphericalZYXTpl<Scalar, Options> > {
197  typedef liegroup::VectorSpaceOperation<3, true> type;
198 };
199 
200 // JointModelFreeFlyer, JointModelPlanar
201 template <typename Scalar, int Options>
202 struct DefaultLieGroupMap::operation<
203  ::pinocchio::JointModelFreeFlyerTpl<Scalar, Options> > {
204  typedef liegroup::SpecialEuclideanOperation<3> type;
205 };
206 template <typename Scalar, int Options>
207 struct DefaultLieGroupMap::operation<
208  ::pinocchio::JointModelPlanarTpl<Scalar, Options> > {
209  typedef liegroup::SpecialEuclideanOperation<2> type;
210 };
212 } // namespace pinocchio
213 } // namespace hpp
214 
215 #endif // HPP_PINOCCHIO_LIEGROUP_HH
::pinocchio::JointModelCompositeTpl< value_type, 0, JointCollectionTpl > JointModelComposite
Definition: liegroup.hh:44
RnxSOnLieGroupMap LieGroupTpl HPP_PINOCCHIO_DEPRECATED
Definition: liegroup.hh:57
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: liegroup.hh:65
Definition: liegroup.hh:52