hpp-pinocchio  4.14.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
joint-collection.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2018 CNRS
3 // Author: Joseph Mirabel
4 //
5 //
6 
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are
9 // met:
10 //
11 // 1. Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //
14 // 2. Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
29 // DAMAGE.
30 
31 #ifndef HPP_PINOCCHIO_JOINT_COLLECTION_HH
32 #define HPP_PINOCCHIO_JOINT_COLLECTION_HH
33 
34 #include <boost/variant.hpp>
35 #include <boost/variant/recursive_wrapper.hpp>
36 
37 #include "pinocchio/multibody/joint/fwd.hpp"
38 #include "pinocchio/multibody/joint/joint-free-flyer.hpp"
39 #include "pinocchio/multibody/joint/joint-planar.hpp"
40 #include "pinocchio/multibody/joint/joint-prismatic.hpp"
41 #include "pinocchio/multibody/joint/joint-revolute-unaligned.hpp"
42 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
43 #include "pinocchio/multibody/joint/joint-revolute-unbounded-unaligned.hpp"
44 #endif
45 #include "pinocchio/multibody/joint/joint-prismatic-unaligned.hpp"
46 #include "pinocchio/multibody/joint/joint-revolute-unbounded.hpp"
47 #include "pinocchio/multibody/joint/joint-revolute.hpp"
48 //#include "pinocchio/multibody/joint/joint-spherical-ZYX.hpp"
49 //#include "pinocchio/multibody/joint/joint-spherical.hpp"
50 #include "pinocchio/multibody/joint/joint-translation.hpp"
51 
52 namespace hpp {
53 namespace pinocchio {
54 
55 template <typename _Scalar, int _Options>
57  typedef _Scalar Scalar;
58  enum { Options = _Options };
59 
60  // Joint Revolute
61  typedef ::pinocchio::JointModelRevoluteTpl<Scalar, Options, 0> JointModelRX;
62  typedef ::pinocchio::JointModelRevoluteTpl<Scalar, Options, 1> JointModelRY;
63  typedef ::pinocchio::JointModelRevoluteTpl<Scalar, Options, 2> JointModelRZ;
64 
65  // Joint Revolute Unaligned
66  typedef ::pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options>
68 
69  // Joint Revolute UBounded
70  typedef ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, 0>
72  typedef ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, 1>
74  typedef ::pinocchio::JointModelRevoluteUnboundedTpl<Scalar, Options, 2>
76 
77 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
78  // Joint Revolute Unbounded Unaligned
79  typedef ::pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options>
80  JointModelRevoluteUnboundedUnaligned;
81 #endif
82 
83  // Joint Prismatic
84  typedef ::pinocchio::JointModelPrismaticTpl<Scalar, Options, 0> JointModelPX;
85  typedef ::pinocchio::JointModelPrismaticTpl<Scalar, Options, 1> JointModelPY;
86  typedef ::pinocchio::JointModelPrismaticTpl<Scalar, Options, 2> JointModelPZ;
87 
88  // Joint Prismatic Unaligned
89  typedef ::pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options>
91 
92  // Joint Spherical
93  typedef ::pinocchio::JointModelSphericalTpl<Scalar, Options>
95 
96  // Joint Spherical ZYX
97  typedef ::pinocchio::JointModelSphericalZYXTpl<Scalar, Options>
99 
100  // Joint Translation
101  typedef ::pinocchio::JointModelTranslationTpl<Scalar, Options>
103 
104  // Joint FreeFlyer
105  typedef ::pinocchio::JointModelFreeFlyerTpl<Scalar, Options>
107 
108  // Joint Planar
109  typedef ::pinocchio::JointModelPlanarTpl<Scalar, Options> JointModelPlanar;
110 
111  // Joint Composite
112  typedef ::pinocchio::JointModelCompositeTpl<Scalar, Options,
115 
116  typedef boost::variant<
117  // JointModelVoid,
120 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
121  ,
122  JointModelRevoluteUnboundedUnaligned
123 #endif
124  ,
128 
129  // Joint Revolute
130  typedef ::pinocchio::JointDataRevoluteTpl<Scalar, Options, 0> JointDataRX;
131  typedef ::pinocchio::JointDataRevoluteTpl<Scalar, Options, 1> JointDataRY;
132  typedef ::pinocchio::JointDataRevoluteTpl<Scalar, Options, 2> JointDataRZ;
133 
134  // Joint Revolute Unaligned
135  typedef ::pinocchio::JointDataRevoluteUnalignedTpl<Scalar, Options>
137 
138  // Joint Revolute UBounded
139  typedef ::pinocchio::JointDataRevoluteUnboundedTpl<Scalar, Options, 0>
141  typedef ::pinocchio::JointDataRevoluteUnboundedTpl<Scalar, Options, 1>
143  typedef ::pinocchio::JointDataRevoluteUnboundedTpl<Scalar, Options, 2>
145 
146 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
147  // Joint Revolute Unbounded Unaligned
148  typedef ::pinocchio::JointDataRevoluteUnboundedUnalignedTpl<Scalar, Options>
149  JointDataRevoluteUnboundedUnaligned;
150 #endif
151 
152  // Joint Prismatic
153  typedef ::pinocchio::JointDataPrismaticTpl<Scalar, Options, 0> JointDataPX;
154  typedef ::pinocchio::JointDataPrismaticTpl<Scalar, Options, 1> JointDataPY;
155  typedef ::pinocchio::JointDataPrismaticTpl<Scalar, Options, 2> JointDataPZ;
156 
157  // Joint Prismatic Unaligned
158  typedef ::pinocchio::JointDataPrismaticUnalignedTpl<Scalar, Options>
160 
161  // Joint Spherical
162  typedef ::pinocchio::JointDataSphericalTpl<Scalar, Options>
164 
165  // Joint Spherical ZYX
166  typedef ::pinocchio::JointDataSphericalZYXTpl<Scalar, Options>
168 
169  // Joint Translation
170  typedef ::pinocchio::JointDataTranslationTpl<Scalar, Options>
172 
173  // Joint FreeFlyer
174  typedef ::pinocchio::JointDataFreeFlyerTpl<Scalar, Options>
176 
177  // Joint Planar
178  typedef ::pinocchio::JointDataPlanarTpl<Scalar, Options> JointDataPlanar;
179 
180  // Joint Composite
181  typedef ::pinocchio::JointDataCompositeTpl<Scalar, Options,
184 
185  typedef boost::variant<
186  // JointDataVoid
189 #if PINOCCHIO_VERSION_AT_LEAST(2, 1, 5)
190  ,
191  JointDataRevoluteUnboundedUnaligned
192 #endif
193  ,
197 };
198 
201 
202 } // namespace pinocchio
203 } // namespace hpp
204 
205 #endif // HPP_PINOCCHIO_JOINT_COLLECTION_HH
JointCollection::JointModelVariant JointModelVariant
Definition: joint-collection.hh:199
JointCollection::JointDataVariant JointDataVariant
Definition: joint-collection.hh:200
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: joint-collection.hh:56
::pinocchio::JointDataRevoluteUnboundedTpl< Scalar, Options, 2 > JointDataRUBZ
Definition: joint-collection.hh:144
_Scalar Scalar
Definition: joint-collection.hh:57
::pinocchio::JointModelPrismaticTpl< Scalar, Options, 2 > JointModelPZ
Definition: joint-collection.hh:86
::pinocchio::JointDataSphericalTpl< Scalar, Options > JointDataSpherical
Definition: joint-collection.hh:163
::pinocchio::JointModelFreeFlyerTpl< Scalar, Options > JointModelFreeFlyer
Definition: joint-collection.hh:106
::pinocchio::JointDataPrismaticTpl< Scalar, Options, 2 > JointDataPZ
Definition: joint-collection.hh:155
::pinocchio::JointDataPrismaticTpl< Scalar, Options, 1 > JointDataPY
Definition: joint-collection.hh:154
::pinocchio::JointDataRevoluteUnboundedTpl< Scalar, Options, 0 > JointDataRUBX
Definition: joint-collection.hh:140
::pinocchio::JointModelPlanarTpl< Scalar, Options > JointModelPlanar
Definition: joint-collection.hh:109
::pinocchio::JointDataRevoluteUnalignedTpl< Scalar, Options > JointDataRevoluteUnaligned
Definition: joint-collection.hh:136
::pinocchio::JointDataTranslationTpl< Scalar, Options > JointDataTranslation
Definition: joint-collection.hh:171
::pinocchio::JointDataRevoluteTpl< Scalar, Options, 0 > JointDataRX
Definition: joint-collection.hh:130
boost::variant< JointModelRX, JointModelRY, JointModelRZ, JointModelFreeFlyer, JointModelPlanar, JointModelRevoluteUnaligned, JointModelPX, JointModelPY, JointModelPZ, JointModelPrismaticUnaligned, JointModelTranslation, JointModelRUBX, JointModelRUBY, JointModelRUBZ > JointModelVariant
Definition: joint-collection.hh:127
::pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > JointModelRevoluteUnaligned
Definition: joint-collection.hh:67
::pinocchio::JointModelRevoluteTpl< Scalar, Options, 0 > JointModelRX
Definition: joint-collection.hh:61
::pinocchio::JointDataRevoluteTpl< Scalar, Options, 1 > JointDataRY
Definition: joint-collection.hh:131
::pinocchio::JointModelPrismaticTpl< Scalar, Options, 0 > JointModelPX
Definition: joint-collection.hh:84
::pinocchio::JointModelSphericalZYXTpl< Scalar, Options > JointModelSphericalZYX
Definition: joint-collection.hh:98
@ Options
Definition: joint-collection.hh:58
::pinocchio::JointModelRevoluteTpl< Scalar, Options, 1 > JointModelRY
Definition: joint-collection.hh:62
::pinocchio::JointDataPlanarTpl< Scalar, Options > JointDataPlanar
Definition: joint-collection.hh:178
::pinocchio::JointDataPrismaticTpl< Scalar, Options, 0 > JointDataPX
Definition: joint-collection.hh:153
::pinocchio::JointModelRevoluteUnboundedTpl< Scalar, Options, 2 > JointModelRUBZ
Definition: joint-collection.hh:75
::pinocchio::JointModelRevoluteUnboundedTpl< Scalar, Options, 1 > JointModelRUBY
Definition: joint-collection.hh:73
::pinocchio::JointModelCompositeTpl< Scalar, Options, pinocchio::JointCollectionTpl > JointModelComposite
Definition: joint-collection.hh:114
::pinocchio::JointModelPrismaticTpl< Scalar, Options, 1 > JointModelPY
Definition: joint-collection.hh:85
::pinocchio::JointModelRevoluteTpl< Scalar, Options, 2 > JointModelRZ
Definition: joint-collection.hh:63
::pinocchio::JointDataCompositeTpl< Scalar, Options, pinocchio::JointCollectionTpl > JointDataComposite
Definition: joint-collection.hh:183
boost::variant< JointDataRX, JointDataRY, JointDataRZ, JointDataFreeFlyer, JointDataPlanar, JointDataRevoluteUnaligned, JointDataPX, JointDataPY, JointDataPZ, JointDataPrismaticUnaligned, JointDataTranslation, JointDataRUBX, JointDataRUBY, JointDataRUBZ > JointDataVariant
Definition: joint-collection.hh:196
::pinocchio::JointDataSphericalZYXTpl< Scalar, Options > JointDataSphericalZYX
Definition: joint-collection.hh:167
::pinocchio::JointDataRevoluteTpl< Scalar, Options, 2 > JointDataRZ
Definition: joint-collection.hh:132
::pinocchio::JointDataRevoluteUnboundedTpl< Scalar, Options, 1 > JointDataRUBY
Definition: joint-collection.hh:142
::pinocchio::JointModelSphericalTpl< Scalar, Options > JointModelSpherical
Definition: joint-collection.hh:94
::pinocchio::JointDataPrismaticUnalignedTpl< Scalar, Options > JointDataPrismaticUnaligned
Definition: joint-collection.hh:159
::pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > JointModelPrismaticUnaligned
Definition: joint-collection.hh:90
::pinocchio::JointDataFreeFlyerTpl< Scalar, Options > JointDataFreeFlyer
Definition: joint-collection.hh:175
::pinocchio::JointModelTranslationTpl< Scalar, Options > JointModelTranslation
Definition: joint-collection.hh:102
::pinocchio::JointModelRevoluteUnboundedTpl< Scalar, Options, 0 > JointModelRUBX
Definition: joint-collection.hh:71