Go to the documentation of this file.
46 #include <boost/bind.hpp>
47 #include <boost/mem_fn.hpp>
73 cdbg <<
"cDSAUpdater::Updater(): thread started\n";
85 if ( error_level > 0 )
89 boost::this_thread::sleep(boost::posix_time::milliseconds(1000/40));
97 cdbg <<
"cDSAUpdater::Updater(): ignoring " << e->
what() <<
"\n";
105 std::cerr <<
"cDSAUpdater::Updater(): Too many errors from Tactile sensors of SDH. Reconnecting to DSACON32m!\n";
110 boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
115 cdbg <<
"cDSAUpdater::Updater(): ignoring " << e->
what() <<
" while reconnecting step 1\n";
126 cdbg <<
"cDSAUpdater::Updater(): ignoring " << e->
what() <<
" while reconnecting step 2\n";
135 std::cerr <<
"cDSAUpdater::Updater() Succesfully reconnected to DSACON32m of SDH\n";
140 cdbg <<
"cDSAUpdater::Updater(): ignoring " << e->
what() <<
" while reconnecting step 3\n";
150 error_threshold(_error_threshold),
158 cdbg <<
"cDSAUpdater::cDSAUpdater(): Starting new updater thread...";
167 return ts->GetMatrixInfo(m).cells_x *
ts->GetMatrixInfo(m).texel_width *
168 ts->GetMatrixInfo(m).cells_y *
ts->GetMatrixInfo(m).texel_height;
185 for (
int i=0; i<6; i++ )
205 bool is_grasped =
true;
206 for (
int i=0; i<6; i++ )
208 contact_info =
ts->GetContactInfo(i);
SDH::cDSA is the end user interface class to access the DSACON32m, the tactile sensor controller of t...
#define USING_NAMESPACE_SDH
SDH::cDSA * ts
ptr to the cDSA tactile sensor object to use
abstract base class for calculation of IsGrasped condition using tactile sensor information
void SetCondition(double eaf0p, double eaf0d, double eaf1p, double eaf1d, double eaf2p, double eaf2d)
void SetFramerate(UInt16 framerate, bool do_RLE=true, bool do_data_acquisition=true)
USING_NAMESPACE_SDH cDBG cdbg
const sTactileSensorFrame & UpdateFrame()
read the tactile sensor frame from remote DSACON32m and return a reference to it. A command to query ...
virtual bool IsGrasped(void)
void Open(void)
(Re-)open connection to DSACON32m controller, this is called by the constructor automatically,...
double expected_area[6]
array of expected contact area of sensor patch in mm*mm
cDSAUpdater(cDSA *_ts, int _error_threshold=DEFAULT_ERROR_THRESHOLD)
boost::thread updater_thread
This file contains interface to #SDH::cDSA, a class to communicate with the tactile sensors of the SD...
Derived exception class for low-level DSA related exceptions.
A class to print colored debug messages.
void Updater()
the actual run function of the updater thread
This file contains some basic definitions (defines, macros, datatypes)
cIsGraspedByArea(SDH::cDSA *_ts)
default constructor which initializes the internal date
double FullArea(int m)
helper function, return full area of sensor patch m in mm*mm
This file contains settings to make the SDHLibrary compile on differen systems:
This file contains the interface to class #SDH::cSDH, the end user class to access the SDH from a PC.
virtual const char * what() const
helper stuff for the DSA using boost
Interface of auxilliary utility functions for SDHLibrary-CPP.
void Close(void)
Set the framerate of the remote DSACON32m controller to 0 and close connection to it.
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58