pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
joint-collection.hpp
1 //
2 // Copyright (c) 2018-2019 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_joint_collection_hpp__
6 #define __pinocchio_joint_collection_hpp__
7 
8 #include "pinocchio/multibody/joint/fwd.hpp"
9 #include "pinocchio/multibody/joint/joints.hpp"
10 
11 #include <boost/variant.hpp>
12 #include <boost/variant/recursive_wrapper.hpp>
13 
14 namespace pinocchio
15 {
16 
17  template<typename _Scalar, int _Options>
18  struct JointCollectionDefaultTpl
19  {
20  typedef _Scalar Scalar;
21  enum { Options = _Options };
22 
23  // Joint Revolute
24  typedef JointModelRevoluteTpl<Scalar,Options,0> JointModelRX;
25  typedef JointModelRevoluteTpl<Scalar,Options,1> JointModelRY;
26  typedef JointModelRevoluteTpl<Scalar,Options,2> JointModelRZ;
27 
28  typedef JointModelMimic<JointModelRX> JointModelMimicRX;
29  typedef JointModelMimic<JointModelRY> JointModelMimicRY;
30  typedef JointModelMimic<JointModelRZ> JointModelMimicRZ;
31 
32  // Joint Revolute Unaligned
33  typedef JointModelRevoluteUnalignedTpl<Scalar,Options> JointModelRevoluteUnaligned;
34 
35  // Joint Revolute UBounded
36  typedef JointModelRevoluteUnboundedTpl<Scalar,Options,0> JointModelRUBX;
37  typedef JointModelRevoluteUnboundedTpl<Scalar,Options,1> JointModelRUBY;
38  typedef JointModelRevoluteUnboundedTpl<Scalar,Options,2> JointModelRUBZ;
39 
40  // Joint Revolute Unbounded Unaligned
41  typedef JointModelRevoluteUnboundedUnalignedTpl<Scalar,Options> JointModelRevoluteUnboundedUnaligned;
42 
43  // Joint Prismatic
44  typedef JointModelPrismaticTpl<Scalar,Options,0> JointModelPX;
45  typedef JointModelPrismaticTpl<Scalar,Options,1> JointModelPY;
46  typedef JointModelPrismaticTpl<Scalar,Options,2> JointModelPZ;
47 
48  // Joint Prismatic Unaligned
49  typedef JointModelPrismaticUnalignedTpl<Scalar,Options> JointModelPrismaticUnaligned;
50 
51  // Joint Spherical
52  typedef JointModelSphericalTpl<Scalar,Options> JointModelSpherical;
53 
54  // Joint Spherical ZYX
55  typedef JointModelSphericalZYXTpl<Scalar,Options> JointModelSphericalZYX;
56 
57  // Joint Translation
58  typedef JointModelTranslationTpl<Scalar,Options> JointModelTranslation;
59 
60  // Joint FreeFlyer
61  typedef JointModelFreeFlyerTpl<Scalar,Options> JointModelFreeFlyer;
62 
63  // Joint Planar
64  typedef JointModelPlanarTpl<Scalar,Options> JointModelPlanar;
65 
66  // Joint Composite
67  typedef JointModelCompositeTpl<Scalar,Options,::pinocchio::JointCollectionDefaultTpl> JointModelComposite;
68 
69  typedef boost::variant<
70 // JointModelVoid,
71  JointModelRX, JointModelRY, JointModelRZ
72  , JointModelMimicRX, JointModelMimicRY, JointModelMimicRZ
73  , JointModelFreeFlyer, JointModelPlanar
74  , JointModelRevoluteUnaligned
75  , JointModelSpherical, JointModelSphericalZYX
76  , JointModelPX, JointModelPY, JointModelPZ
77  , JointModelPrismaticUnaligned
78  , JointModelTranslation
79  , JointModelRUBX, JointModelRUBY, JointModelRUBZ
80  , JointModelRevoluteUnboundedUnaligned
81  , boost::recursive_wrapper<JointModelComposite>
82  > JointModelVariant;
83 
84 
85  // Joint Revolute
86  typedef JointDataRevoluteTpl<Scalar,Options,0> JointDataRX;
87  typedef JointDataRevoluteTpl<Scalar,Options,1> JointDataRY;
88  typedef JointDataRevoluteTpl<Scalar,Options,2> JointDataRZ;
89 
90  typedef JointDataMimic<JointDataRX> JointDataMimicRX;
91  typedef JointDataMimic<JointDataRY> JointDataMimicRY;
92  typedef JointDataMimic<JointDataRZ> JointDataMimicRZ;
93 
94  // Joint Revolute Unaligned
95  typedef JointDataRevoluteUnalignedTpl<Scalar,Options> JointDataRevoluteUnaligned;
96 
97  // Joint Revolute Unaligned
98  typedef JointDataRevoluteUnboundedUnalignedTpl<Scalar,Options> JointDataRevoluteUnboundedUnaligned;
99 
100  // Joint Revolute UBounded
101  typedef JointDataRevoluteUnboundedTpl<Scalar,Options,0> JointDataRUBX;
102  typedef JointDataRevoluteUnboundedTpl<Scalar,Options,1> JointDataRUBY;
103  typedef JointDataRevoluteUnboundedTpl<Scalar,Options,2> JointDataRUBZ;
104 
105  // Joint Prismatic
106  typedef JointDataPrismaticTpl<Scalar,Options,0> JointDataPX;
107  typedef JointDataPrismaticTpl<Scalar,Options,1> JointDataPY;
108  typedef JointDataPrismaticTpl<Scalar,Options,2> JointDataPZ;
109 
110  // Joint Prismatic Unaligned
111  typedef JointDataPrismaticUnalignedTpl<Scalar,Options> JointDataPrismaticUnaligned;
112 
113  // Joint Spherical
114  typedef JointDataSphericalTpl<Scalar,Options> JointDataSpherical;
115 
116  // Joint Spherical ZYX
117  typedef JointDataSphericalZYXTpl<Scalar,Options> JointDataSphericalZYX;
118 
119  // Joint Translation
120  typedef JointDataTranslationTpl<Scalar,Options> JointDataTranslation;
121 
122  // Joint FreeFlyer
123  typedef JointDataFreeFlyerTpl<Scalar,Options> JointDataFreeFlyer;
124 
125  // Joint Planar
126  typedef JointDataPlanarTpl<Scalar,Options> JointDataPlanar;
127 
128  // Joint Composite
129  typedef JointDataCompositeTpl<Scalar,Options,::pinocchio::JointCollectionDefaultTpl> JointDataComposite;
130 
131  typedef boost::variant<
132 // JointDataVoid
133  JointDataRX, JointDataRY, JointDataRZ
134  , JointDataMimicRX, JointDataMimicRY, JointDataMimicRZ
135  , JointDataFreeFlyer, JointDataPlanar
136  , JointDataRevoluteUnaligned
137  , JointDataSpherical, JointDataSphericalZYX
138  , JointDataPX, JointDataPY, JointDataPZ
139  , JointDataPrismaticUnaligned
140  , JointDataTranslation
141  , JointDataRUBX, JointDataRUBY, JointDataRUBZ
142  , JointDataRevoluteUnboundedUnaligned
143  , boost::recursive_wrapper<JointDataComposite>
144  > JointDataVariant;
145 
146  };
147 
148  typedef JointCollectionDefault::JointModelVariant JointModelVariant;
149  typedef JointCollectionDefault::JointDataVariant JointDataVariant;
150 
151 } // namespace pinocchio
152 
153 #endif // ifndef __pinocchio_joint_collection_hpp__
Main pinocchio namespace.
Definition: treeview.dox:24