Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
slam
CObservationBatteryState.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
#ifndef CObservationBatteryState_H
29
#define CObservationBatteryState_H
30
31
#include <
mrpt/utils/CSerializable.h
>
32
#include <
mrpt/slam/CObservation.h
>
33
#include <
mrpt/poses/CPose3D.h
>
34
#include <
mrpt/poses/CPose2D.h
>
35
36
namespace
mrpt
37
{
38
namespace
slam
39
{
40
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
(
CObservationBatteryState
,
CObservation
,
OBS_IMPEXP
)
41
42
/** This represents a measurement of the batteries on the robot.
43
* The battery levels are in volts in the form of the public members:
44
* - voltageMainRobotBattery
45
* - voltageMainRobotComputer
46
* - voltageOtherBatteries
47
*
48
* There are boolean flags for signaling when the corresponding values have been filled out or not.
49
*
50
* \sa CObservation
51
* \ingroup mrpt_obs_grp
52
*/
53
class
OBS_IMPEXP
CObservationBatteryState
: public
CObservation
54
{
55
// This must be added to any CSerializable derived class:
56
DEFINE_SERIALIZABLE
(
CObservationBatteryState
)
57
58
public:
59
/** Constructor
60
*/
61
CObservationBatteryState
( );
62
63
/** The data members
64
* \sa voltageMainRobotBatteryIsValid,voltageMainRobotComputerIsValid
65
*/
66
double
voltageMainRobotBattery, voltageMainRobotComputer;
67
68
/** These values must be true if the corresponding fields contain valid values.
69
* \sa voltageMainRobotBattery,voltageMainRobotComputer
70
*/
71
bool
voltageMainRobotBatteryIsValid,voltageMainRobotComputerIsValid;
72
73
/** The users can use this vector for any arbitrary number of batteries or any other analog measurements.
74
* \sa voltageOtherBatteriesValid
75
*/
76
vector_double
voltageOtherBatteries;
77
78
/** These values must be true if the corresponding fields contain valid values (it MUST has the same size than voltageOtherBatteries)
79
*/
80
vector_bool
voltageOtherBatteriesValid;
81
82
/** A general method to retrieve the sensor pose on the robot.
83
* It has no effects in this class
84
* \sa setSensorPose
85
*/
86
void
getSensorPose(
CPose3D
&out_sensorPose )
const
{ out_sensorPose=
CPose3D
(0,0,0); }
87
88
89
/** A general method to change the sensor pose on the robot.
90
* It has no effects in this class
91
* \sa getSensorPose
92
*/
93
void
setSensorPose
(
const
CPose3D
&newSensorPose ) { }
94
95
96
};
// End of class def.
97
98
99
}
// End of namespace
100
}
// End of namespace
101
102
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013