Skip to content
Snippets Groups Projects
Commit 0b70e564 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add member Handle::clearance_

parent a2910a8e
No related branches found
No related tags found
No related merge requests found
...@@ -124,6 +124,24 @@ namespace hpp { ...@@ -124,6 +124,24 @@ namespace hpp {
return handle->createGrasp(gripper); return handle->createGrasp(gripper);
} }
/// Get the clearance
///
/// The clearance is a distance, from the center of the gripper and along
/// the x-aixs, that "ensures" an object being at that distance is not
/// colliding with this gripper.
/// It also gives an order of magnitude of the size of the gripper.
value_type clearance () const
{
return clearance_;
}
/// Set the clearance
/// \sa clearance()
void clearance (const value_type& clearance)
{
clearance_ = clearance;
}
protected: protected:
/// Constructor /// Constructor
/// \param robot the robot that grasps the handle, /// \param robot the robot that grasps the handle,
...@@ -133,7 +151,8 @@ namespace hpp { ...@@ -133,7 +151,8 @@ namespace hpp {
Handle (const std::string& name, const Transform3f& localPosition, Handle (const std::string& name, const Transform3f& localPosition,
const JointPtr_t& joint) : name_ (name), const JointPtr_t& joint) : name_ (name),
localPosition_ (localPosition), localPosition_ (localPosition),
joint_ (joint), weakPtr_ () joint_ (joint), clearance_ (0),
weakPtr_ ()
{ {
} }
void init (HandleWkPtr_t weakPtr) void init (HandleWkPtr_t weakPtr)
...@@ -149,6 +168,8 @@ namespace hpp { ...@@ -149,6 +168,8 @@ namespace hpp {
Transform3f localPosition_; Transform3f localPosition_;
/// Joint to which the handle is linked. /// Joint to which the handle is linked.
JointPtr_t joint_; JointPtr_t joint_;
/// Clearance
value_type clearance_;
/// Weak pointer to itself /// Weak pointer to itself
HandleWkPtr_t weakPtr_; HandleWkPtr_t weakPtr_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment