class mrpt::hwdrivers::CGyroKVHDSP3000

A class for interfacing KVH DSP 3000 gyroscope with an assynchronous serial communication (product SN : 02-1222-01).

It uses a serial port connection to the device. The class implements the generic sensor class. See also the application “rawlog-grabber” for a ready-to-use application to gather data from the scanner. The generated observation is a CObservationIMU, but only the yaw angular velocity and the absolute yaw position are are set in the vector CObservationIMU::rawMeasurements. The sensor process rate is imposed by hardware at 100Hz. For now, this sensor is only supported on posix system.

   PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
  -------------------------------------------------------
    [supplied_section_name]
     process_rate = 100             ; MUST be 100 Hz.
     pose_x=0       ; Sensor 3D position relative to the robot (meters)
     pose_y=0
     pose_z=0
     pose_yaw=0 ; Angles in degrees
     pose_pitch=0
     pose_roll=0
     sensorLabel = <label> ; Label of the sensor
     COM_port_LIN   = /dev/ttyUSB0       ; COM PORT in LINUX
     operatingMode = <"rate"/"integrated", "incremental">  ; Default mode is
*Rate.

In most of the communs applications, this class will be used as :

CGyroKVHDSP3000 kvh;
/// ...
CConfigFile conf("conf.ini");
/// ...
kvh.loadConfig_sensorSpecific(conf, "KVH");
/// ...
while(1) {
  kvh.doProcess();
      TListObservations rateObs;
  kvh.getObservations(rateObs);
      // ....
#include <mrpt/hwdrivers/CGyroKVHDSP3000.h>

class CGyroKVHDSP3000: public mrpt::hwdrivers::CGenericSensor
{
public:
    //
methods

    virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase& configSource, const std::string& iniSection);
    virtual void doProcess();
    virtual void initialize();
    void resetIncrementalAngle();
    void changeMode(GYRO_MODE _newMode);
};

Inherited Members

public:
    //
methods

    CGenericSensor& operator = (const CGenericSensor&);
    virtual void doProcess() = 0;

Methods

virtual void loadConfig_sensorSpecific(
    const mrpt::config::CConfigFileBase& configSource,
    const std::string& iniSection
    )

See the class documentation at the top for expected parameters.

virtual void doProcess()

This method will be invoked at a minimum rate of “process_rate” (Hz)

Parameters:

This

method must throw an exception with a descriptive message if some critical error is found.

virtual void initialize()

Turns on the KVH DSP 3000 device and configure it for getting orientation data.

you must have called loadConfig_sensorSpecific before calling this function.

void resetIncrementalAngle()

Send to the sensor the command ‘Z’ wich reset the integrated angle.

(in both rate mode and incremental, this function has no effect)