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