Main Page
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Variables
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
v
~
+
Variables
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Enumerations
+
Files
File List
+
File Members
+
All
a
b
c
d
g
i
m
p
r
s
t
u
v
w
+
Functions
c
g
m
t
Variables
Enumerations
Enumerator
src
sensors
sensor_base.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020-2022 RaccoonLab.
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, version 3.
7
*
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Author: Dmitry Ponomarev <ponomarevda96@gmail.com>
17
*/
18
19
#ifndef SENSORS_SENSOR_BASE_HPP
20
#define SENSORS_SENSOR_BASE_HPP
21
22
#include <
ros/ros.h
>
23
#include <random>
24
#include <geographiclib_conversions/geodetic_conv.hpp>
25
26
class
BaseSensor
{
27
public
:
28
BaseSensor
() =
delete
;
29
BaseSensor
(
ros::NodeHandle
* nh,
double
period):
node_handler_
(nh),
PERIOD
(period) {};
30
void
enable
() {
_isEnabled
=
true
;}
31
void
disable
() {
_isEnabled
=
false
;}
32
protected
:
33
ros::NodeHandle
*
node_handler_
;
34
bool
_isEnabled
{
false
};
35
const
double
PERIOD
;
36
ros::Publisher
publisher_
;
37
double
nextPubTimeSec_
= 0;
38
39
std::default_random_engine
randomGenerator_
;
40
std::normal_distribution<double>
normalDistribution_
{std::normal_distribution<double>(0.0, 1.0)};
41
};
42
43
#endif // SENSORS_SENSOR_BASE_HPP
BaseSensor::nextPubTimeSec_
double nextPubTimeSec_
Definition:
sensor_base.hpp:37
BaseSensor
Definition:
sensor_base.hpp:26
BaseSensor::enable
void enable()
Definition:
sensor_base.hpp:30
ros::NodeHandle
BaseSensor::BaseSensor
BaseSensor(ros::NodeHandle *nh, double period)
Definition:
sensor_base.hpp:29
BaseSensor::node_handler_
ros::NodeHandle * node_handler_
Definition:
sensor_base.hpp:33
BaseSensor::disable
void disable()
Definition:
sensor_base.hpp:31
BaseSensor::BaseSensor
BaseSensor()=delete
BaseSensor::PERIOD
const double PERIOD
Definition:
sensor_base.hpp:35
BaseSensor::normalDistribution_
std::normal_distribution< double > normalDistribution_
Definition:
sensor_base.hpp:40
BaseSensor::_isEnabled
bool _isEnabled
Definition:
sensor_base.hpp:34
ros.h
BaseSensor::randomGenerator_
std::default_random_engine randomGenerator_
Definition:
sensor_base.hpp:39
BaseSensor::publisher_
ros::Publisher publisher_
Definition:
sensor_base.hpp:36
ros::Publisher
inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Sat Jul 1 2023 02:13:44