Visual Servoing Platform
version 3.6.1 under development (2024-11-15)
|
#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 |
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
Definition at line 67 of file vpReflexTakktile2.h.
vpReflexTakktile2::vpReflexTakktile2 | ( | ) |
Default constructor.
Definition at line 121 of file vpReflexTakktile2.cpp.
|
virtual |
Destructor.
Definition at line 129 of file vpReflexTakktile2.cpp.
void vpReflexTakktile2::calibrate | ( | ) |
Calibrates the tactile sensors and fingers.
Definition at line 134 of file vpReflexTakktile2.cpp.
void vpReflexTakktile2::disableTorque | ( | ) |
Puts the dynamixels motors into idle mode.
Definition at line 139 of file vpReflexTakktile2.cpp.
vpReflexTakktile2::HandInfo vpReflexTakktile2::getHandInfo | ( | ) |
Returns hand info data.
Definition at line 144 of file vpReflexTakktile2.cpp.
References vpReflexTakktile2::HandInfo::contact, vpReflexTakktile2::HandInfo::distal_approx, vpReflexTakktile2::HandInfo::error_state, vpReflexTakktile2::HandInfo::joint_angle, vpReflexTakktile2::HandInfo::load, m_hand_info, vpReflexTakktile2::HandInfo::pressure, vpReflexTakktile2::HandInfo::proximal, vpReflexTakktile2::HandInfo::raw_angle, vpReflexTakktile2::HandInfo::temperature, vpReflexTakktile2::HandInfo::velocity, and vpReflexTakktile2::HandInfo::voltage.
int vpReflexTakktile2::getNumFingers | ( | ) | const |
Definition at line 175 of file vpReflexTakktile2.cpp.
int vpReflexTakktile2::getNumSensorsPerFinger | ( | ) | const |
Definition at line 180 of file vpReflexTakktile2.cpp.
int vpReflexTakktile2::getNumServos | ( | ) | const |
Definition at line 170 of file vpReflexTakktile2.cpp.
vpColVector vpReflexTakktile2::getPosition | ( | ) | const |
Definition at line 186 of file vpReflexTakktile2.cpp.
vpColVector vpReflexTakktile2::getVelocity | ( | ) | const |
Definition at line 199 of file vpReflexTakktile2.cpp.
void vpReflexTakktile2::open | ( | ) |
Open Ethernet connection to Reflex Takktile 2 hand.
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.
|
inline |
Set yaml file used to calibrate fingers.
finger_file_name | : Finger calibration file. |
Definition at line 115 of file vpReflexTakktile2.h.
|
inline |
Set yaml file used to define motor constants.
motor_file_name | : Motor constant file. |
Definition at line 121 of file vpReflexTakktile2.h.
|
inline |
Set network interface name.
network_interface | : Network interface name used to communicate with the Right Hand. Use ifconfig command to know the name of this interface. |
Definition at line 128 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.
targets | : 4-dim vector with angular positions in [rad] for finger 1, 2, 3 and preshape respectively. |
Definition at line 216 of file vpReflexTakktile2.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
void vpReflexTakktile2::setPositioningVelocity | ( | const vpColVector & | targets | ) |
Changes the positioning speed of the motor.
targets | : 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively. |
Definition at line 264 of file vpReflexTakktile2.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
|
inline |
Set yaml file used to calibrate tactile sensors.
tactile_file_name | : Tactile calibration file. |
Definition at line 136 of file vpReflexTakktile2.h.
void vpReflexTakktile2::setTactileThreshold | ( | const std::vector< int > & | thresholds | ) |
Sets the threshold level to each tactile sensor for reporting contact.
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. |
Definition at line 244 of file vpReflexTakktile2.cpp.
References vpException::dimensionError.
void vpReflexTakktile2::setTactileThreshold | ( | int | threshold | ) |
Sets the same tactile threshold level to all tactile sensors for reporting contact.
threshold | : Value between 0 and 1000. |
Definition at line 235 of file vpReflexTakktile2.cpp.
void vpReflexTakktile2::setVelocityUntilAnyContact | ( | const vpColVector & | targets | ) |
Moves the fingers in until any of them makes contact with an object.
targets | : 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively. |
Definition at line 282 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.
targets | : 4-dim vector with angular velocities in [rad/s] for finger 1, 2, 3 and preshape respectively. |
Definition at line 300 of file vpReflexTakktile2.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
void vpReflexTakktile2::wait | ( | int | milliseconds | ) |
Tries to communicate with the Reflex Hand object.
milliseconds | : Duration in [ms]. |
Definition at line 327 of file vpReflexTakktile2.cpp.
|
protected |
Definition at line 149 of file vpReflexTakktile2.h.
Referenced by open().
|
protected |
Definition at line 152 of file vpReflexTakktile2.h.
Referenced by getHandInfo().
|
protected |
Definition at line 151 of file vpReflexTakktile2.h.
Referenced by open().
|
protected |
Definition at line 148 of file vpReflexTakktile2.h.
Referenced by open().
|
protected |
Definition at line 150 of file vpReflexTakktile2.h.
Referenced by open().