7#ifndef __CANBUSFTSENSOR_H__
8#define __CANBUSFTSENSOR_H__
11#include <yarp/os/PeriodicThread.h>
12#include <yarp/dev/PolyDriver.h>
13#include <yarp/dev/CanBusInterface.h>
14#include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
15#include <yarp/sig/Vector.h>
17using namespace yarp::os;
46 public yarp::dev::ISixAxisForceTorqueSensors
50 ANALOG_FORMAT_ERR = 0,
51 ANALOG_FORMAT_8_BIT = 8,
52 ANALOG_FORMAT_16_BIT = 16,
59 ANALOG_NOT_RESPONDING=-1,
72 mutable std::mutex
mtx;
95 virtual bool open(yarp::os::Searchable& config);
111 bool decode8 (
const unsigned char *msg,
int msg_id,
double *
data);
112 bool decode16(
const unsigned char *msg,
int msg_id,
double *
data);
113 bool sensor_start (yarp::os::Searchable& config);
115 bool readFullScaleAnalog(
int ch);
canbusftsensor : driver for CAN communication with IIT's analog sensor boards, including the MAIS and...
virtual bool open(yarp::os::Searchable &config)
virtual yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const override
virtual bool getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const override
unsigned short useCalibration
virtual size_t getNrOfSixAxisForceTorqueSensors() const override
ICanBufferFactory * pCanBufferFactory
AnalogDataFormat dataFormat
virtual bool getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const override
virtual bool threadInit()
CanBusFtSensor(int period=20)
yarp::sig::Vector scaleFactor
virtual bool getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
virtual void threadRelease()