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
o
p
q
r
s
t
u
v
w
~
Functions
_
a
b
c
d
e
f
g
i
l
m
o
p
q
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
Enumerator
Files
File List
File Members
All
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
v
w
Functions
c
f
g
i
m
r
t
Variables
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
w
Enumerations
Enumerator
b
m
v
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
25
class
BaseSensor
{
26
public
:
27
BaseSensor
() =
delete
;
28
BaseSensor
(
ros::NodeHandle
* nh,
double
period):
node_handler_
(nh),
PERIOD
(period) {};
29
void
enable
() {
_isEnabled
=
true
;}
30
void
disable
() {
_isEnabled
=
false
;}
31
protected
:
32
ros::NodeHandle
*
node_handler_
;
33
bool
_isEnabled
{
false
};
34
const
double
PERIOD
;
35
ros::Publisher
publisher_
;
36
double
nextPubTimeSec_
= 0;
37
38
std::default_random_engine
randomGenerator_
;
39
std::normal_distribution<double>
normalDistribution_
{std::normal_distribution<double>(0.0, 1.0)};
40
};
41
42
#endif // SENSORS_SENSOR_BASE_HPP
BaseSensor::normalDistribution_
std::normal_distribution< double > normalDistribution_
Definition:
sensor_base.hpp:39
ros::Publisher
ros.h
BaseSensor::_isEnabled
bool _isEnabled
Definition:
sensor_base.hpp:33
BaseSensor::randomGenerator_
std::default_random_engine randomGenerator_
Definition:
sensor_base.hpp:38
BaseSensor::publisher_
ros::Publisher publisher_
Definition:
sensor_base.hpp:35
BaseSensor::nextPubTimeSec_
double nextPubTimeSec_
Definition:
sensor_base.hpp:36
BaseSensor::enable
void enable()
Definition:
sensor_base.hpp:29
BaseSensor::disable
void disable()
Definition:
sensor_base.hpp:30
BaseSensor::BaseSensor
BaseSensor(ros::NodeHandle *nh, double period)
Definition:
sensor_base.hpp:28
BaseSensor::PERIOD
const double PERIOD
Definition:
sensor_base.hpp:34
BaseSensor
Definition:
sensor_base.hpp:25
BaseSensor::node_handler_
ros::NodeHandle * node_handler_
Definition:
sensor_base.hpp:32
BaseSensor::BaseSensor
BaseSensor()=delete
ros::NodeHandle
inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Mon Dec 9 2024 03:13:35