fwd.hh 4.14 KB
Newer Older
1
2
3
4
5
//
// Copyright (c) 2011, 2012, 2013, 2014 CNRS
// Author: Florent Lamiraux
//
//
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This file is part of hpp-model
// hpp-model is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-model is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Lesser Public License for more details.  You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-model  If not, see
// <http://www.gnu.org/licenses/>.

#ifndef HPP_MODEL_FWD_HH
# define HPP_MODEL_FWD_HH

Florent Lamiraux's avatar
Florent Lamiraux committed
23
# include <vector>
24
# include <list>
Florent Lamiraux's avatar
Florent Lamiraux committed
25
26
27
# include <map>
# include <Eigen/Core>
# include <hpp/util/pointer.hh>
28
29
# include <hpp/fcl/fwd.hh>
# include <hpp/fcl/math/matrix_3f.h>
Florent Lamiraux's avatar
Florent Lamiraux committed
30

31
32
namespace hpp {
  namespace model {
Florent Lamiraux's avatar
Florent Lamiraux committed
33
    HPP_PREDEF_CLASS (Body);
34
    HPP_PREDEF_CLASS (ChildrenIterator);
Florent Lamiraux's avatar
Florent Lamiraux committed
35
36
37
38
39
    HPP_PREDEF_CLASS (CollisionObject);
    HPP_PREDEF_CLASS (Device);
    HPP_PREDEF_CLASS (DistanceResult);
    HPP_PREDEF_CLASS (HumanoidRobot);
    HPP_PREDEF_CLASS (Joint);
40
    HPP_PREDEF_CLASS (JointAnchor);
41
42
    HPP_PREDEF_CLASS (JointRotation);
    HPP_PREDEF_CLASS (JointSO3);
Florent Lamiraux's avatar
Florent Lamiraux committed
43
44
45
    HPP_PREDEF_CLASS (JointConfiguration);
    HPP_PREDEF_CLASS (ObjectFactory);
    HPP_PREDEF_CLASS (ObjectIterator);
46
    HPP_PREDEF_CLASS (Gripper);
47
    HPP_PREDEF_CLASS (CenterOfMassComputation);
Florent Lamiraux's avatar
Florent Lamiraux committed
48
    enum Request_t {COLLISION, DISTANCE};
49
50

    typedef double value_type;
51
    typedef Eigen::Matrix <value_type, Eigen::Dynamic, 1> vector_t;
52
53
54
    typedef vector_t Configuration_t;
    typedef Eigen::Ref <const Configuration_t> ConfigurationIn_t;
    typedef Eigen::Ref <Configuration_t> ConfigurationOut_t;
55
    typedef boost::shared_ptr <Configuration_t> ConfigurationPtr_t;
56
57
    typedef Eigen::Ref <const vector_t> vectorIn_t;
    typedef Eigen::Ref <vector_t> vectorOut_t;
58
    typedef Eigen::Matrix<value_type, Eigen::Dynamic, Eigen::Dynamic> matrix_t;
59
60
61
62
    typedef Eigen::Ref <matrix_t> matrixOut_t;
    typedef matrix_t::Index size_type;
    typedef fcl::Matrix3f matrix3_t;
    typedef fcl::Vec3f vector3_t;
Joseph Mirabel's avatar
Joseph Mirabel committed
63
64
    typedef Eigen::Matrix <value_type, 6, Eigen::Dynamic, Eigen::RowMajor> JointJacobian_t;
    typedef Eigen::Matrix <value_type, 3, Eigen::Dynamic, Eigen::RowMajor> ComJacobian_t;
65
66
67
    typedef Eigen::Block <JointJacobian_t, 3, Eigen::Dynamic>
    HalfJointJacobian_t;

68
    typedef Body* BodyPtr_t;
69
    typedef std::vector<Body*> BodyVector_t;
70
    typedef boost::shared_ptr <CollisionObject> CollisionObjectPtr_t;
71
    typedef std::list <CollisionObjectPtr_t> ObjectVector_t;
72
    typedef boost::shared_ptr <Device> DevicePtr_t;
Florent Lamiraux's avatar
Florent Lamiraux committed
73
    typedef boost::shared_ptr <const Device> DeviceConstPtr_t;
Florent Lamiraux's avatar
Florent Lamiraux committed
74
    typedef std::vector <DistanceResult> DistanceResults_t;
75
    typedef boost::shared_ptr <HumanoidRobot> HumanoidRobotPtr_t;
Florent Lamiraux's avatar
Florent Lamiraux committed
76
    typedef Joint* JointPtr_t;
77
    typedef JointAnchor* JointAnchorPtr_t;
78
79
    typedef JointRotation* JointRotationPtr_t;
    typedef JointSO3* JointSO3Ptr_t;
80
81
82
83
    template <size_type dimension = 1> class  JointTranslation;
    typedef JointTranslation <1>* JointTranslationPtr_t;
    typedef JointTranslation <2>* JointTranslation2Ptr_t;
    typedef JointTranslation <3>* JointTranslation3Ptr_t;
84
    typedef const Joint* JointConstPtr_t;
85
    typedef const JointAnchor* JointAnchorConstPtr_t;
86
87
    typedef const JointRotation* JointRotationConstPtr_t;
    typedef const JointSO3* JointSO3ConstPtr_t;
88
89
90
    typedef const JointTranslation <1>* JointTranslationConstPtr_t;
    typedef const JointTranslation <2>* JointTranslation2ConstPtr_t;
    typedef const JointTranslation <3>* JointTranslation3ConstPtr_t;
91
    typedef std::map <std::string, JointPtr_t> JointByName_t;
92
    typedef std::vector <JointPtr_t> JointVector_t;
93
94
    typedef boost::shared_ptr <Gripper> GripperPtr_t;
    typedef std::vector <GripperPtr_t> Grippers_t;
Florent Lamiraux's avatar
Florent Lamiraux committed
95
    typedef fcl::Transform3f Transform3f;
96
97
    typedef boost::shared_ptr <CenterOfMassComputation>
      CenterOfMassComputationPtr_t;
98
99
100
  } // namespace model
} // namespace hpp
#endif //HPP_MODEL_FWD_HH