hpp-pinocchio  6.0.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 
37 #include <pinocchio/multibody/joint/joints.hpp>
38 
39 namespace hpp {
40 namespace pinocchio {
41 
49  template <typename JointModel>
50  struct operation {};
51 };
52 
60  template <typename JointModel>
61  struct operation {};
62 };
63 
65 //---------------- RnxSOnLieGroupMap -------------------------------//
66 // JointModelRevolute, JointModelRevoluteUnbounded, JointModelRevoluteUnaligned,
67 // JointModelRevoluteUnboundedUnaligned
68 template <typename Scalar, int Options, int Axis>
70  ::pinocchio::JointModelRevoluteTpl<Scalar, Options, Axis> > {
72 };
73 template <typename Scalar, int Options, int Axis>
74 struct RnxSOnLieGroupMap::operation<
75  ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, Axis> > {
76  typedef liegroup::SpecialOrthogonalOperation<2> type;
77 };
78 template <typename Scalar, int Options>
79 struct RnxSOnLieGroupMap::operation<
80  ::pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options> > {
81  typedef liegroup::VectorSpaceOperation<1, true> type;
82 };
83 template <typename Scalar, int Options>
84 struct RnxSOnLieGroupMap::operation<
85  ::pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options> > {
86  typedef liegroup::SpecialOrthogonalOperation<2> type;
87 };
88 
89 // JointModelPrismaticTpl, JointModelPrismaticUnaligned, JointModelTranslation
90 template <typename Scalar, int Options, int Axis>
91 struct RnxSOnLieGroupMap::operation<
92  ::pinocchio::JointModelPrismaticTpl<Scalar, Options, Axis> > {
93  typedef liegroup::VectorSpaceOperation<1, false> type;
94 };
95 template <typename Scalar, int Options>
96 struct RnxSOnLieGroupMap::operation<
97  ::pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options> > {
98  typedef liegroup::VectorSpaceOperation<1, false> type;
99 };
100 template <typename Scalar, int Options>
101 struct RnxSOnLieGroupMap::operation<
102  ::pinocchio::JointModelTranslationTpl<Scalar, Options> > {
103  typedef liegroup::VectorSpaceOperation<3, false> type;
104 };
105 
106 // JointModelSpherical, JointModelSphericalZYX,
107 template <typename Scalar, int Options>
108 struct RnxSOnLieGroupMap::operation<
109  ::pinocchio::JointModelSphericalTpl<Scalar, Options> > {
110  typedef liegroup::SpecialOrthogonalOperation<3> type;
111 };
112 template <typename Scalar, int Options>
113 struct RnxSOnLieGroupMap::operation<
114  ::pinocchio::JointModelSphericalZYXTpl<Scalar, Options> > {
115  typedef liegroup::VectorSpaceOperation<3, true> type;
116 };
117 
118 // JointModelFreeFlyer, JointModelPlanar
119 template <typename Scalar, int Options>
120 struct RnxSOnLieGroupMap::operation<
121  ::pinocchio::JointModelFreeFlyerTpl<Scalar, Options> > {
122  typedef liegroup::CartesianProductOperation<
123  liegroup::VectorSpaceOperation<3, false>,
124  liegroup::SpecialOrthogonalOperation<3> >
125  type;
126 };
127 template <typename Scalar, int Options>
128 struct RnxSOnLieGroupMap::operation<
129  ::pinocchio::JointModelPlanarTpl<Scalar, Options> > {
130  typedef liegroup::CartesianProductOperation<
131  liegroup::VectorSpaceOperation<2, false>,
132  liegroup::SpecialOrthogonalOperation<2> >
133  type;
134 };
135 
136 //---------------- DefaultLieGroupMap ------------------------------------//
137 
138 // JointModelRevolute, JointModelRevoluteUnbounded, JointModelRevoluteUnaligned,
139 // JointModelRevoluteUnboundedUnaligned
140 template <typename Scalar, int Options, int Axis>
141 struct DefaultLieGroupMap::operation<
142  ::pinocchio::JointModelRevoluteTpl<Scalar, Options, Axis> > {
143  typedef liegroup::VectorSpaceOperation<1, true> type;
144 };
145 template <typename Scalar, int Options, int Axis>
146 struct DefaultLieGroupMap::operation<
147  ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, Axis> > {
148  typedef liegroup::SpecialOrthogonalOperation<2> type;
149 };
150 template <typename Scalar, int Options>
151 struct DefaultLieGroupMap::operation<
152  ::pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options> > {
153  typedef liegroup::VectorSpaceOperation<1, true> type;
154 };
155 template <typename Scalar, int Options>
156 struct DefaultLieGroupMap::operation<
157  ::pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options> > {
158  typedef liegroup::SpecialOrthogonalOperation<2> type;
159 };
160 
161 // JointModelPrismaticTpl, JointModelPrismaticUnaligned, JointModelTranslation
162 template <typename Scalar, int Options, int Axis>
163 struct DefaultLieGroupMap::operation<
164  ::pinocchio::JointModelPrismaticTpl<Scalar, Options, Axis> > {
165  typedef liegroup::VectorSpaceOperation<1, false> type;
166 };
167 template <typename Scalar, int Options>
168 struct DefaultLieGroupMap::operation<
169  ::pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options> > {
170  typedef liegroup::VectorSpaceOperation<1, false> type;
171 };
172 template <typename Scalar, int Options>
173 struct DefaultLieGroupMap::operation<
174  ::pinocchio::JointModelTranslationTpl<Scalar, Options> > {
175  typedef liegroup::VectorSpaceOperation<3, false> type;
176 };
177 
178 // JointModelSpherical, JointModelSphericalZYX,
179 template <typename Scalar, int Options>
180 struct DefaultLieGroupMap::operation<
181  ::pinocchio::JointModelSphericalTpl<Scalar, Options> > {
182  typedef liegroup::SpecialOrthogonalOperation<3> type;
183 };
184 template <typename Scalar, int Options>
185 struct DefaultLieGroupMap::operation<
186  ::pinocchio::JointModelSphericalZYXTpl<Scalar, Options> > {
187  typedef liegroup::VectorSpaceOperation<3, true> type;
188 };
189 
190 // JointModelFreeFlyer, JointModelPlanar
191 template <typename Scalar, int Options>
192 struct DefaultLieGroupMap::operation<
193  ::pinocchio::JointModelFreeFlyerTpl<Scalar, Options> > {
194  typedef liegroup::SpecialEuclideanOperation<3> type;
195 };
196 template <typename Scalar, int Options>
197 struct DefaultLieGroupMap::operation<
198  ::pinocchio::JointModelPlanarTpl<Scalar, Options> > {
199  typedef liegroup::SpecialEuclideanOperation<2> type;
200 };
201 
203 } // namespace pinocchio
204 } // namespace hpp
205 
206 #endif // HPP_PINOCCHIO_LIEGROUP_HH
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: liegroup.hh:59
Definition: liegroup.hh:48