![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpForceTorqueIitSensor.h>
Public Member Functions | |
| vpForceTorqueIitSensor () | |
| ~vpForceTorqueIitSensor () | |
| void | bias () |
| bool | connected (int timeout_ms=0) const |
| vpColVector | getForceTorque () |
| void | startStreaming () |
| void | stopStreaming () |
Protected Member Functions | |
| void | acquisitionLoop () |
| void | close () |
| void | join () |
Protected Attributes | |
| ftSensorLib | m_ftLib |
| int | m_numSensorsInLib |
| vpColVector | m_ft |
| ftSensorsConnected | m_ftSensorsData {} |
| std::atomic< bool > | m_acquisitionEnabled |
| std::atomic< bool > | m_dataValid |
| bool | m_connected |
| std::thread | m_acquisitionThread |
| std::chrono::time_point< std::chrono::system_clock > | m_timeCur |
| std::chrono::time_point< std::chrono::system_clock > | m_timePrev |
| std::mutex | m_mutex |
| int | m_warmupMilliseconds |
This class is a wrapper over six axis load measurement (forces and torques) from IIT (ISTITUTO ITALIANO DI TECNOLOGIA) sell by Alberobotics.
The following example shows how to use this class to stream force-torque data at 1kHz and print a measurement each second.
Once build, in the same folder as the binary you should find a configuration file named configurationSettings.ini.
$VISP_WS/modules/sensor/test/force-torque/configurationSettings.ini with default settings. LOCAL_IFACE_IP = 192.168.100.100 ; Host Computer's local interface IP LOCAL_IFACE = enp0s31f6 ; Host Computer's local interface name (it is required only in Linux)
192.168.1.1. Browsing to this address with Firefox allows to modify it's default IP address. If the new sensor IP address is for example 192.168.100.10, you need to modify the following line: USE_DEFAULT_SETTINGS = false ; If "true", the library will use the
; DEFAULT_SETTINGS. Note that the sensor
; needs to be in the "DEF" IP position.
; If "false", the library will use the
; USER_SETTINGS to initialize the communication
; with the sensor.
[USER_SETTINGS] ; USER SETTINGS FOR USE IN SINGLE_SENSOR_MODE when USE_DEFAULT_SETTINGS=false
USER_IP = 192.168.100.10 ; User Sensor IPWhen running a binary that uses vpForceTorqueIitSensor class,
LD_LIBRARY_PATH environment variable. This could be achieved running: $VISP_WS/3rdparty/FT_SDK_01_4 contains IIT SDK. Definition at line 141 of file vpForceTorqueIitSensor.h.
| vpForceTorqueIitSensor::vpForceTorqueIitSensor | ( | ) |
Default constructor.
Establish communication with sensor(-s) and start data acquisition thread.
Definition at line 53 of file vpForceTorqueIitSensor.cpp.
| vpForceTorqueIitSensor::~vpForceTorqueIitSensor | ( | ) |
Destructor that stops streaming
Definition at line 92 of file vpForceTorqueIitSensor.cpp.
|
protected |
Acquisition loop. Warm up the sensor
Definition at line 107 of file vpForceTorqueIitSensor.cpp.
| void vpForceTorqueIitSensor::bias | ( | ) |
Bias all sensors by TCP.
Definition at line 158 of file vpForceTorqueIitSensor.cpp.
|
protected |
Stops data streaming.
Definition at line 82 of file vpForceTorqueIitSensor.cpp.
| bool vpForceTorqueIitSensor::connected | ( | int | timeout_ms = 0 | ) | const |
Return true if communication established with at least one sensor.
| timeout_ms | : Timeout in milliseconds. |
If you get the following error:
it means probably that you didn't set the right parameters in the configuration file configurationSettings.ini. See class description to get some hints.
Definition at line 171 of file vpForceTorqueIitSensor.cpp.
| vpColVector vpForceTorqueIitSensor::getForceTorque | ( | ) |
Get force-torque data in SI units.
Definition at line 185 of file vpForceTorqueIitSensor.cpp.
|
protected |
Join acquisition thread.
Definition at line 97 of file vpForceTorqueIitSensor.cpp.
| void vpForceTorqueIitSensor::startStreaming | ( | ) |
Start acquisition thread and wait until data are available.
Definition at line 194 of file vpForceTorqueIitSensor.cpp.
| void vpForceTorqueIitSensor::stopStreaming | ( | ) |
Stop acquisition thread.
Definition at line 207 of file vpForceTorqueIitSensor.cpp.
|
protected |
Definition at line 167 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 171 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 169 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 168 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 163 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 160 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 165 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 174 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 161 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 172 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 172 of file vpForceTorqueIitSensor.h.
|
protected |
Definition at line 175 of file vpForceTorqueIitSensor.h.