hpp-pinocchio
9.0.2
Wrapping of the kinematic/dynamic chain Pinocchio for HPP.
Toggle main menu visibility
Loading...
Searching...
No Matches
gripper.hh
Go to the documentation of this file.
1
//
2
// Copyright (c) 2016 CNRS
3
// Authors: Joseph Mirabel from Florent Lamiraux
4
//
5
//
6
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_PINOCCHIO_GRIPPER_HH
32
#define HPP_PINOCCHIO_GRIPPER_HH
33
34
#include <
hpp/pinocchio/config.hh
>
35
#include <
hpp/pinocchio/fwd.hh
>
36
37
namespace
hpp
{
38
namespace
pinocchio
{
48
class
HPP_PINOCCHIO_DLLAPI
Gripper
{
49
public
:
53
static
GripperPtr_t
create
(
const
std::string&
name
,
54
const
DevicePtr_t
& device) {
55
Gripper
* ptr =
new
Gripper
(
name
, device);
56
GripperPtr_t
shPtr(ptr);
57
ptr->
init
(shPtr);
58
return
shPtr;
59
}
60
61
static
GripperPtr_t
createCopy
(
const
GripperPtr_t
& gripper,
62
const
DevicePtr_t
& otherDevice) {
63
Gripper
* ptr =
new
Gripper
(gripper->name(), otherDevice);
64
ptr->
clearance
(gripper->clearance());
65
GripperPtr_t
shPtr(ptr);
66
ptr->
init
(shPtr);
67
return
shPtr;
68
}
69
71
const
JointPtr_t
&
joint
()
const
{
return
joint_; }
72
74
const
FrameIndex
&
frameId
()
const
{
return
fid_; }
75
77
const
Transform3s
&
objectPositionInJoint
()
const
;
78
80
const
std::string&
name
()
const
{
return
name_; }
81
88
value_type
clearance
()
const
{
return
clearance_; }
89
92
void
clearance
(
const
value_type
&
clearance
) { clearance_ =
clearance
; }
93
94
GripperPtr_t
clone
()
const
;
95
96
std::ostream&
print
(std::ostream& os)
const
;
97
98
protected
:
104
Gripper
(
const
std::string&
name
,
const
DevicePtr_t
& device);
105
106
void
init
(GripperWkPtr_t weakPtr) { weakPtr_ = weakPtr; }
107
108
private
:
109
inline
DevicePtr_t
device()
const
;
110
111
std::string name_;
112
DeviceWkPtr_t device_;
114
JointPtr_t
joint_;
115
mutable
FrameIndex
fid_;
117
value_type
clearance_;
119
GripperWkPtr_t weakPtr_;
120
};
// class Gripper
121
122
inline
std::ostream&
operator<<
(std::ostream& os,
const
Gripper
& gripper) {
123
return
gripper.
print
(os);
124
}
125
}
// namespace pinocchio
126
}
// namespace hpp
127
128
#endif
// HPP_PINOCCHIO_GRIPPER_HH
hpp::pinocchio::Gripper
Definition
gripper.hh:48
hpp::pinocchio::Gripper::name
const std::string & name() const
get name
Definition
gripper.hh:80
hpp::pinocchio::Gripper::Gripper
Gripper(const std::string &name, const DevicePtr_t &device)
hpp::pinocchio::Gripper::objectPositionInJoint
const Transform3s & objectPositionInJoint() const
Get handle position in the the Grippering joint.
hpp::pinocchio::Gripper::joint
const JointPtr_t & joint() const
Get joint to which the gripper is attached.
Definition
gripper.hh:71
hpp::pinocchio::Gripper::clone
GripperPtr_t clone() const
hpp::pinocchio::Gripper::createCopy
static GripperPtr_t createCopy(const GripperPtr_t &gripper, const DevicePtr_t &otherDevice)
Definition
gripper.hh:61
hpp::pinocchio::Gripper::print
std::ostream & print(std::ostream &os) const
hpp::pinocchio::Gripper::frameId
const FrameIndex & frameId() const
Get the frame Id of the gripper in the vector of frame of the Model.
Definition
gripper.hh:74
hpp::pinocchio::Gripper::clearance
void clearance(const value_type &clearance)
Definition
gripper.hh:92
hpp::pinocchio::Gripper::create
static GripperPtr_t create(const std::string &name, const DevicePtr_t &device)
Definition
gripper.hh:53
hpp::pinocchio::Gripper::clearance
value_type clearance() const
Definition
gripper.hh:88
hpp::pinocchio::Gripper::init
void init(GripperWkPtr_t weakPtr)
Definition
gripper.hh:106
config.hh
HPP_PINOCCHIO_DLLAPI
#define HPP_PINOCCHIO_DLLAPI
Definition
config.hh:88
fwd.hh
hpp::pinocchio
Definition
body.hh:40
hpp::pinocchio::DevicePtr_t
shared_ptr< Device > DevicePtr_t
Definition
fwd.hh:121
hpp::pinocchio::operator<<
std::ostream & operator<<(std::ostream &os, const hpp::pinocchio::Device &device)
Definition
device.hh:371
hpp::pinocchio::JointPtr_t
shared_ptr< Joint > JointPtr_t
Definition
fwd.hh:126
hpp::pinocchio::FrameIndex
::pinocchio::FrameIndex FrameIndex
Definition
fwd.hh:73
hpp::pinocchio::Transform3s
::pinocchio::SE3 Transform3s
Definition
fwd.hh:83
hpp::pinocchio::value_type
double value_type
Definition
fwd.hh:51
hpp::pinocchio::GripperPtr_t
shared_ptr< Gripper > GripperPtr_t
Definition
fwd.hh:128
hpp
Utility functions.
include
hpp
pinocchio
gripper.hh
Generated by
1.17.0