20 #include <mavros_msgs/Vibration.h> 23 namespace extra_plugins {
58 void handle_vibration(
const mavlink::mavlink_message_t *msg, mavlink::common::msg::VIBRATION &vibration)
60 auto vibe_msg = boost::make_shared<mavros_msgs::Vibration>();
64 Eigen::Vector3d vib_enu = {vibration.vibration_x, vibration.vibration_y, vibration.vibration_z};
67 vibe_msg->clipping[0] = vibration.clipping_0;
68 vibe_msg->clipping[1] = vibration.clipping_1;
69 vibe_msg->clipping[2] = vibration.clipping_2;
71 vibration_pub.
publish(vibe_msg);
std_msgs::Header synchronized_header(const std::string &frame_id, const T time_stamp)
void publish(const boost::shared_ptr< M > &message) const
ros::Publisher vibration_pub
HandlerInfo make_handler(const mavlink::msgid_t id, void(_C::*fn)(const mavlink::mavlink_message_t *msg, const mavconn::Framing framing))
Subscriptions get_subscriptions()
void vectorEigenToMsg(const Eigen::Vector3d &e, geometry_msgs::Vector3 &m)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
T transform_frame_ned_enu(const T &in)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
std::vector< HandlerInfo > Subscriptions
void initialize(UAS &uas_)
void handle_vibration(const mavlink::mavlink_message_t *msg, mavlink::common::msg::VIBRATION &vibration)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
void initialize(UAS &uas_)