43 #ifndef ATIForceTorqueSensorHWRS485_INCLUDEDEF_H 44 #define ATIForceTorqueSensorHWRS485_INCLUDEDEF_H 58 #include <boost/thread.hpp> 63 #define MODBUSBAUD_1250K 1250000 64 #define MODBUSBAUD_115200 115200 65 #define MODBUSBAUD_19200 19200 91 #define ST_WATCHDOG_RESET 1 92 #define ST_EXC_VOLTAGE_HIGH 2 93 #define ST_EXC_VOLTAGE_LOW 4 94 #define ST_ART_ANALOG_GRND_OOR 8 95 #define ST_PWR_HIGH 16 98 #define ST_EEPROM_ERR 128 99 #define ST_INV_CONF_DATA 256 100 #define ST_STRAIN_GAGE_SUPPLY_HIGH 512 101 #define ST_STRAIN_GAGE_SUPPLY_LOW 1024 102 #define ST_THERMISTOR_HIGH 2048 103 #define ST_THERMISTOR_LOW 4096 104 #define ST_DAC_READING_OOR 8192 166 virtual bool initCommunication(
int type, std::string
path,
int baudrate,
int base_identifier);
174 bool ReadFTCalibrationData(
const unsigned int calibrationNumber = 1);
182 bool ReadStatusWord()
const;
191 bool SetBaudRate(
const int value,
const bool setVolatile =
true);
197 bool SetSessionID(
const uint16_t sessionID);
204 bool ReadSessionID(uint16_t &sessionID)
const;
221 bool StartStreaming();
226 bool StopStreaming();
238 virtual bool readFTData(
int statusCode,
double& Fx,
double& Fy,
double& Fz,
double& Tx,
double& Ty,
double& Tz);
249 bool SetActiveGain(
const uint16_t ag0,
const uint16_t ag1,
const uint16_t ag2,
const uint16_t ag3,
const uint16_t ag4,
const uint16_t ag5)
const;
260 bool SetActiveOffset(
const uint16_t ao0,
const uint16_t ao1,
const uint16_t ao2,
const uint16_t ao3,
const uint16_t ao4,
const uint16_t ao5)
const;
266 void SetCalibMatrix(
const float (&matrix)[6][6]);
278 void StrainGaugeToForce(
const int &sg0,
const int &sg1,
const int &sg2,
const int &sg3,
const int &sg4,
const int &sg5);
292 bool SetStorageLock(
const bool lock)
const;
302 bool OpenRawConnection();
304 bool ValidateFTData(
const uint8_t (&buf)[26])
const;
306 bool SendStopSequence();
319 bool m_isStreaming =
false;
321 long unsigned int m_bufferTimeout = 10000000;
328 unsigned int bufferSize = 0;
std::string calibFamilyID
long unsigned int bytesRead
std::string calibPartNumberNumber
boost::thread m_readThread
const std::string TorqueUnitNames[]
CalibrationData m_calibrationData
uint8_t m_ModbusBaseIdentifier
const std::string ForceUnitNames[]
std::mutex m_buffer_mutex
Eigen::MatrixXf m_vForceData
Eigen::MatrixXf m_mXCalibMatrix
ros::Time lastValidTimeStamp
std::string calibSerialNumber
TorqueUnit torqueUnitsInt
std::string m_RS485Device
std::string torqueUnitStr