iCub-main
|
canbusinertialmtb
: driver for CAN communication with inertial sensors (accelerometers, gyroscopes) mounted on MTB boards.
More...
#include <CanBusInertialMTB.h>
Public Member Functions | |
CanBusInertialMTB (int period=20) | |
~CanBusInertialMTB () | |
virtual bool | open (yarp::os::Searchable &config) |
virtual bool | close () |
virtual int | read (yarp::sig::Vector &out) |
virtual int | getState (int ch) |
virtual int | getChannels () |
int | calibrateSensor () |
virtual int | calibrateChannel (int ch, double v) |
virtual int | calibrateSensor (const yarp::sig::Vector &v) |
virtual int | calibrateChannel (int ch) |
virtual bool | threadInit () |
virtual void | threadRelease () |
virtual void | run () |
Protected Attributes | |
PolyDriver | driver |
ICanBus * | pCanBus |
ICanBufferFactory * | pCanBufferFactory |
CanBuffer | inBuffer |
CanBuffer | outBuffer |
std::mutex | mtx |
std::vector< MTBInertialBoardInfo > | boards |
int | nrOfTotalChannels |
yarp::sig::Vector | data |
yarp::sig::Vector | privateData |
std::vector< short > | sharedStatus |
std::vector< short > | privateStatus |
short | sharedGlobalStatus |
short | privateGlobalStatus |
bool | initted |
int | count |
canbusinertialmtb
: driver for CAN communication with inertial sensors (accelerometers, gyroscopes) mounted on MTB boards.
The minimum MTB firmware version supported by this device is 2.10.17 .
It is possible to read from multiple MTB. This readings will be combined in a single vector.
YARP device name |
---|
canbusinertialmtb |
Parameters accepted in the config argument of the open method:
Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|
canbusDevice | string | - | - | Yes | Yarp device name of CAN Bus wrapper | - |
physDevice | string | - | - | Yes | Yarp device name for the low level CAN device driver | - |
canDeviceNum | int | - | - | Yes | ID of the CAN Bus line | - |
canAddress | vector of int | - | - | Yes | Vector of the CAN Bus Addresses for the sensor boards | - |
period | int | milliseconds | 10 | No | Period of the thread reading messages from the CAN bus | - |
sensorType | int | - | Yes | Type of sensor to read from MTBs. | Possible values: acc for the internal LIS331DLH accelerometer of the MTB, extAccAndGyro for the external LIS331DLH accelerometer and L3G4200D gyroscope. | |
sensorPeriod | int | milliseconds | 5 | No | Every sensorPeriod milliseconds the MTB publishes the sensor measurements on the CAN Bus | Possible values: from 1 to 255 |
Definition at line 60 of file CanBusInertialMTB.h.
|
inline |
Definition at line 97 of file CanBusInertialMTB.h.
|
inline |
Definition at line 103 of file CanBusInertialMTB.h.
|
virtual |
Definition at line 307 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 295 of file CanBusInertialMTB.cpp.
int CanBusInertialMTB::calibrateSensor | ( | ) |
Definition at line 289 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 301 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 255 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 284 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 278 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 135 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 271 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 369 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 313 of file CanBusInertialMTB.cpp.
|
virtual |
Definition at line 489 of file CanBusInertialMTB.cpp.
|
protected |
Definition at line 83 of file CanBusInertialMTB.h.
|
protected |
Definition at line 95 of file CanBusInertialMTB.h.
|
protected |
Definition at line 87 of file CanBusInertialMTB.h.
|
protected |
Definition at line 75 of file CanBusInertialMTB.h.
|
protected |
Definition at line 78 of file CanBusInertialMTB.h.
|
protected |
Definition at line 94 of file CanBusInertialMTB.h.
|
protected |
Definition at line 81 of file CanBusInertialMTB.h.
|
protected |
Definition at line 85 of file CanBusInertialMTB.h.
|
protected |
Definition at line 79 of file CanBusInertialMTB.h.
|
protected |
Definition at line 77 of file CanBusInertialMTB.h.
|
protected |
Definition at line 76 of file CanBusInertialMTB.h.
|
protected |
Definition at line 88 of file CanBusInertialMTB.h.
|
protected |
Definition at line 92 of file CanBusInertialMTB.h.
|
protected |
Definition at line 90 of file CanBusInertialMTB.h.
|
protected |
Definition at line 91 of file CanBusInertialMTB.h.
|
protected |
Definition at line 89 of file CanBusInertialMTB.h.