![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpForceTorqueAtiSensor.h>
Public Member Functions | |
vpForceTorqueAtiSensor () | |
virtual | ~vpForceTorqueAtiSensor () |
void | bias () |
void | close () |
std::string | getCalibrationFile () const |
vpColVector | getForceTorque () const |
vpColVector | getForceTorqueAsync () const |
std::string | getForceUnits () const |
std::string | getTorqueUnits () const |
void | open () |
void | setCalibrationFile (const std::string &calibfile, unsigned short index=1) |
void | unbias () |
Protected Attributes | |
std::string | m_calibfile |
unsigned short | m_index |
unsigned short | m_num_axes |
unsigned short | m_num_channels |
vpColVector | m_sample_bias |
Protected Member Functions Inherited from vpComedi | |
std::string | m_device |
comedi_t * | m_handler |
unsigned int | m_subdevice |
unsigned int | m_range |
unsigned int | m_aref |
unsigned int | m_nchannel |
std::vector< comedi_range * > | m_range_info |
std::vector< lsampl_t > | m_maxdata |
std::vector< unsigned int > | m_chanlist |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpForceTorqueAtiSensor &ati) |
Inherited functionalities from vpComedi | |
comedi_t * | getHandler () const |
std::vector< lsampl_t > | getMaxData () const |
unsigned int | getNChannel () const |
vpColVector | getPhyData () const |
std::string | getPhyDataUnits () const |
std::vector< comedi_range * > | getRangeInfo () const |
unsigned int | getSubDevice () const |
void | setAnalogReference (const unsigned int &aref) |
void | setChannelNumbers (const unsigned int &nchannel) |
void | setDevice (const std::string &device) |
void | setRange (const unsigned int &range) |
void | setSubDevice (const unsigned int &subdevice) |
std::vector< lsampl_t > | getRawData () const |
Interface for ATI force/torque sensor. This class works only under linux-like OS. It requires Comedi 3rd party. Installation instructions are provided here https://visp.inria.fr/3rd_comedi.
Comedi is the linux control and measurement device interface. For more information see http://www.comedi.org.
This class was tested with ATI Gamma 65-SI FT sensor connected to a National Instrument NI DAQmx PCI-6220 board.
Synchronous F/T data acquisition is performed using getForceTorque(). The call to the function blocks until the whole acquisition has finished.
The following example shows how to get single measures from an ATI F/T device each 10 ms (100 Hz).
Definition at line 89 of file vpForceTorqueAtiSensor.h.
vpForceTorqueAtiSensor::vpForceTorqueAtiSensor | ( | ) |
Default constructor.
Definition at line 52 of file vpForceTorqueAtiSensor.cpp.
|
virtual |
Destructor that closes the connection to the device.
Definition at line 189 of file vpForceTorqueAtiSensor.cpp.
void vpForceTorqueAtiSensor::bias | ( | ) |
Bias the sensor storing an unloaded measurement; this removes the effect of tooling weight.
Definition at line 72 of file vpForceTorqueAtiSensor.cpp.
void vpForceTorqueAtiSensor::close | ( | ) |
Close the calibration structure opened using setCalibrationFile() and close the connection to the device.
Definition at line 123 of file vpForceTorqueAtiSensor.cpp.
|
inline |
Return the calibration file location specified using setCalibrationFile().
Definition at line 102 of file vpForceTorqueAtiSensor.h.
vpColVector vpForceTorqueAtiSensor::getForceTorque | ( | ) | const |
Get a 6-dimension force/torque vector from device. This function performs synchronously one single data acquisition. "Synchronous" means that the calling process blocks until the data acquisition has finished.
Definition at line 141 of file vpForceTorqueAtiSensor.cpp.
vpColVector vpForceTorqueAtiSensor::getForceTorqueAsync | ( | ) | const |
std::string vpForceTorqueAtiSensor::getForceUnits | ( | ) | const |
Get force units.
Definition at line 172 of file vpForceTorqueAtiSensor.cpp.
|
inlineinherited |
Get native Comedi handler.
Definition at line 118 of file vpComedi.h.
|
inlineinherited |
Get max data per channel. The returned vector is of dimension the number of channels.
Definition at line 121 of file vpComedi.h.
|
inlineinherited |
|
inherited |
Get physical data from device with units in Volts or mA. To know which unit is used, call getPhyDataUnits().
Definition at line 135 of file vpComedi.cpp.
|
inherited |
Get units (V or mA) of the physical data acquired by getPhyData() or getPhyDataAsync().
Definition at line 157 of file vpComedi.cpp.
|
inlineinherited |
Get data range information per channel. The returned vector is of dimension the number of channels.
Definition at line 130 of file vpComedi.h.
|
protectedinherited |
Get raw data from device. If you selected an analog input subdevice, the output is an unsigned number, for example between 0 and 65535 for a 16 bit analog input, with 0 representing the lowest voltage of the ADC, and a hardware-dependent maximum value representing the highest voltage.
Definition at line 107 of file vpComedi.cpp.
|
inlineinherited |
Get comedi subdevice.
Definition at line 132 of file vpComedi.h.
std::string vpForceTorqueAtiSensor::getTorqueUnits | ( | ) | const |
Get torque units.
Definition at line 180 of file vpForceTorqueAtiSensor.cpp.
void vpForceTorqueAtiSensor::open | ( | ) |
Open the connection to the device.
Definition at line 61 of file vpForceTorqueAtiSensor.cpp.
|
inlineinherited |
Set analog reference type.
aref | : The aref parameter specifies an analog reference to use: AREF_GROUND, AREF_COMMON, AREF_DIFF, or AREF_OTHER. |
Definition at line 141 of file vpComedi.h.
void vpForceTorqueAtiSensor::setCalibrationFile | ( | const std::string & | calibfile, |
unsigned short | index = 1 |
||
) |
Open ATI calibration file that should correspond to your F/T sensor.
calibfile | : ATI calibration file. This file has the following pattern: FT*.cal. |
index | : Index of calibration in file (default = 1). |
Definition at line 197 of file vpForceTorqueAtiSensor.cpp.
|
inlineinherited |
Number of channels to read from sensor. For a 6-dim force/torque sensor use 6.
Definition at line 147 of file vpComedi.h.
|
inlineinherited |
Set comedi device name. Default value is /dev/comedi0.
Definition at line 150 of file vpComedi.h.
|
inlineinherited |
Set the range parameter that is the zero-based index of one of the gain ranges supported by the channel. This is a number from 0 to N-1 where N is the number of ranges supported by the channel.
Definition at line 157 of file vpComedi.h.
|
inlineinherited |
Set comedi analog input subdevice.
Definition at line 159 of file vpComedi.h.
void vpForceTorqueAtiSensor::unbias | ( | ) |
Unbias the sensor.
Definition at line 96 of file vpForceTorqueAtiSensor.cpp.
|
friend |
Return information from calibration file.
os | : Input stream. |
ati | : ATI F/T sensor interface. |
The following example shows how to use this method.
Definition at line 237 of file vpForceTorqueAtiSensor.cpp.
|
protectedinherited |
Analog reference
Definition at line 172 of file vpComedi.h.
|
protected |
ATI calibration file FT*.cal.
Definition at line 116 of file vpForceTorqueAtiSensor.h.
|
protectedinherited |
Channel list
Definition at line 176 of file vpComedi.h.
|
protectedinherited |
Comedi device name (default: /dev/comedi0)
Definition at line 168 of file vpComedi.h.
|
protectedinherited |
Comedi handler
Definition at line 169 of file vpComedi.h.
|
protected |
Index of calibration in file (default: 1)
Definition at line 117 of file vpForceTorqueAtiSensor.h.
|
protectedinherited |
Max data value
Definition at line 175 of file vpComedi.h.
|
protectedinherited |
Number of channels
Definition at line 173 of file vpComedi.h.
|
protected |
Number of axis or gages available from the sensor.
Definition at line 118 of file vpForceTorqueAtiSensor.h.
|
protected |
Number of channels available from the sensor.
Definition at line 119 of file vpForceTorqueAtiSensor.h.
|
protectedinherited |
Range of a channel
Definition at line 171 of file vpComedi.h.
|
protectedinherited |
Range information
Definition at line 174 of file vpComedi.h.
|
protected |
Sample value used for bias.
Definition at line 120 of file vpForceTorqueAtiSensor.h.
|
protectedinherited |
Input subdevice
Definition at line 170 of file vpComedi.h.