31 auto rmsg = boost::make_shared<mavros_msgs::Mavlink>();
40 mavlink::mavlink_message_t mmsg;
48 int main(
int argc,
char *argv[])
57 priv_nh.
param<std::string>(
"gcs_url", gcs_url,
"udp://@");
69 mavlink_pub = mavlink_nh.
advertise<mavros_msgs::Mavlink>(
"to", 10);
75 .unreliable().maxDatagramSize(1024)
80 updater.
add(gcs_link_diag);
std::shared_ptr< MAVConnInterface const > ConstPtr
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void setHardwareID(const std::string &hwid)
bool convert(const mavros_msgs::Mavlink &rmsg, mavlink_message_t &mmsg)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ros::Subscriber mavlink_sub
void add(const std::string &name, TaskFunction f)
ROSCPP_DECL void spin(Spinner &spinner)
void set_connection_status(bool connected)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
void mavlink_pub_cb(const mavlink::mavlink_message_t *mmsg, const mavconn::Framing framing)
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
MAVConnInterface::Ptr gcs_link
static Ptr open_url(std::string url, uint8_t system_id=1, uint8_t component_id=MAV_COMP_ID_UDP_BRIDGE)
ros::Publisher mavlink_pub
int main(int argc, char *argv[])
void set_mavconn(const mavconn::MAVConnInterface::Ptr &link)
void mavlink_sub_cb(const mavros_msgs::Mavlink::ConstPtr &rmsg)
constexpr std::underlying_type< _T >::type enum_value(_T e)
std::shared_ptr< MAVConnInterface > Ptr