Go to the documentation of this file.
19 #include <mavros_msgs/ActuatorControl.h>
22 namespace std_plugins {
36 PluginBase::initialize(uas_);
59 auto actuator_control_target_msg = boost::make_shared<mavros_msgs::ActuatorControl>();
62 actuator_control_target_msg->group_mix = actuator_control_target.group_mlx;
63 const auto &arr = actuator_control_target.controls;
64 std::copy(arr.cbegin(), arr.cend(), actuator_control_target_msg->controls.begin());
74 mavlink::common::msg::SET_ACTUATOR_CONTROL_TARGET act{};
76 act.time_usec = req->header.stamp.toNSec() / 1000;
77 act.group_mlx = req->group_mix;
80 std::copy(req->controls.begin(), req->controls.end(), act.controls.begin());
std::vector< HandlerInfo > Subscriptions
Subscriptions vector.
PluginBase()
Plugin constructor Should not do anything before initialize()
#define UAS_FCU(uasobjptr)
helper accessor to FCU link interface
std::shared_ptr< MAVConnInterface const > ConstPtr
uint8_t get_tgt_component()
Return communication target component.
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(AdvertiseOptions &ops)
void actuator_control_cb(const mavros_msgs::ActuatorControl::ConstPtr &req)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
Subscriptions get_subscriptions() override
Return vector of MAVLink message subscriptions (handlers)
uint8_t get_tgt_system()
Return communication target system.
MAVROS Plugin base class.
ros::Time synchronise_stamp(uint32_t time_boot_ms)
Compute FCU message time from time_boot_ms or time_usec field.
void handle_actuator_control_target(const mavlink::mavlink_message_t *msg, mavlink::common::msg::ACTUATOR_CONTROL_TARGET &actuator_control_target)
void initialize(UAS &uas_) override
Plugin initializer.
HandlerInfo make_handler(const mavlink::msgid_t id, void(_C::*fn)(const mavlink::mavlink_message_t *msg, const mavconn::Framing framing))
ros::Publisher target_actuator_control_pub
ros::Subscriber actuator_control_sub
mavros
Author(s): Vladimir Ermakov
autogenerated on Tue May 6 2025 02:34:03