hpp-pinocchio  6.0.0
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
fwd.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 CNRS
3 // Author: NMansard, Joseph Mirabel from Florent Lamiraux
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_FWD_HH
32 #define HPP_PINOCCHIO_FWD_HH
33 
34 #ifndef PINOCCHIO_WITH_HPP_FCL
35 #error "hpp-fcl support in Pinocchio is mandatory."
36 #endif
37 
38 #include <coal/collision_data.h> // DistanceResult
39 
40 #include <Eigen/Core>
41 #include <coal/fwd.hh>
43 #include <hpp/util/pointer.hh>
44 #include <pinocchio/multibody/fwd.hpp>
45 #include <pinocchio/multibody/joint/fwd.hpp>
46 #include <pinocchio/spatial/fwd.hpp>
47 #include <vector>
48 
49 namespace hpp {
50 namespace pinocchio {
51 typedef double value_type;
52 
58 HPP_PREDEF_CLASS(JointConfiguration);
61 class Frame;
62 class AbstractDevice;
63 class DeviceSync;
64 struct DeviceData;
65 
67 enum InOutType { INNER, OUTER };
68 
69 // Pinocchio typedefs
70 template <typename _Scalar, int _Options>
71 struct JointCollectionTpl;
73 
77 typedef ::pinocchio::ModelTpl<value_type, 0, JointCollectionTpl> Model;
78 typedef ::pinocchio::DataTpl<value_type, 0, JointCollectionTpl> Data;
79 typedef ::pinocchio::GeometryModel GeomModel;
80 typedef ::pinocchio::GeometryData GeomData;
83 typedef ::pinocchio::JointModelTpl<value_type, 0, JointCollectionTpl>
85 
86 typedef Eigen::Array<bool, Eigen::Dynamic, 1> ArrayXb;
87 
88 typedef Eigen::Matrix<value_type, Eigen::Dynamic, 1> vector_t;
90 typedef Eigen::Ref<const Configuration_t> ConfigurationIn_t;
91 typedef Eigen::Ref<Configuration_t> ConfigurationOut_t;
92 typedef shared_ptr<Configuration_t> ConfigurationPtr_t HPP_PINOCCHIO_DEPRECATED;
93 typedef Eigen::Ref<const vector_t> vectorIn_t;
94 typedef Eigen::Ref<vector_t> vectorOut_t;
95 typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic> matrix_t;
96 typedef Eigen::Ref<matrix_t> matrixOut_t;
97 typedef matrix_t::Index size_type;
98 typedef Eigen::Matrix<value_type, 3, 3> matrix3_t;
99 typedef Eigen::Matrix<value_type, 3, 1> vector3_t;
100 typedef Eigen::Matrix<value_type, 4, 1> vector4_t;
101 typedef Eigen::Matrix<value_type, 6, Eigen::Dynamic> JointJacobian_t;
102 typedef Eigen::Matrix<value_type, 3, Eigen::Dynamic> ComJacobian_t;
103 typedef Eigen::Block<JointJacobian_t, 3, Eigen::Dynamic> HalfJointJacobian_t;
104 
105 struct JointVector;
106 typedef JointVector JointVector_t;
107 struct ObjectVector;
108 typedef ObjectVector ObjectVector_t;
109 typedef shared_ptr<Body> BodyPtr_t;
110 typedef shared_ptr<const Body> BodyConstPtr_t;
111 using coal::CollisionGeometry;
112 typedef shared_ptr<CollisionGeometry> CollisionGeometryPtr_t;
113 typedef coal::CollisionObject FclCollisionObject;
114 typedef coal::CollisionObject* FclCollisionObjectPtr_t;
115 typedef const coal::CollisionObject* FclConstCollisionObjectPtr_t;
116 typedef shared_ptr<CollisionObject> CollisionObjectPtr_t;
117 typedef shared_ptr<const CollisionObject> CollisionObjectConstPtr_t;
118 typedef shared_ptr<Device> DevicePtr_t;
119 typedef shared_ptr<const Device> DeviceConstPtr_t;
120 typedef std::vector<coal::DistanceResult> DistanceResults_t;
121 typedef shared_ptr<HumanoidRobot> HumanoidRobotPtr_t;
122 typedef shared_ptr<CenterOfMassComputation> CenterOfMassComputationPtr_t;
123 typedef shared_ptr<Joint> JointPtr_t;
124 typedef shared_ptr<const Joint> JointConstPtr_t;
125 typedef shared_ptr<Gripper> GripperPtr_t;
126 typedef std::vector<GripperPtr_t> Grippers_t;
127 
128 typedef shared_ptr<Model> ModelPtr_t;
129 typedef shared_ptr<const Model> ModelConstPtr_t;
130 typedef shared_ptr<Data> DataPtr_t;
131 typedef shared_ptr<const Data> DataConstPtr_t;
132 
133 typedef shared_ptr<GeomModel> GeomModelPtr_t;
134 typedef shared_ptr<const GeomModel> GeomModelConstPtr_t;
135 typedef shared_ptr<GeomData> GeomDataPtr_t;
136 typedef shared_ptr<const GeomData> GeomDataConstPtr_t;
137 
138 template <typename vector_type>
140 template <typename vector_type>
141 class LiegroupElementBase;
148 
150 typedef shared_ptr<LiegroupSpace> LiegroupSpacePtr_t;
151 typedef shared_ptr<const LiegroupSpace> LiegroupSpaceConstPtr_t;
152 } // namespace pinocchio
153 } // namespace hpp
154 #endif // HPP_PINOCCHIO_FWD_HH
Abstract class representing a Device.
Definition: device-sync.hh:41
Definition: body.hh:51
Definition: center-of-mass-computation.hh:52
Definition: collision-object.hh:52
Definition: device-sync.hh:212
Robot with geometric and dynamic pinocchio.
Definition: device.hh:60
Robot frame.
Definition: frame.hh:42
Definition: gripper.hh:48
Humanoid robot.
Definition: humanoid-robot.hh:44
Definition: joint.hh:57
Definition: liegroup-element.hh:117
Definition: liegroup-element.hh:45
Definition: liegroup-space.hh:101
Eigen::Block< JointJacobian_t, 3, Eigen::Dynamic > HalfJointJacobian_t
Definition: fwd.hh:103
shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:118
shared_ptr< CollisionGeometry > CollisionGeometryPtr_t
Definition: fwd.hh:112
shared_ptr< CenterOfMassComputation > CenterOfMassComputationPtr_t
Definition: fwd.hh:122
LiegroupElementBase< vector_t > LiegroupElement
Element of a Lie group.
Definition: fwd.hh:145
shared_ptr< const GeomData > GeomDataConstPtr_t
Definition: fwd.hh:136
shared_ptr< const CollisionObject > CollisionObjectConstPtr_t
Definition: fwd.hh:117
Request_t
Definition: fwd.hh:66
@ COLLISION
Definition: fwd.hh:66
@ DISTANCE
Definition: fwd.hh:66
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:96
shared_ptr< Joint > JointPtr_t
Definition: fwd.hh:123
shared_ptr< GeomModel > GeomModelPtr_t
Definition: fwd.hh:133
ObjectVector ObjectVector_t
Definition: fwd.hh:107
::pinocchio::ModelTpl< value_type, 0, JointCollectionTpl > Model
Definition: fwd.hh:77
coal::CollisionObject FclCollisionObject
Definition: fwd.hh:113
::pinocchio::GeometryData GeomData
Definition: fwd.hh:80
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition: fwd.hh:88
shared_ptr< HumanoidRobot > HumanoidRobotPtr_t
Definition: fwd.hh:121
::pinocchio::FrameIndex FrameIndex
Definition: fwd.hh:75
Eigen::Ref< vector_t > vectorOut_t
Definition: fwd.hh:94
shared_ptr< const Data > DataConstPtr_t
Definition: fwd.hh:131
shared_ptr< Configuration_t > ConfigurationPtr_t HPP_PINOCCHIO_DEPRECATED
Definition: fwd.hh:92
shared_ptr< const LiegroupSpace > LiegroupSpaceConstPtr_t
Definition: fwd.hh:151
shared_ptr< GeomData > GeomDataPtr_t
Definition: fwd.hh:135
Eigen::Matrix< value_type, 3, 1 > vector3_t
Definition: fwd.hh:99
Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic > matrix_t
Definition: fwd.hh:95
LiegroupElementBase< vectorOut_t > LiegroupElementRef
Writable reference to a LiegroupElement.
Definition: fwd.hh:147
InOutType
Definition: fwd.hh:67
@ OUTER
Definition: fwd.hh:67
@ INNER
Definition: fwd.hh:67
shared_ptr< LiegroupSpace > LiegroupSpacePtr_t
Definition: fwd.hh:150
::pinocchio::GeomIndex GeomIndex
Definition: fwd.hh:76
JointCollectionTpl< value_type, 0 > JointCollection
Definition: fwd.hh:71
matrix_t::Index size_type
Definition: fwd.hh:97
shared_ptr< const Model > ModelConstPtr_t
Definition: fwd.hh:129
Eigen::Matrix< value_type, 6, Eigen::Dynamic > JointJacobian_t
Definition: fwd.hh:101
::pinocchio::JointModelTpl< value_type, 0, JointCollectionTpl > JointModel
Definition: fwd.hh:84
shared_ptr< Body > BodyPtr_t
Definition: fwd.hh:109
::pinocchio::SE3 Transform3s
Definition: fwd.hh:81
Eigen::Ref< Configuration_t > ConfigurationOut_t
Definition: fwd.hh:91
double value_type
Definition: fwd.hh:51
vector_t Configuration_t
Definition: fwd.hh:89
std::vector< GripperPtr_t > Grippers_t
Definition: fwd.hh:126
::pinocchio::DataTpl< value_type, 0, JointCollectionTpl > Data
Definition: fwd.hh:78
::pinocchio::JointIndex JointIndex
Definition: fwd.hh:74
Eigen::Matrix< value_type, 3, 3 > matrix3_t
Definition: fwd.hh:98
HPP_PREDEF_CLASS(Body)
shared_ptr< const Joint > JointConstPtr_t
Definition: fwd.hh:124
::pinocchio::GeometryModel GeomModel
Definition: fwd.hh:79
shared_ptr< const GeomModel > GeomModelConstPtr_t
Definition: fwd.hh:134
JointVector JointVector_t
Definition: fwd.hh:105
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
Definition: fwd.hh:86
Eigen::Matrix< value_type, 3, Eigen::Dynamic > ComJacobian_t
Definition: fwd.hh:102
const coal::CollisionObject * FclConstCollisionObjectPtr_t
Definition: fwd.hh:115
shared_ptr< const Device > DeviceConstPtr_t
Definition: fwd.hh:119
shared_ptr< const Body > BodyConstPtr_t
Definition: fwd.hh:110
shared_ptr< Gripper > GripperPtr_t
Definition: fwd.hh:125
shared_ptr< Model > ModelPtr_t
Definition: fwd.hh:128
Eigen::Ref< const vector_t > vectorIn_t
Definition: fwd.hh:93
coal::CollisionObject * FclCollisionObjectPtr_t
Definition: fwd.hh:114
LiegroupElementConstBase< vectorIn_t > LiegroupElementConstRef
Const reference to a LiegroupElement.
Definition: fwd.hh:141
std::vector< coal::DistanceResult > DistanceResults_t
Definition: fwd.hh:120
shared_ptr< CollisionObject > CollisionObjectPtr_t
Definition: fwd.hh:116
::pinocchio::SE3 SE3
Definition: fwd.hh:82
Eigen::Matrix< value_type, 4, 1 > vector4_t
Definition: fwd.hh:100
shared_ptr< Data > DataPtr_t
Definition: fwd.hh:130
Eigen::Ref< const Configuration_t > ConfigurationIn_t
Definition: fwd.hh:90
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: device-data.hh:51
Definition: joint-collection.hh:54