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