Visual Servoing Platform  version 3.4.0
vpReflexTakktile2 Class Reference

#include <vpReflexTakktile2.h>

Classes

class  HandInfo
 

Public Member Functions

 vpReflexTakktile2 ()
 
virtual ~vpReflexTakktile2 ()
 
void calibrate ()
 
void disableTorque ()
 
HandInfo getHandInfo ()
 
int getNumFingers () const
 
int getNumSensorsPerFinger () const
 
int getNumServos () const
 
vpColVector getPosition () const
 
vpColVector getVelocity () const
 
void open ()
 
void setFingerConfigFile (const std::string &finger_file_name)
 
void setMotorConfigFile (const std::string &motor_file_name)
 
void setNetworkInterface (const std::string &network_interface="eth0")
 
void setPosition (const vpColVector &targets)
 
void setTactileConfigFile (const std::string &tactile_file_name)
 
void setTactileThreshold (int threshold)
 
void setTactileThreshold (const std::vector< int > &thresholds)
 
void setPositioningVelocity (const vpColVector &targets)
 
void setVelocityUntilAnyContact (const vpColVector &targets)
 
void setVelocityUntilEachContact (const vpColVector &targets)
 
void wait (int milliseconds)
 

Protected Attributes

std::string m_network_interface
 
std::string m_finger_file_name
 
std::string m_tactile_file_name
 
std::string m_motor_file_name
 
HandInfo m_hand_info
 

Detailed Description

Right Hand Robotics Reflex Takktile 2 hand controller.

See https://www.labs.righthandrobotics.com/docs for more details.

This class was tested with the Reflex Takktile2 hand.

To communicate by Ethernet with the hand we recommend to setup computer network with a static configuration:

IP: 10.1.1.10
Gateway: 254.0.0.0
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 69 of file vpReflexTakktile2.h.

Constructor & Destructor Documentation

vpReflexTakktile2::vpReflexTakktile2 ( )

Default constructor.

Definition at line 123 of file vpReflexTakktile2.cpp.

vpReflexTakktile2::~vpReflexTakktile2 ( )
virtual

Destructor.

Definition at line 132 of file vpReflexTakktile2.cpp.

Member Function Documentation

void vpReflexTakktile2::calibrate ( )

Calibrates the tactile sensors and fingers.

Examples:
takktile2-control.cpp.

Definition at line 137 of file vpReflexTakktile2.cpp.

void vpReflexTakktile2::disableTorque ( )

Puts the dynamixels motors into idle mode.

Examples:
takktile2-control.cpp.

Definition at line 142 of file vpReflexTakktile2.cpp.

int vpReflexTakktile2::getNumFingers ( ) const
Returns
Number of fingers.

Definition at line 178 of file vpReflexTakktile2.cpp.

int vpReflexTakktile2::getNumSensorsPerFinger ( ) const
Returns
Number of sensors per finger.

Definition at line 183 of file vpReflexTakktile2.cpp.

int vpReflexTakktile2::getNumServos ( ) const
Returns
Number of servos.

Definition at line 173 of file vpReflexTakktile2.cpp.

vpColVector vpReflexTakktile2::getPosition ( ) const
Returns
4-dim vector corresponding to the position in [rad] of finger 1, 2 and 3 and preshape respectively.

Definition at line 189 of file vpReflexTakktile2.cpp.

vpColVector vpReflexTakktile2::getVelocity ( ) const
Returns
4-dim vector corresponding to the velocity in [rad/s] of finger 1, 2 and 3 and preshape respectively.

Definition at line 202 of file vpReflexTakktile2.cpp.

void vpReflexTakktile2::open ( )

Open Ethernet connection to Reflex Takktile 2 hand.

Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 319 of file vpReflexTakktile2.cpp.

References m_finger_file_name, m_motor_file_name, m_network_interface, and m_tactile_file_name.

void vpReflexTakktile2::setFingerConfigFile ( const std::string &  finger_file_name)
inline

Set yaml file used to calibrate fingers.

Parameters
finger_file_name: Finger calibration file.
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 117 of file vpReflexTakktile2.h.

void vpReflexTakktile2::setMotorConfigFile ( const std::string &  motor_file_name)
inline

Set yaml file used to define motor constants.

Parameters
motor_file_name: Motor constant file.
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 123 of file vpReflexTakktile2.h.

void vpReflexTakktile2::setNetworkInterface ( const std::string &  network_interface = "eth0")
inline

Set network interface name.

Parameters
network_interface: Network interface name used to communicate with the Right Hand. Use ifconfig command to know the name of this interface.
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 130 of file vpReflexTakktile2.h.

void vpReflexTakktile2::setPosition ( const vpColVector targets)

Set hand position. This function commands the motors from radians, using the zero references from yaml/finger_calibrate.yaml file to translate into the raw Dynamixel values.

Parameters
targets: 4-dim vector with angular positions in [rad] for finger 1, 2, 3 and preshape respectively.
See also
setPositioningVelocity()
Examples:
takktile2-control.cpp.

Definition at line 219 of file vpReflexTakktile2.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

void vpReflexTakktile2::setPositioningVelocity ( const vpColVector targets)

Changes the positioning speed of the motor.

Parameters
targets: 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively.
See also
setPosition()
Examples:
takktile2-control.cpp.

Definition at line 267 of file vpReflexTakktile2.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

void vpReflexTakktile2::setTactileConfigFile ( const std::string &  tactile_file_name)
inline

Set yaml file used to calibrate tactile sensors.

Parameters
tactile_file_name: Tactile calibration file.
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 138 of file vpReflexTakktile2.h.

void vpReflexTakktile2::setTactileThreshold ( int  threshold)

Sets the same tactile threshold level to all tactile sensors for reporting contact.

Parameters
threshold: Value between 0 and 1000.
See also
setTactileThreshold(std::vector<int> &)
Examples:
takktile2-control.cpp.

Definition at line 238 of file vpReflexTakktile2.cpp.

void vpReflexTakktile2::setTactileThreshold ( const std::vector< int > &  thresholds)

Sets the threshold level to each tactile sensor for reporting contact.

Parameters
thresholds: This vector is of dim the number of fingers multiplied by the number of tactile sensors per finger. Values are between 0 and 1000.
See also
setTactileThreshold(int)

Definition at line 247 of file vpReflexTakktile2.cpp.

References vpException::dimensionError.

void vpReflexTakktile2::setVelocityUntilAnyContact ( const vpColVector targets)

Moves the fingers in until any of them makes contact with an object.

Parameters
targets: 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively.
Examples:
takktile2-control.cpp.

Definition at line 285 of file vpReflexTakktile2.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

void vpReflexTakktile2::setVelocityUntilEachContact ( const vpColVector targets)

Moves the fingers in until each finger makes contact with an object.

Parameters
targets: 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively.
Examples:
takktile2-control.cpp.

Definition at line 303 of file vpReflexTakktile2.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

void vpReflexTakktile2::wait ( int  milliseconds)

Tries to communicate with the Reflex Hand object.

Parameters
milliseconds: Duration in [ms].
Examples:
takktile2-control.cpp, and takktile2-read-data.cpp.

Definition at line 330 of file vpReflexTakktile2.cpp.

Member Data Documentation

std::string vpReflexTakktile2::m_finger_file_name
protected

Definition at line 151 of file vpReflexTakktile2.h.

Referenced by open().

HandInfo vpReflexTakktile2::m_hand_info
protected

Definition at line 154 of file vpReflexTakktile2.h.

Referenced by getHandInfo().

std::string vpReflexTakktile2::m_motor_file_name
protected

Definition at line 153 of file vpReflexTakktile2.h.

Referenced by open().

std::string vpReflexTakktile2::m_network_interface
protected

Definition at line 150 of file vpReflexTakktile2.h.

Referenced by open().

std::string vpReflexTakktile2::m_tactile_file_name
protected

Definition at line 152 of file vpReflexTakktile2.h.

Referenced by open().