hpp-manipulation  4.9.0
Classes for manipulation planning.
device.hh
Go to the documentation of this file.
1 // This file is part of hpp-manipulation.
7 // hpp-manipulation 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-manipulation 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-manipulation. If not, see
18 // <http://www.gnu.org/licenses/>.
19 
20 #ifndef HPP_MANIPULATION_DEVICE_HH
21 # define HPP_MANIPULATION_DEVICE_HH
22 
23 # include <hpp/pinocchio/humanoid-robot.hh>
24 
25 # include <hpp/core/container.hh>
26 
27 # include <hpp/manipulation/fwd.hh>
28 # include <hpp/manipulation/config.hh>
29 
30 namespace hpp {
31  namespace manipulation {
38  class HPP_MANIPULATION_DLLAPI Device : public pinocchio::HumanoidRobot
39  {
40  public:
42 
45  static DevicePtr_t create (const std::string& name)
46  {
47  Device* ptr = new Device (name);
48  DevicePtr_t shPtr (ptr);
49  ptr->init (shPtr);
50  return shPtr;
51  }
52 
54  virtual std::ostream& print (std::ostream& os) const;
55 
56  void setRobotRootPosition (const std::string& robotName,
57  const Transform3f& positionWRTParentJoint);
58 
59  virtual pinocchio::DevicePtr_t clone () const;
60 
61  std::vector<std::string> robotNames () const;
62 
63  FrameIndices_t robotFrames (const std::string& robotName) const;
64 
68 
69  protected:
74  Device (const std::string& name) :
75  Parent_t (name)
76  {}
77 
78  void init (const DeviceWkPtr_t& self)
79  {
80  Parent_t::init (self);
81  self_ = self;
82  }
83 
84  void initCopy (const DeviceWkPtr_t& self, const Device& other)
85  {
86  Parent_t::initCopy (self, other);
87  self_ = self;
88  }
89 
90  private:
91  DeviceWkPtr_t self_;
92  }; // class Device
93  } // namespace manipulation
94 } // namespace hpp
95 #endif // HPP_MANIPULATION_DEVICE_HH
void init(const DeviceWkPtr_t &self)
Definition: device.hh:78
Device(const std::string &name)
Definition: device.hh:74
boost::shared_ptr< Device > DevicePtr_t
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
std::vector< pinocchio::FrameIndex > FrameIndices_t
Definition: fwd.hh:36
Definition: device.hh:38
boost::shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:29
void init(const ConfigurationShooterWkPtr_t &weak)
void initCopy(const DeviceWkPtr_t &self, const Device &other)
Definition: device.hh:84
core::Container< JointAndShapes_t > jointAndShapes
Definition: device.hh:67
pinocchio::HumanoidRobot Parent_t
Definition: device.hh:41
core::Container< HandlePtr_t > handles
Definition: device.hh:65
core::Transform3f Transform3f
Definition: fwd.hh:81
static DevicePtr_t create(const std::string &name)
Definition: device.hh:45
core::Container< GripperPtr_t > grippers
Definition: device.hh:66