Main MRPT website > C++ reference
MRPT logo
CObservationBatteryState.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-2014, 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 CObservationBatteryState_H
10 #define CObservationBatteryState_H
11 
13 #include <mrpt/slam/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 
17 namespace mrpt
18 {
19 namespace slam
20 {
21  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationBatteryState, CObservation, OBS_IMPEXP)
22 
23  /** This represents a measurement of the batteries on the robot.
24  * The battery levels are in volts in the form of the public members:
25  * - voltageMainRobotBattery
26  * - voltageMainRobotComputer
27  * - voltageOtherBatteries
28  *
29  * There are boolean flags for signaling when the corresponding values have been filled out or not.
30  *
31  * \sa CObservation
32  * \ingroup mrpt_obs_grp
33  */
35  {
36  // This must be added to any CSerializable derived class:
38 
39  public:
40  /** Constructor
41  */
43 
44  /** The data members
45  * \sa voltageMainRobotBatteryIsValid,voltageMainRobotComputerIsValid
46  */
47  double voltageMainRobotBattery, voltageMainRobotComputer;
48 
49  /** These values must be true if the corresponding fields contain valid values.
50  * \sa voltageMainRobotBattery,voltageMainRobotComputer
51  */
52  bool voltageMainRobotBatteryIsValid,voltageMainRobotComputerIsValid;
53 
54  /** The users can use this vector for any arbitrary number of batteries or any other analog measurements.
55  * \sa voltageOtherBatteriesValid
56  */
57  CVectorDouble voltageOtherBatteries;
58 
59  /** These values must be true if the corresponding fields contain valid values (it MUST has the same size than voltageOtherBatteries)
60  */
61  vector_bool voltageOtherBatteriesValid;
62 
63  /** A general method to retrieve the sensor pose on the robot.
64  * It has no effects in this class
65  * \sa setSensorPose
66  */
67  void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose=CPose3D(0,0,0); }
68 
69 
70  /** A general method to change the sensor pose on the robot.
71  * It has no effects in this class
72  * \sa getSensorPose
73  */
74  void setSensorPose( const CPose3D &newSensorPose ) {
75  MRPT_UNUSED_PARAM(newSensorPose);
76  }
77 
78 
79  }; // End of class def.
80  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationBatteryState, CObservation, OBS_IMPEXP)
81 
82 
83  } // End of namespace
84 } // End of namespace
85 
86 #endif
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
Declares a class that represents any robot's observation.
Definition: CObservation.h:52
std::vector< bool > vector_bool
A type for passing a vector of bools.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
This represents a measurement of the batteries on the robot.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:69
dynamic_vector< double > CVectorDouble
Column vector, like Eigen::MatrixXd, but automatically initialized to zeros since construction...
Definition: eigen_frwds.h:53
void setSensorPose(const CPose3D &newSensorPose)
A general method to change the sensor pose on the robot.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014