hpp-pinocchio  4.9.1
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
humanoid-robot.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 CNRS
3 // Author: 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_HUMANOID_ROBOT_HH
21 #define HPP_PINOCCHIO_HUMANOID_ROBOT_HH
22 
23 # include <iostream>
24 # include <vector>
25 
26 # include <hpp/pinocchio/device.hh>
27 # include <hpp/pinocchio/fwd.hh>
28 # include <hpp/pinocchio/config.hh>
29 
30 namespace hpp {
31  namespace pinocchio {
33 
34  class HPP_PINOCCHIO_DLLAPI HumanoidRobot : public Device
35  {
36  public:
39  virtual ~HumanoidRobot ();
40 
42  virtual DevicePtr_t clone () const;
43 
47 
51  static HumanoidRobotPtr_t create (const std::string& name);
52 
54  JointPtr_t waist() const;
55 
57  void waist (const JointPtr_t& joint);
58 
60  JointPtr_t chest() const;
61 
63  void chest (const JointPtr_t& joint);
64 
66  JointPtr_t leftWrist() const;
67 
69  void leftWrist (const JointPtr_t& joint);
70 
72  JointPtr_t rightWrist() const;
73 
75  void rightWrist (const JointPtr_t& joint);
76 
78  JointPtr_t leftAnkle() const;
79 
81  void leftAnkle (const JointPtr_t& joint);
82 
84  JointPtr_t rightAnkle() const;
85 
87  void rightAnkle (const JointPtr_t& joint);
88 
90  JointPtr_t gazeJoint() const;
91 
93  void gazeJoint (const JointPtr_t& joint);
94 
96  void gaze (const vector3_t& origin, const vector3_t& dir)
97  {
98  gazeOrigin_ = origin;
99  gazeDirection_ = dir;
100  }
101  protected:
103  HumanoidRobot (const std::string& name);
104 
105  HumanoidRobot (const HumanoidRobot& other);
106 
110  void init (const HumanoidRobotWkPtr_t& weakPtr);
111 
112  void initCopy (const HumanoidRobotWkPtr_t& weakPtr, const HumanoidRobot& other);
113 
114  private:
115  HumanoidRobotWkPtr_t weakPtr_;
116  JointPtr_t waist_;
117  JointPtr_t chest_;
118  JointPtr_t leftWrist_;
119  JointPtr_t rightWrist_;
120  JointPtr_t leftAnkle_;
121  JointPtr_t rightAnkle_;
122  JointPtr_t gazeJoint_;
123  vector3_t gazeOrigin_;
124  vector3_t gazeDirection_;
125  }; // class HumanoidRobot
126  } // namespace pinocchio
127 } // namespace hpp
128 #endif // HPP_PINOCCHIO_HUMANOID_ROBOT_HH
Humanoid robot.
Definition: humanoid-robot.hh:34
boost::shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:104
Utility functions.
boost::shared_ptr< HumanoidRobot > HumanoidRobotPtr_t
Definition: fwd.hh:107
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
void gaze(const vector3_t &origin, const vector3_t &dir)
Set gaze parameters.
Definition: humanoid-robot.hh:96
Robot with geometric and dynamic pinocchio.
Definition: device.hh:51
Eigen::Matrix< value_type, 3, 1 > vector3_t
Definition: fwd.hh:86
boost::shared_ptr< Joint > JointPtr_t
Definition: fwd.hh:109