mixer_direct.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Dmitry Ponomarev <ponomarevda96@gmail.com>
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 SRC_MIXERS_MIXER_DIRECT_HPP
20 #define SRC_MIXERS_MIXER_DIRECT_HPP
21 
22 #include "base_mixer.hpp"
23 
24 class DirectMixer : public BaseReverseMixer {
25  public:
26  explicit DirectMixer(const ros::NodeHandle& nh) : BaseReverseMixer(nh) {
27  for (size_t channel = 0; channel < MAX_CHANNELS; channel++) {
28  sp_to_dynamics.axes.push_back(0);
29  }
30  }
31  ~DirectMixer() final = default;
32  protected:
33  void motorsCallback(sensor_msgs::Joy msg) override;
34  inline static constexpr uint8_t MAX_CHANNELS = 8;
35 };
36 
37 #endif // SRC_MIXERS_MIXER_DIRECT_HPP
BaseReverseMixer
Definition: base_mixer.hpp:50
DirectMixer
Definition: mixer_direct.hpp:24
base_mixer.hpp
DirectMixer::~DirectMixer
~DirectMixer() final=default
BaseReverseMixer::sp_to_dynamics
sensor_msgs::Joy sp_to_dynamics
Definition: base_mixer.hpp:58
DirectMixer::MAX_CHANNELS
static constexpr uint8_t MAX_CHANNELS
Definition: mixer_direct.hpp:34
DirectMixer::DirectMixer
DirectMixer(const ros::NodeHandle &nh)
Definition: mixer_direct.hpp:26
sensor_msgs
DirectMixer::motorsCallback
void motorsCallback(sensor_msgs::Joy msg) override
Definition: mixer_direct.cpp:21
ros::NodeHandle


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