21 #include <geometry_msgs/PoseStamped.h> 22 #include <geometry_msgs/TransformStamped.h> 26 namespace extra_plugins{
52 if (use_tf && !use_pose) {
55 else if (use_pose && !use_tf) {
77 Eigen::Quaterniond &q,
80 mavlink::common::msg::ATT_POS_MOCAP
pos = {};
94 Eigen::Quaterniond q_enu;
102 pose->pose.position.x,
103 pose->pose.position.y,
104 pose->pose.position.z));
114 Eigen::Quaterniond q_enu;
122 trans->transform.translation.x,
123 trans->transform.translation.y,
124 trans->transform.translation.z));
std::shared_ptr< MAVConnInterface const > ConstPtr
void mocap_tf_cb(const geometry_msgs::TransformStamped::ConstPtr &trans)
MocapPoseEstimatePlugin()
void initialize(UAS &uas_) override
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::Subscriber mocap_tf_sub
void mocap_pose_send(uint64_t usec, Eigen::Quaterniond &q, Eigen::Vector3d &v)
void quaternion_to_mavlink(const Eigen::Quaternion< _Scalar > &q, std::array< float, 4 > &qmsg)
T transform_orientation_enu_ned(const T &in)
Subscriptions get_subscriptions() override
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
#define UAS_FCU(uasobjptr)
void mocap_pose_cb(const geometry_msgs::PoseStamped::ConstPtr &pose)
T transform_frame_enu_ned(const T &in)
std::vector< HandlerInfo > Subscriptions
void quaternionMsgToEigen(const geometry_msgs::Quaternion &m, Eigen::Quaterniond &e)
#define ROS_ERROR_NAMED(name,...)
ros::Subscriber mocap_pose_sub
T transform_orientation_baselink_aircraft(const T &in)
void initialize(UAS &uas_) override
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)