logger.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 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 UAV_DYNAMICS_LOGER_HPP
20 #define UAV_DYNAMICS_LOGER_HPP
21 
22 #include "actuators.hpp"
23 #include "sensors.hpp"
24 #include "dynamics.hpp"
25 
26 struct StateLogger {
27  StateLogger(Actuators& actuators, Sensors& sensors, DynamicsInfo& info) :
28  _actuators(actuators), _sensors(sensors), _info(info) {}
29  void init(double clockScale, double dt_secs);
30  void createStringStream(std::stringstream& logStream,
31  const Eigen::Vector3d& pose,
32  double dynamicsCounter,
33  double rosPubCounter,
34  double periodSec);
35 
36 private:
37  static void addErrColor(std::stringstream& logStream, bool is_ok, const std::string& newData);
38  static void addWarnColor(std::stringstream& logStream, const std::string& newData);
39  static void addBold(std::stringstream& logStream, const char* newData);
40 
44 
45  double _clockScale;
46  double _dt_secs;
47 };
48 
49 #endif // UAV_DYNAMICS_LOGER_HPP
actuators.hpp
sensors.hpp
StateLogger::addBold
static void addBold(std::stringstream &logStream, const char *newData)
Definition: logger.cpp:149
StateLogger::StateLogger
StateLogger(Actuators &actuators, Sensors &sensors, DynamicsInfo &info)
Definition: logger.hpp:27
StateLogger::_clockScale
double _clockScale
Definition: logger.hpp:45
StateLogger::addErrColor
static void addErrColor(std::stringstream &logStream, bool is_ok, const std::string &newData)
Definition: logger.cpp:137
Actuators
Definition: actuators.hpp:33
StateLogger::_dt_secs
double _dt_secs
Definition: logger.hpp:46
StateLogger::createStringStream
void createStringStream(std::stringstream &logStream, const Eigen::Vector3d &pose, double dynamicsCounter, double rosPubCounter, double periodSec)
Definition: logger.cpp:39
StateLogger::_actuators
Actuators & _actuators
Definition: logger.hpp:41
StateLogger::_sensors
Sensors & _sensors
Definition: logger.hpp:42
StateLogger::init
void init(double clockScale, double dt_secs)
Definition: logger.cpp:34
Sensors
Definition: sensors.hpp:37
StateLogger
Definition: logger.hpp:26
StateLogger::_info
DynamicsInfo & _info
Definition: logger.hpp:43
StateLogger::addWarnColor
static void addWarnColor(std::stringstream &logStream, const std::string &newData)
Definition: logger.cpp:145
DynamicsInfo
Definition: dynamics.hpp:39
dynamics.hpp


inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Mon Dec 9 2024 03:13:35