@@ -49,15 +49,22 @@ class ToolCenterPoint
49
49
* @brief Tool Center Point Defined by name
50
50
* @param name The tool center point name
51
51
* @param external The external TCP is used when the robot is holding the part verus the tool.
52
+ * @note External should also be set to true your kinematic object which includes say a robot and
53
+ * positioner, and the positioner has the tool and the robot is holding the part. Basically
54
+ * anytime the tool is not attached to the tip link of the kinematic chain.
52
55
*/
53
56
ToolCenterPoint (const std::string& name, bool external = false );
54
57
55
58
/* *
56
59
* @brief Tool Center Point Defined by transform
57
60
* @param transform The tool center point transform
58
61
* @param external The external TCP is used when the robot is holding the part verus the tool.
62
+ * @param external_frame If empty assumed relative to world, otherwise the provided tcp is relative to this link.
63
+ * @note External should also be set to true your kinematic object which includes say a robot and
64
+ * positioner, and the positioner has the tool and the robot is holding the part. Basically
65
+ * anytime the tool is not attached to the tip link of the kinematic chain.
59
66
*/
60
- ToolCenterPoint (const Eigen::Isometry3d& transform, bool external = false );
67
+ ToolCenterPoint (const Eigen::Isometry3d& transform, bool external = false , std::string external_frame = " " );
61
68
62
69
/* *
63
70
* @brief The Tool Center Point is empty
@@ -80,15 +87,26 @@ class ToolCenterPoint
80
87
/* *
81
88
* @brief Check if tool center point is and external tcp which mean it is not defined
82
89
* @details The external TCP is used when the robot is holding the part verus the tool.
90
+ * External should also be set to true your kinematic object which includes say a robot and
91
+ * positioner, and the positioner has the tool and the robot is holding the part. Basically
92
+ * anytime the tool is not attached to the tip link of the kinematic chain.
83
93
* @return True if and external TCP, otherwise the false
84
94
*/
85
95
bool isExternal () const ;
86
96
87
97
/* *
88
98
* @brief Set the external property
89
99
* @param value True if external tool center point, otherwise false
100
+ * @param external_frame If an external tcp was defined as an Isometry then an external can be provided. If empty
101
+ * assumed relative to world.
90
102
*/
91
- void setExternal (bool value);
103
+ void setExternal (bool value, std::string external_frame);
104
+
105
+ /* *
106
+ * @brief If an external tcp was defined as an Isometry then an external frame can be provided.
107
+ * If empty assumed relative to world.
108
+ */
109
+ const std::string& getExternalFrame () const ;
92
110
93
111
/* *
94
112
* @brief Get the tool center point name
@@ -109,6 +127,7 @@ class ToolCenterPoint
109
127
ret_val &= (name_ == other.name_ );
110
128
ret_val &= (transform_.isApprox (transform_, 1e-5 ));
111
129
ret_val &= (external_ == other.external_ );
130
+ ret_val &= (external_frame_ == other.external_frame_ );
112
131
return ret_val;
113
132
}
114
133
@@ -117,8 +136,19 @@ class ToolCenterPoint
117
136
std::string name_;
118
137
Eigen::Isometry3d transform_;
119
138
120
- /* * @brief The external TCP is used when the robot is holding the part verus the tool. */
139
+ /* *
140
+ * @brief The external TCP is used when the robot is holding the part verus the tool.
141
+ * @details External should also be set to true your kinematic object which includes say a robot and
142
+ * positioner, and the positioner has the tool and the robot is holding the part. Basically
143
+ * anytime the tool is not attached to the tip link of the kinematic chain.
144
+ */
121
145
bool external_{ false };
146
+
147
+ /* *
148
+ * @brief If an external tcp was defined as an Isometry then an external can be provided. If empty assumed relative to
149
+ * world.
150
+ */
151
+ std::string external_frame_;
122
152
};
123
153
124
154
/* *
0 commit comments