class mrpt::obs::CObservationRawDAQ

Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital channels, counters from encoders, etc.

at one sampling instant. All analog values are assumed to be volts. On timing:

See also:

CObservation

#include <mrpt/obs/CObservationRawDAQ.h>

class CObservationRawDAQ: public mrpt::obs::CObservation
{
public:
    //
fields

    std::vector<uint8_t> AIN_8bits;
    std::vector<uint16_t> AIN_16bits;
    std::vector<uint32_t> AIN_32bits;
    std::vector<float> AIN_float;
    std::vector<double> AIN_double;
    uint16_t AIN_channel_count {0};
    bool AIN_interleaved {true};
    std::vector<uint8_t> AOUT_8bits;
    std::vector<uint16_t> AOUT_16bits;
    std::vector<float> AOUT_float;
    std::vector<double> AOUT_double;
    std::vector<uint8_t> DIN;
    std::vector<uint8_t> DOUT;
    std::vector<uint32_t> CNTRIN_32bits;
    std::vector<double> CNTRIN_double;
    double sample_rate {0};

    //
methods

    virtual void getSensorPose(mrpt::poses::CPose3D&) const;
    virtual void setSensorPose(const mrpt::poses::CPose3D&);
    virtual void getDescriptionAsText(std::ostream& o) const;
};

Inherited Members

public:
    //
fields

    mrpt::system::TTimeStamp timestamp {mrpt::system::now()};
    std::string sensorLabel;

    //
methods

    mrpt::system::TTimeStamp getTimeStamp() const;
    virtual mrpt::system::TTimeStamp getOriginalReceivedTimeStamp() const;
    virtual void load() const;
    virtual void unload();

    template <class METRICMAP>
    bool insertObservationInto(
        METRICMAP* theMap,
        const mrpt::poses::CPose3D* robotPose = nullptr
        ) const;

    virtual void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const = 0;
    void getSensorPose(mrpt::math::TPose3D& out_sensorPose) const;
    virtual void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) = 0;
    void setSensorPose(const mrpt::math::TPose3D& newSensorPose);
    virtual void getDescriptionAsText(std::ostream& o) const;
    std::string getDescriptionAsTextValue() const;

Fields

std::vector<uint16_t> AIN_16bits

Readings from 8-bit analog input (ADCs) channels (vector length=channel count) in ADC units.

std::vector<uint32_t> AIN_32bits

Readings from 16-bit analog input (ADCs) channels (vector length=channel count) in ADC units.

std::vector<float> AIN_float

Readings from 32-bit analog input (ADCs) channels (vector length=channel count) in ADC units.

std::vector<double> AIN_double

Readings from analog input (ADCs) channels (vector length=channel count) in Volts.

uint16_t AIN_channel_count {0}

Readings from analog input (ADCs) channels (vector length=channel count) in Volts.

How many different ADC channels are present in the AIN_* vectors.

bool AIN_interleaved {true}

Whether the channels are interleaved (A0 A1 A2 A0 A1 A2…) or not (A0 A0 A0 A1 A1 A1 A2 A2 A2…) in the AIN_* vectors.

std::vector<uint16_t> AOUT_16bits

Present output values for 8-bit analog output (DACs) channels (vector length=channel count) in DAC units.

std::vector<float> AOUT_float

Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in DAC units.

std::vector<double> AOUT_double

Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts.

std::vector<uint8_t> DIN

Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts.

std::vector<uint8_t> DOUT

Readings from digital inputs; each byte stores 8 digital inputs, or 8-bit port.

std::vector<uint32_t> CNTRIN_32bits

Present digital output values; each byte stores 8 digital inputs, or 8-bit port.

std::vector<double> CNTRIN_double

Readings from ticks counters, such as quadrature encoders.

(vector length=channel count) in ticks.

double sample_rate {0}

Readings from ticks counters, such as quadrature encoders.

(vector length=channel count) in radians, degrees or any other unit (depends on the source driver). The sampling rate, in samples per second per channel

Methods

virtual void getSensorPose(mrpt::poses::CPose3D&) const

Not used in this class.

virtual void setSensorPose(const mrpt::poses::CPose3D&)

Not used in this class.

virtual void getDescriptionAsText(std::ostream& o) const

Build a detailed, multi-line textual description of the observation contents and dump it to the output stream.

If overried by derived classes, call base CObservation::getDescriptionAsText() first to show common information.

This is the text that appears in RawLogViewer when selecting an object in the dataset