hpp-manipulation  6.1.0
Classes for manipulation planning.
device.hh
Go to the documentation of this file.
1 
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_MANIPULATION_DEVICE_HH
32 #define HPP_MANIPULATION_DEVICE_HH
33 
34 #include <hpp/core/container.hh>
36 #include <hpp/manipulation/fwd.hh>
38 
39 namespace hpp {
40 namespace manipulation {
49  : public pinocchio::HumanoidRobot,
50  public std::enable_shared_from_this<Device> {
51  public:
53 
56  static DevicePtr_t create(const std::string& name);
57 
58  DevicePtr_t self() {
59  return enable_shared_from_this<Device>::shared_from_this();
60  }
61 
63  virtual std::ostream& print(std::ostream& os) const;
64 
65  void setRobotRootPosition(const std::string& robotName,
66  const Transform3s& positionWRTParentJoint);
67 
68  virtual pinocchio::DevicePtr_t clone() const;
69 
70  std::vector<std::string> robotNames() const;
71 
72  FrameIndices_t robotFrames(const std::string& robotName) const;
73 
74  void removeJoints(const std::vector<std::string>& jointNames,
75  Configuration_t referenceConfig);
76 
80 
81  protected:
86  Device(const std::string& name);
87 
88  void init(const DeviceWkPtr_t& self) { Parent_t::init(self); }
89 
90  void initCopy(const DeviceWkPtr_t& self, const Device& other) {
91  Parent_t::initCopy(self, other);
92  }
93 
95  Device() {}
96 
98 }; // class Device
99 } // namespace manipulation
100 } // namespace hpp
101 
102 BOOST_CLASS_EXPORT_KEY(hpp::manipulation::Device)
103 
104 #endif // HPP_MANIPULATION_DEVICE_HH
Definition: device.hh:50
void init(const DeviceWkPtr_t &self)
Definition: device.hh:88
static DevicePtr_t create(const std::string &name)
void setRobotRootPosition(const std::string &robotName, const Transform3s &positionWRTParentJoint)
void removeJoints(const std::vector< std::string > &jointNames, Configuration_t referenceConfig)
pinocchio::HumanoidRobot Parent_t
Definition: device.hh:52
void initCopy(const DeviceWkPtr_t &self, const Device &other)
Definition: device.hh:90
core::Container< JointAndShapes_t > jointAndShapes
Definition: device.hh:79
core::Container< HandlePtr_t > handles
Definition: device.hh:77
virtual pinocchio::DevicePtr_t clone() const
FrameIndices_t robotFrames(const std::string &robotName) const
Device(const std::string &name)
Device()
For serialization only.
Definition: device.hh:95
std::vector< std::string > robotNames() const
virtual std::ostream & print(std::ostream &os) const
Print object in a stream.
core::Container< GripperPtr_t > grippers
Definition: device.hh:78
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:88
void init(const ConfigurationShooterWkPtr_t &weak)
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:48
std::vector< pinocchio::FrameIndex > FrameIndices_t
Definition: fwd.hh:47
core::Transform3s Transform3s
Definition: fwd.hh:91
shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:40
shared_ptr< Device > DevicePtr_t