flightgogglesDynamicsSim.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-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 
20 #ifndef MULTICOPTER_DYNAMICS_WRAPPER_BASE_HPP
21 #define MULTICOPTER_DYNAMICS_WRAPPER_BASE_HPP
22 
23 #include "uavDynamicsSimBase.hpp"
24 #include "../libs/multicopterDynamicsSim/multicopterDynamicsSim.hpp"
25 
27 public:
28  FlightgogglesDynamics() = default;
29  ~FlightgogglesDynamics() final = default;
30 
31  int8_t init() override;
32  void setInitialPosition(const Eigen::Vector3d & position,
33  const Eigen::Quaterniond& attitude) override;
34 
35  void process(double dt_secs, const std::vector<double> & motorSpeedCommandIn, bool isCmdPercent) override;
36 
37  Eigen::Vector3d getVehiclePosition() const override;
38  Eigen::Quaterniond getVehicleAttitude() const override;
39  Eigen::Vector3d getVehicleVelocity(void) const override;
40  Eigen::Vector3d getVehicleAngularVelocity(void) const override;
41  void getIMUMeasurement(Eigen::Vector3d & accOutput, Eigen::Vector3d & gyroOutput) override;
42 
43 private:
44  std::unique_ptr<MulticopterDynamicsSim> multicopterSim_;
45 
47 
53  std::vector<double> mapCmdActuator(std::vector<double> cmd) const;
54 };
55 
56 #endif // MULTICOPTER_DYNAMICS_WRAPPER_BASE_HPP
void getIMUMeasurement(Eigen::Vector3d &accOutput, Eigen::Vector3d &gyroOutput) override
~FlightgogglesDynamics() final=default
std::vector< double > mapCmdActuator(std::vector< double > cmd) const
Convert actuator indexes from PX4 notation to internal Flightgoggles notation.
std::unique_ptr< MulticopterDynamicsSim > multicopterSim_
void process(double dt_secs, const std::vector< double > &motorSpeedCommandIn, bool isCmdPercent) override
Eigen::Vector3d getVehicleVelocity(void) const override
FlightgogglesDynamics()=default
Eigen::Vector3d getVehicleAngularVelocity(void) const override
void setInitialPosition(const Eigen::Vector3d &position, const Eigen::Quaterniond &attitude) override
int8_t init() override
Use rosparam here to initialize sim.
Eigen::Vector3d getVehiclePosition() const override
Eigen::Quaterniond getVehicleAttitude() const override


inno_vtol_dynamics
Author(s): Roman Fedorenko, Dmitry Ponomarev, Ezra Tal, Winter Guerra
autogenerated on Sat Jul 1 2023 02:13:44