hpp-pinocchio  4.9.1
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 // This file is part of hpp-pinocchio
7 // hpp-pinocchio is free software: you can redistribute it
8 // and/or modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation, either version
10 // 3 of the License, or (at your option) any later version.
11 //
12 // hpp-pinocchio is distributed in the hope that it will be
13 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Lesser Public License for more details. You should have
16 // received a copy of the GNU Lesser General Public License along with
17 // hpp-pinocchio If not, see
18 // <http://www.gnu.org/licenses/>.
19 
20 #ifndef HPP_PINOCCHIO_FWD_HH
21 # define HPP_PINOCCHIO_FWD_HH
22 
23 # ifndef PINOCCHIO_WITH_HPP_FCL
24 # error "hpp-fcl support in Pinocchio is mandatory."
25 # endif
26 
27 # include <vector>
28 # include <Eigen/Core>
29 
30 # include <hpp/util/pointer.hh>
31 # include <hpp/fcl/fwd.hh> // Needs boost/shared_ptr.hpp
32 # include <hpp/fcl/collision_data.h> // DistanceResult
33 
34 # include <pinocchio/spatial/fwd.hpp>
35 # include <pinocchio/multibody/fwd.hpp>
36 # include <pinocchio/multibody/joint/fwd.hpp>
37 
38 namespace hpp {
39  namespace pinocchio {
40  typedef double value_type;
41 
47  HPP_PREDEF_CLASS (JointConfiguration);
50  class Frame;
51  class AbstractDevice;
52  class DeviceSync;
53  struct DeviceData;
54 
56  enum InOutType { INNER, OUTER };
57 
58  // Pinocchio typedefs
59  template <typename _Scalar, int _Options> struct JointCollectionTpl;
61 
65  typedef ::pinocchio::ModelTpl<value_type, 0, JointCollectionTpl> Model;
66  typedef ::pinocchio::DataTpl <value_type, 0, JointCollectionTpl> Data ;
67  typedef ::pinocchio::GeometryModel GeomModel;
68  typedef ::pinocchio::GeometryData GeomData;
71  typedef ::pinocchio::JointModelTpl<value_type, 0, JointCollectionTpl> JointModel;
72 
73  typedef Eigen::Array <bool, Eigen::Dynamic, 1> ArrayXb;
74 
75  typedef Eigen::Matrix <value_type, Eigen::Dynamic, 1> vector_t;
76  typedef vector_t Configuration_t;
77  typedef Eigen::Ref <const Configuration_t> ConfigurationIn_t;
78  typedef Eigen::Ref <Configuration_t> ConfigurationOut_t;
79  typedef boost::shared_ptr <Configuration_t> ConfigurationPtr_t;
80  typedef Eigen::Ref <const vector_t> vectorIn_t;
81  typedef Eigen::Ref <vector_t> vectorOut_t;
82  typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic> matrix_t;
83  typedef Eigen::Ref <matrix_t> matrixOut_t;
84  typedef matrix_t::Index size_type;
85  typedef Eigen::Matrix<value_type, 3, 3> matrix3_t;
86  typedef Eigen::Matrix<value_type, 3, 1> vector3_t;
87  typedef Eigen::Matrix<value_type, 4, 1> vector4_t;
88  typedef Eigen::Matrix<value_type, 6, Eigen::Dynamic> JointJacobian_t;
89  typedef Eigen::Matrix<value_type, 3, Eigen::Dynamic> ComJacobian_t;
90  typedef Eigen::Block <JointJacobian_t, 3, Eigen::Dynamic> HalfJointJacobian_t;
91 
92  struct JointVector;
93  typedef JointVector JointVector_t;
94  struct ObjectVector;
95  typedef ObjectVector ObjectVector_t;
96  typedef boost::shared_ptr<Body> BodyPtr_t;
97  typedef boost::shared_ptr<const Body> BodyConstPtr_t;
98  //typedef std::vector<BodyPtr_t> BodyVector_t;
102  typedef boost::shared_ptr<CollisionObject> CollisionObjectPtr_t;
103  typedef boost::shared_ptr<const CollisionObject> CollisionObjectConstPtr_t;
104  typedef boost::shared_ptr <Device> DevicePtr_t;
105  typedef boost::shared_ptr <const Device> DeviceConstPtr_t;
106  typedef std::vector <fcl::DistanceResult> DistanceResults_t;
107  typedef boost::shared_ptr <HumanoidRobot> HumanoidRobotPtr_t;
108  typedef boost::shared_ptr <CenterOfMassComputation> CenterOfMassComputationPtr_t;
109  typedef boost::shared_ptr<Joint> JointPtr_t;
110  typedef boost::shared_ptr<const Joint> JointConstPtr_t;
111  typedef boost::shared_ptr <Gripper> GripperPtr_t;
112  typedef std::vector <GripperPtr_t> Grippers_t;
113 
114  typedef boost::shared_ptr<Model> ModelPtr_t;
115  typedef boost::shared_ptr<const Model> ModelConstPtr_t;
116  typedef boost::shared_ptr<Data> DataPtr_t;
117  typedef boost::shared_ptr<const Data> DataConstPtr_t;
118 
119  typedef boost::shared_ptr<GeomModel> GeomModelPtr_t;
120  typedef boost::shared_ptr<const GeomModel> GeomModelConstPtr_t;
121  typedef boost::shared_ptr<GeomData> GeomDataPtr_t;
122  typedef boost::shared_ptr<const GeomData> GeomDataConstPtr_t;
123 
124  template <typename vector_type> class LiegroupElementConstBase;
125  template <typename vector_type> class LiegroupElementBase;
132 
134  typedef boost::shared_ptr <LiegroupSpace> LiegroupSpacePtr_t;
135  typedef boost::shared_ptr <const LiegroupSpace> LiegroupSpaceConstPtr_t;
136  } // namespace pinocchio
137 } // namespace hpp
138 #endif // HPP_PINOCCHIO_FWD_HH
::pinocchio::DataTpl< value_type, 0, JointCollectionTpl > Data
Definition: fwd.hh:66
Eigen::Block< JointJacobian_t, 3, Eigen::Dynamic > HalfJointJacobian_t
Definition: fwd.hh:90
boost::shared_ptr< Data > DataPtr_t
Definition: fwd.hh:116
InOutType
Definition: fwd.hh:56
Humanoid robot.
Definition: humanoid-robot.hh:34
boost::shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:104
boost::shared_ptr< Body > BodyPtr_t
Definition: fwd.hh:96
Utility functions.
boost::shared_ptr< HumanoidRobot > HumanoidRobotPtr_t
Definition: fwd.hh:107
::pinocchio::GeomIndex GeomIndex
Definition: fwd.hh:64
boost::shared_ptr< CollisionObject > CollisionObjectPtr_t
Definition: fwd.hh:102
Eigen::Ref< vector_t > vectorOut_t
Definition: fwd.hh:81
::pinocchio::GeometryModel GeomModel
Definition: fwd.hh:67
Eigen::Matrix< value_type, 6, Eigen::Dynamic > JointJacobian_t
Definition: fwd.hh:88
std::vector< fcl::DistanceResult > DistanceResults_t
Definition: fwd.hh:106
fcl::CollisionObject FclCollisionObject
Definition: fwd.hh:99
Eigen::Matrix< value_type, 3, 3 > matrix3_t
Definition: fwd.hh:85
Definition: fwd.hh:56
Definition: device-data.hh:41
LiegroupElementBase< vector_t > LiegroupElement
Element of a Lie group.
Definition: fwd.hh:129
::pinocchio::ModelTpl< value_type, 0, JointCollectionTpl > Model
Definition: fwd.hh:65
boost::shared_ptr< const Model > ModelConstPtr_t
Definition: fwd.hh:115
Request_t
Definition: fwd.hh:55
fcl::CollisionObject * FclCollisionObjectPtr_t
Definition: fwd.hh:100
Definition: fwd.hh:55
boost::shared_ptr< const GeomData > GeomDataConstPtr_t
Definition: fwd.hh:122
boost::shared_ptr< GeomData > GeomDataPtr_t
Definition: fwd.hh:121
JointVector JointVector_t
Definition: fwd.hh:92
Robot frame.
Definition: frame.hh:31
matrix_t::Index size_type
Definition: fwd.hh:84
Eigen::Ref< Configuration_t > ConfigurationOut_t
Definition: fwd.hh:78
::pinocchio::SE3 SE3
Definition: fwd.hh:70
Eigen::Ref< matrix_t > matrixOut_t
Definition: fwd.hh:83
Definition: fwd.hh:55
Definition: liegroup-space.hh:92
boost::shared_ptr< Gripper > GripperPtr_t
Definition: fwd.hh:111
boost::shared_ptr< Model > ModelPtr_t
Definition: fwd.hh:114
Eigen::Matrix< value_type, 3, Eigen::Dynamic > ComJacobian_t
Definition: fwd.hh:89
Definition: gripper.hh:37
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
Definition: fwd.hh:73
LiegroupElementConstBase< vectorIn_t > LiegroupElementConstRef
Const reference to a LiegroupElement.
Definition: fwd.hh:125
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition: fwd.hh:75
boost::shared_ptr< const Body > BodyConstPtr_t
Definition: fwd.hh:97
Eigen::Matrix< value_type, 4, 1 > vector4_t
Definition: fwd.hh:87
HPP_PREDEF_CLASS(Body)
Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic > matrix_t
Definition: fwd.hh:82
boost::shared_ptr< Configuration_t > ConfigurationPtr_t
Definition: fwd.hh:79
boost::shared_ptr< const LiegroupSpace > LiegroupSpaceConstPtr_t
Definition: fwd.hh:135
::pinocchio::JointModelTpl< value_type, 0, JointCollectionTpl > JointModel
Definition: fwd.hh:71
::pinocchio::GeometryData GeomData
Definition: fwd.hh:68
Abstract class representing a Device.
Definition: device-sync.hh:29
Definition: center-of-mass-computation.hh:41
const fcl::CollisionObject * FclConstCollisionObjectPtr_t
Definition: fwd.hh:101
::pinocchio::FrameIndex FrameIndex
Definition: fwd.hh:63
Robot with geometric and dynamic pinocchio.
Definition: device.hh:51
Definition: collision-object.hh:44
ObjectVector ObjectVector_t
Definition: fwd.hh:94
Definition: fwd.hh:56
Definition: body.hh:42
double value_type
Definition: fwd.hh:40
Eigen::Ref< const Configuration_t > ConfigurationIn_t
Definition: fwd.hh:77
std::vector< GripperPtr_t > Grippers_t
Definition: fwd.hh:112
boost::shared_ptr< CenterOfMassComputation > CenterOfMassComputationPtr_t
Definition: fwd.hh:108
::pinocchio::SE3 Transform3f
Definition: fwd.hh:69
boost::shared_ptr< const GeomModel > GeomModelConstPtr_t
Definition: fwd.hh:120
JointCollectionTpl< value_type, 0 > JointCollection
Definition: fwd.hh:59
boost::shared_ptr< const Device > DeviceConstPtr_t
Definition: fwd.hh:105
Eigen::Ref< const vector_t > vectorIn_t
Definition: fwd.hh:80
boost::shared_ptr< const Joint > JointConstPtr_t
Definition: fwd.hh:110
::pinocchio::JointIndex JointIndex
Definition: fwd.hh:62
boost::shared_ptr< const CollisionObject > CollisionObjectConstPtr_t
Definition: fwd.hh:103
boost::shared_ptr< LiegroupSpace > LiegroupSpacePtr_t
Definition: fwd.hh:134
boost::shared_ptr< GeomModel > GeomModelPtr_t
Definition: fwd.hh:119
vector_t Configuration_t
Definition: fwd.hh:76
Definition: device-sync.hh:162
Definition: joint.hh:45
boost::shared_ptr< const Data > DataConstPtr_t
Definition: fwd.hh:117
Eigen::Matrix< value_type, 3, 1 > vector3_t
Definition: fwd.hh:86
boost::shared_ptr< Joint > JointPtr_t
Definition: fwd.hh:109
LiegroupElementBase< vectorOut_t > LiegroupElementRef
Writable reference to a LiegroupElement.
Definition: fwd.hh:131