MRPT  1.9.9
CObservationRawDAQ.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CObservationRawDAQ_H
10 #define CObservationRawDAQ_H
11 
13 #include <mrpt/obs/CObservation.h>
14 
15 namespace mrpt::obs
16 {
17 /** Store raw data from a Data Acquisition (DAQ) device, such that input or
18  * output analog and digital channels, counters from encoders, etc. at one
19  * sampling instant.
20  * All analog values are assumed to be volts.
21  * On timing:
22  * - CObservation::timestamp corresponds to the time of the first samples in
23  * each of the vectors.
24  * - CObservationRawDAQ::sample_rate is the sampling rate, in samples per second
25  * per channel, as stored by the source driver.
26  *
27  * \sa CObservation
28  * \ingroup mrpt_obs_grp
29  */
31 {
33  public:
34  /** Constructor */
37  {
38  }
39  /** Destructor */
40  virtual ~CObservationRawDAQ() {}
41  std::vector<uint8_t>
42  AIN_8bits; /** Readings from 8-bit analog input (ADCs) channels
43  (vector length=channel count) in ADC units. */
44  std::vector<uint16_t>
45  AIN_16bits; /** Readings from 16-bit analog input (ADCs) channels
46  (vector length=channel count) in ADC units. */
47  std::vector<uint32_t>
48  AIN_32bits; /** Readings from 32-bit analog input (ADCs) channels
49  (vector length=channel count) in ADC units. */
50  std::vector<float>
51  AIN_float; /** Readings from analog input (ADCs) channels (vector
52  length=channel count) in Volts. */
53  std::vector<double>
54  AIN_double; /** Readings from analog input (ADCs) channels (vector
55  length=channel count) in Volts. */
56 
57  /** How many different ADC channels are present in the AIN_* vectors. */
59  /** Whether the channels are interleaved (A0 A1 A2 A0 A1 A2...) or not (A0
60  * A0 A0 A1 A1 A1 A2 A2 A2...) in the AIN_* vectors. */
62 
63  std::vector<uint8_t>
64  AOUT_8bits; /** Present output values for 8-bit analog output (DACs)
65  channels (vector length=channel count) in DAC units.*/
66  std::vector<uint16_t>
67  AOUT_16bits; /** Present output values for 16-bit analog output (DACs)
68  channels (vector length=channel count) in DAC units.*/
69  std::vector<float> AOUT_float; /** Present output values for 16-bit analog
70  output (DACs) channels (vector
71  length=channel count) in volts.*/
72  std::vector<double>
73  AOUT_double; /** Present output values for 16-bit analog output (DACs)
74  channels (vector length=channel count) in volts.*/
75 
76  std::vector<uint8_t>
77  DIN; /** Readings from digital inputs; each byte stores 8 digital
78  inputs, or 8-bit port. */
79  std::vector<uint8_t> DOUT; /** Present digital output values; each byte
80  stores 8 digital inputs, or 8-bit port. */
81 
82  std::vector<uint32_t>
83  CNTRIN_32bits; /** Readings from ticks counters, such as quadrature
84  encoders. (vector length=channel count) in ticks. */
85  std::vector<double>
86  CNTRIN_double; /** Readings from ticks counters, such as quadrature
87  encoders. (vector length=channel count) in radians,
88  degrees or any other unit (depends on the source
89  driver). */
90 
91  /** The sampling rate, in samples per second per channel */
92  double sample_rate;
93 
94  /** Not used in this class */
95  void getSensorPose(mrpt::poses::CPose3D&) const override {}
96  /** Not used in this class */
97  void setSensorPose(const mrpt::poses::CPose3D&) override {}
98  // See base class docs
99  void getDescriptionAsText(std::ostream& o) const override;
100 
101 }; // End of class def.
102 
103 }
104 #endif
105 
106 
uint16_t AIN_channel_count
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
double sample_rate
Readings from ticks counters, such as quadrature encoders.
unsigned __int16 uint16_t
Definition: rptypes.h:44
std::vector< uint8_t > AOUT_8bits
void getSensorPose(mrpt::poses::CPose3D &) const override
Not used in this class.
virtual ~CObservationRawDAQ()
Destructor.
std::vector< uint16_t > AOUT_16bits
Present output values for 8-bit analog output (DACs) channels (vector length=channel count) in DAC un...
std::vector< uint32_t > AIN_32bits
Readings from 16-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< double > AOUT_double
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
This namespace contains representation of robot actions and observations.
bool AIN_interleaved
Whether the channels are interleaved (A0 A1 A2 A0 A1 A2...) or not (A0 A0 A0 A1 A1 A1 A2 A2 A2...
Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital cha...
std::vector< double > CNTRIN_double
Readings from ticks counters, such as quadrature encoders.
std::vector< uint8_t > DOUT
Readings from digital inputs; each byte stores 8 digital inputs, or 8-bit port.
std::vector< double > AIN_double
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setSensorPose(const mrpt::poses::CPose3D &) override
Not used in this class.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:86
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
std::vector< float > AOUT_float
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in DAC u...
std::vector< float > AIN_float
Readings from 32-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< uint8_t > DIN
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::vector< uint32_t > CNTRIN_32bits
Present digital output values; each byte stores 8 digital inputs, or 8-bit port.
std::vector< uint16_t > AIN_16bits
Readings from 8-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< uint8_t > AIN_8bits



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020