Visual Servoing Platform  version 3.5.1 under development (2023-09-22)
vpReflexTakktile2 Class Reference

#include <visp3/robot/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 66 of file vpReflexTakktile2.h.

Constructor & Destructor Documentation

◆ vpReflexTakktile2()

vpReflexTakktile2::vpReflexTakktile2 ( )

Default constructor.

Definition at line 120 of file vpReflexTakktile2.cpp.

◆ ~vpReflexTakktile2()

vpReflexTakktile2::~vpReflexTakktile2 ( )
virtual

Destructor.

Definition at line 129 of file vpReflexTakktile2.cpp.

Member Function Documentation

◆ calibrate()

void vpReflexTakktile2::calibrate ( )

Calibrates the tactile sensors and fingers.

Examples
takktile2-control.cpp.

Definition at line 134 of file vpReflexTakktile2.cpp.

◆ disableTorque()

void vpReflexTakktile2::disableTorque ( )

Puts the dynamixels motors into idle mode.

Examples
takktile2-control.cpp.

Definition at line 139 of file vpReflexTakktile2.cpp.

◆ getHandInfo()

◆ getNumFingers()

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

Definition at line 175 of file vpReflexTakktile2.cpp.

◆ getNumSensorsPerFinger()

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

Definition at line 180 of file vpReflexTakktile2.cpp.

◆ getNumServos()

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

Definition at line 170 of file vpReflexTakktile2.cpp.

◆ getPosition()

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 186 of file vpReflexTakktile2.cpp.

◆ getVelocity()

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 199 of file vpReflexTakktile2.cpp.

◆ open()

void vpReflexTakktile2::open ( )

Open Ethernet connection to Reflex Takktile 2 hand.

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

Definition at line 316 of file vpReflexTakktile2.cpp.

References m_finger_file_name, m_motor_file_name, m_network_interface, and m_tactile_file_name.

◆ setFingerConfigFile()

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 114 of file vpReflexTakktile2.h.

◆ setMotorConfigFile()

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 120 of file vpReflexTakktile2.h.

◆ setNetworkInterface()

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 127 of file vpReflexTakktile2.h.

◆ setPosition()

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 216 of file vpReflexTakktile2.cpp.

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

◆ setPositioningVelocity()

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 264 of file vpReflexTakktile2.cpp.

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

◆ setTactileConfigFile()

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 135 of file vpReflexTakktile2.h.

◆ setTactileThreshold() [1/2]

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 244 of file vpReflexTakktile2.cpp.

References vpException::dimensionError.

◆ setTactileThreshold() [2/2]

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 235 of file vpReflexTakktile2.cpp.

◆ setVelocityUntilAnyContact()

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 282 of file vpReflexTakktile2.cpp.

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

◆ setVelocityUntilEachContact()

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 300 of file vpReflexTakktile2.cpp.

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

◆ wait()

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 327 of file vpReflexTakktile2.cpp.

Member Data Documentation

◆ m_finger_file_name

std::string vpReflexTakktile2::m_finger_file_name
protected

Definition at line 148 of file vpReflexTakktile2.h.

Referenced by open().

◆ m_hand_info

HandInfo vpReflexTakktile2::m_hand_info
protected

Definition at line 151 of file vpReflexTakktile2.h.

Referenced by getHandInfo().

◆ m_motor_file_name

std::string vpReflexTakktile2::m_motor_file_name
protected

Definition at line 150 of file vpReflexTakktile2.h.

Referenced by open().

◆ m_network_interface

std::string vpReflexTakktile2::m_network_interface
protected

Definition at line 147 of file vpReflexTakktile2.h.

Referenced by open().

◆ m_tactile_file_name

std::string vpReflexTakktile2::m_tactile_file_name
protected

Definition at line 149 of file vpReflexTakktile2.h.

Referenced by open().