rviz_visualization.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 SRC_RVIZ_VISUALIZATION_HPP_
20 #define SRC_RVIZ_VISUALIZATION_HPP_
21 
22 #include <array>
23 #include <visualization_msgs/Marker.h>
25 #include "uavDynamicsSimBase.hpp"
26 
28 public:
29  explicit RvizVisualizator(ros::NodeHandle& nh);
30  int8_t init(const std::shared_ptr<UavDynamicsSimBase>& uavDynamicsSim_);
31 
32  // common
33  void publishTf(uint8_t dynamicsNotation);
34 
35  // only for vtol
36  void publish(uint8_t dynamicsNotation);
37 
38 private:
39  void initMarkers();
40  visualization_msgs::Marker& makeArrow(const Eigen::Vector3d& vector3D,
41  const Eigen::Vector3d& rgbColor,
42  const char* frameId);
43 
45  std::shared_ptr<UavDynamicsSimBase> uavDynamicsSim;
46 
47  visualization_msgs::Marker arrowMarkers;
48 
51  std::array<ros::Publisher, 5> motorsForcesPub;
55 
60  std::array<ros::Publisher, 5> motorsMomentsPub;
62 
64 };
65 
66 #endif // SRC_RVIZ_VISUALIZATION_HPP_
std::array< ros::Publisher, 5 > motorsForcesPub
ros::Publisher drugForcePub
visualization_msgs::Marker arrowMarkers
std::string * frameId(M &m)
ros::Publisher velocityPub
void publish(uint8_t dynamicsNotation)
ros::Publisher totalMomentPub
ros::Publisher sideForcePub
visualization_msgs::Marker & makeArrow(const Eigen::Vector3d &vector3D, const Eigen::Vector3d &rgbColor, const char *frameId)
ros::Publisher aeroForcePub
ros::Publisher aoaMomentPub
RvizVisualizator(ros::NodeHandle &nh)
tf2_ros::TransformBroadcaster tfPub
ros::Publisher controlSurfacesMomentPub
ros::Publisher totalForcePub
ros::Publisher liftForcePub
std::array< ros::Publisher, 5 > motorsMomentsPub
void publishTf(uint8_t dynamicsNotation)
Perform TF transform between GLOBAL_FRAME -> UAV_FRAME in ROS (enu/flu) format.
int8_t init(const std::shared_ptr< UavDynamicsSimBase > &uavDynamicsSim_)
ros::NodeHandle & node
std::shared_ptr< UavDynamicsSimBase > uavDynamicsSim
ros::Publisher aeroMomentPub


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