Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
robotiq_3f_gripper_control
robotiq_3f_gripper_api.h
Go to the documentation of this file.
1
// Copyright (c) 2016, Toyota Research Institute. All rights reserved.
2
3
// Redistribution and use in source and binary forms, with or without
4
// modification, are permitted provided that the following conditions are met:
5
6
// 1. Redistributions of source code must retain the above copyright
7
// notice, this list of conditions and the following disclaimer.
8
9
// 2. Redistributions in binary form must reproduce the above copyright
10
// notice, this list of conditions and the following disclaimer in the
11
// documentation and/or other materials provided with the distribution.
12
13
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23
// POSSIBILITY OF SUCH DAMAGE.
24
25
#ifndef ROBOTIQ_3F_GRIPPER_API_H
26
#define ROBOTIQ_3F_GRIPPER_API_H
27
28
#include <
robotiq_3f_gripper_control/robotiq_3f_gripper_client_base.h
>
29
30
namespace
robotiq
31
{
32
enum
InitializationMode
{
INIT_RESET
,
INIT_ACTIVATION
};
33
enum
GraspingMode
{
GRASP_BASIC
,
GRASP_PINCH
,
GRASP_WIDE
,
GRASP_SCISSOR
};
34
enum
ActionMode
{
ACTION_STOP
,
ACTION_GO
};
35
enum
GripperStatus
{
GRIPPER_RESET
,
GRIPPER_ACTIVATING
,
GRIPPER_MODE_CHANGE
,
GRIPPER_READY
};
36
enum
MotionStatus
{
MOTION_STARTED
,
MOTION_PARTIAL_STOP
,
MOTION_ALL_STOP
,
MOTION_COMPLETE
};
37
enum
ObjectStatus
{
OBJECT_MOTION
,
OBJECT_OPEN_CONTACT
,
OBJECT_CLOSE_CONTACT
,
OBJECT_MOTION_COMPLETE
};
38
enum
FaultStatus
{
FAULT_NONE
,
FAULT_UNKNOWN_1
,
FAULT_UNKNOWN_2
,
FAULT_UNKNOWN_3
,
39
NOTICE
,
NOTICE_ACTIVATION_DELAYED
,
NOTICE_MODE_DELAYED
,
NOTICE_ACTIVATION_NEEDED
,
40
WARNING
,
WARNING_COMM_NOT_READY
,
WARNING_MODE
,
WARNING_AUTOMATIC_RELEASE
,
41
ERROR
,
ERROR_ACTIVATION_FAULT
,
ERROR_MODE_FAULT
,
ERROR_AUTOMATIC_RELEASE_COMPLETE
};
42
43
enum
EmergencyRelease
{
EMERGENCY_RELEASE_IDLE
,
EMERGENCY_RELEASE_ENGAGED
};
44
enum
IndividualControl
{
IND_CONTROL_OFF
,
IND_CONTROL_ON
};
45
}
// end namespace robotiq
46
47
namespace
robotiq_3f_gripper_control
48
{
49
using namespace
robotiq
;
50
51
class
Robotiq3FGripperAPI
52
{
53
public
:
54
Robotiq3FGripperAPI
(
boost::shared_ptr<Robotiq3FGripperClientBase>
base);
55
56
void
setInitialization(
InitializationMode
mode
);
57
void
setGraspingMode(
GraspingMode
mode);
58
void
setActionMode(
ActionMode
mode);
59
void
setEmergencyRelease(
EmergencyRelease
release);
60
void
setInidividualControlMode(
IndividualControl
fingers,
IndividualControl
scissor);
61
void
setPosition(
const
double
&posA,
const
double
&posB=0,
const
double
&posC=0,
const
double
&posS=0);
62
void
setVelocity(
const
double
&velA,
const
double
&velB=0,
const
double
&velC=0,
const
double
&velS=0);
63
void
setForce(
const
double
&fA,
const
double
&fB=0,
const
double
&fC=0,
const
double
&fS=0);
64
void
setRaw(
const
Robotiq3FGripperClientBase::GripperOutput
&raw);
65
66
void
getPosition(
double
*posA,
double
*posB,
double
*posC,
double
*posS)
const
;
67
void
getPositionCmd(
double
*posA,
double
*posB,
double
*posC,
double
*posS)
const
;
68
void
getCurrent(
double
*curA,
double
*curB,
double
*curC,
double
*curS)
const
;
69
void
getGripperStatus(
InitializationMode
*gACT,
GraspingMode
*gMOD,
ActionMode
*gGTO,
GripperStatus
*gIMC,
MotionStatus
*gSTA)
const
;
70
void
getFaultStatus(
FaultStatus
*gFLT)
const
;
71
void
getObjectStatus(
ObjectStatus
*fA,
ObjectStatus
*fB,
ObjectStatus
*fC,
ObjectStatus
*fS)
const
;
72
void
getRaw(
Robotiq3FGripperClientBase::GripperInput
*raw)
const
;
73
74
void
getCommandPos(
double
*posA,
double
*posB,
double
*posC,
double
*posS)
const
;
75
76
bool
isInitialized
();
77
bool
isReady();
78
bool
isModeSet(
GraspingMode
mode);
79
bool
isHalted();
80
bool
isMoving();
81
bool
isEmergReleaseComplete();
82
83
void
read();
84
void
write();
85
86
private
:
87
boost::shared_ptr<Robotiq3FGripperClientBase>
base_
;
88
89
Robotiq3FGripperClientBase::GripperInput
status_
;
90
Robotiq3FGripperClientBase::GripperOutput
command_
;
91
93
double
pos_to_ticks_
;
94
double
pos_offset_
;
95
double
sci_to_ticks_
;
96
double
sci_offset_
;
97
double
vel_to_ticks_
;
98
double
vel_offset_
;
99
double
force_to_ticks_
;
100
double
force_offset_
;
101
double
cur_to_ticks_
;
102
103
};
104
105
template
<
typename
T>
106
inline
T
limit
(
double
value)
107
{
108
value = value < std::numeric_limits<T>::min() ? std::numeric_limits<T>::min() : value;
109
value = value > std::numeric_limits<T>::max() ? std::numeric_limits<T>::max() : value;
110
return
static_cast<
T
>
(value);
111
}
112
113
}
//end namespace robotiq_3f_gripper_control
114
115
#endif // ROBOTIQ_3F_GRIPPER_API_H
robotiq::GRASP_PINCH
Definition:
robotiq_3f_gripper_api.h:33
robotiq::GRASP_SCISSOR
Definition:
robotiq_3f_gripper_api.h:33
robotiq::ActionMode
ActionMode
Definition:
robotiq_3f_gripper_api.h:34
robotiq::ERROR_AUTOMATIC_RELEASE_COMPLETE
Definition:
robotiq_3f_gripper_api.h:41
robotiq::ERROR
Definition:
robotiq_3f_gripper_api.h:41
robotiq::GRIPPER_RESET
Definition:
robotiq_3f_gripper_api.h:35
robotiq_3f_gripper_control::Robotiq3FGripperClientBase::GripperOutput
robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotOutput GripperOutput
Definition:
robotiq_3f_gripper_client_base.h:38
robotiq_3f_gripper_control::Robotiq3FGripperAPI::base_
boost::shared_ptr< Robotiq3FGripperClientBase > base_
Definition:
robotiq_3f_gripper_api.h:87
robotiq::WARNING_COMM_NOT_READY
Definition:
robotiq_3f_gripper_api.h:40
robotiq::FAULT_UNKNOWN_1
Definition:
robotiq_3f_gripper_api.h:38
robotiq::FAULT_NONE
Definition:
robotiq_3f_gripper_api.h:38
robotiq::MOTION_COMPLETE
Definition:
robotiq_3f_gripper_api.h:36
robotiq::EmergencyRelease
EmergencyRelease
Definition:
robotiq_3f_gripper_api.h:43
robotiq::MOTION_PARTIAL_STOP
Definition:
robotiq_3f_gripper_api.h:36
robotiq::GRASP_BASIC
Definition:
robotiq_3f_gripper_api.h:33
robotiq_3f_gripper_control::limit
T limit(double value)
Definition:
robotiq_3f_gripper_api.h:106
isInitialized
ROSCPP_DECL bool isInitialized()
robotiq::ObjectStatus
ObjectStatus
Definition:
robotiq_3f_gripper_api.h:37
robotiq_3f_gripper_control::Robotiq3FGripperAPI::force_to_ticks_
double force_to_ticks_
Definition:
robotiq_3f_gripper_api.h:99
robotiq::ACTION_GO
Definition:
robotiq_3f_gripper_api.h:34
robotiq::FAULT_UNKNOWN_2
Definition:
robotiq_3f_gripper_api.h:38
robotiq::ERROR_MODE_FAULT
Definition:
robotiq_3f_gripper_api.h:41
robotiq::ACTION_STOP
Definition:
robotiq_3f_gripper_api.h:34
robotiq_3f_gripper_control::Robotiq3FGripperAPI::pos_to_ticks_
double pos_to_ticks_
conversions
Definition:
robotiq_3f_gripper_api.h:93
robotiq::INIT_ACTIVATION
Definition:
robotiq_3f_gripper_api.h:32
robotiq
Definition:
robotiq_3f_gripper_api.h:30
robotiq_3f_gripper_control::Robotiq3FGripperAPI::vel_offset_
double vel_offset_
Definition:
robotiq_3f_gripper_api.h:98
robotiq::MOTION_ALL_STOP
Definition:
robotiq_3f_gripper_api.h:36
robotiq_3f_gripper_control::Robotiq3FGripperAPI::command_
Robotiq3FGripperClientBase::GripperOutput command_
Definition:
robotiq_3f_gripper_api.h:90
boost::shared_ptr
robotiq::WARNING
Definition:
robotiq_3f_gripper_api.h:40
robotiq::NOTICE
Definition:
robotiq_3f_gripper_api.h:39
robotiq_3f_gripper_control::Robotiq3FGripperAPI::force_offset_
double force_offset_
Definition:
robotiq_3f_gripper_api.h:100
robotiq::WARNING_AUTOMATIC_RELEASE
Definition:
robotiq_3f_gripper_api.h:40
robotiq::IND_CONTROL_ON
Definition:
robotiq_3f_gripper_api.h:44
robotiq::FaultStatus
FaultStatus
Definition:
robotiq_3f_gripper_api.h:38
robotiq::OBJECT_MOTION
Definition:
robotiq_3f_gripper_api.h:37
robotiq::NOTICE_ACTIVATION_DELAYED
Definition:
robotiq_3f_gripper_api.h:39
robotiq::InitializationMode
InitializationMode
Definition:
robotiq_3f_gripper_api.h:32
robotiq::GRIPPER_READY
Definition:
robotiq_3f_gripper_api.h:35
robotiq::GRIPPER_MODE_CHANGE
Definition:
robotiq_3f_gripper_api.h:35
robotiq_3f_gripper_control::Robotiq3FGripperAPI::cur_to_ticks_
double cur_to_ticks_
Definition:
robotiq_3f_gripper_api.h:101
robotiq::WARNING_MODE
Definition:
robotiq_3f_gripper_api.h:40
robotiq::OBJECT_CLOSE_CONTACT
Definition:
robotiq_3f_gripper_api.h:37
robotiq::MOTION_STARTED
Definition:
robotiq_3f_gripper_api.h:36
robotiq::NOTICE_ACTIVATION_NEEDED
Definition:
robotiq_3f_gripper_api.h:39
robotiq::MotionStatus
MotionStatus
Definition:
robotiq_3f_gripper_api.h:36
robotiq::IndividualControl
IndividualControl
Definition:
robotiq_3f_gripper_api.h:44
robotiq::ERROR_ACTIVATION_FAULT
Definition:
robotiq_3f_gripper_api.h:41
robotiq::FAULT_UNKNOWN_3
Definition:
robotiq_3f_gripper_api.h:38
robotiq_3f_gripper_control::Robotiq3FGripperAPI::vel_to_ticks_
double vel_to_ticks_
Definition:
robotiq_3f_gripper_api.h:97
robotiq::INIT_RESET
Definition:
robotiq_3f_gripper_api.h:32
robotiq_3f_gripper_control::Robotiq3FGripperAPI::status_
Robotiq3FGripperClientBase::GripperInput status_
Definition:
robotiq_3f_gripper_api.h:89
robotiq::EMERGENCY_RELEASE_ENGAGED
Definition:
robotiq_3f_gripper_api.h:43
robotiq_3f_gripper_control::Robotiq3FGripperAPI::sci_offset_
double sci_offset_
Definition:
robotiq_3f_gripper_api.h:96
robotiq_3f_gripper_control
Definition:
robotiq_3f_gripper_api.h:47
robotiq_3f_gripper_control::Robotiq3FGripperAPI::sci_to_ticks_
double sci_to_ticks_
Definition:
robotiq_3f_gripper_api.h:95
robotiq::NOTICE_MODE_DELAYED
Definition:
robotiq_3f_gripper_api.h:39
robotiq_3f_gripper_client_base.h
robotiq_3f_gripper_control::Robotiq3FGripperAPI
Definition:
robotiq_3f_gripper_api.h:51
robotiq::GRIPPER_ACTIVATING
Definition:
robotiq_3f_gripper_api.h:35
robotiq_3f_gripper_control::Robotiq3FGripperClientBase::GripperInput
robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotInput GripperInput
Definition:
robotiq_3f_gripper_client_base.h:39
robotiq::GraspingMode
GraspingMode
Definition:
robotiq_3f_gripper_api.h:33
robotiq_3f_gripper_control::Robotiq3FGripperAPI::pos_offset_
double pos_offset_
Definition:
robotiq_3f_gripper_api.h:94
mode
int mode
robotiq::GRASP_WIDE
Definition:
robotiq_3f_gripper_api.h:33
robotiq::EMERGENCY_RELEASE_IDLE
Definition:
robotiq_3f_gripper_api.h:43
robotiq::OBJECT_OPEN_CONTACT
Definition:
robotiq_3f_gripper_api.h:37
robotiq::OBJECT_MOTION_COMPLETE
Definition:
robotiq_3f_gripper_api.h:37
robotiq::GripperStatus
GripperStatus
Definition:
robotiq_3f_gripper_api.h:35
robotiq::IND_CONTROL_OFF
Definition:
robotiq_3f_gripper_api.h:44
robotiq_3f_gripper_control
Author(s): Nicolas Lauzier (Robotiq inc.), Allison Thackston
autogenerated on Tue Jun 1 2021 02:29:58