5 #ifndef SKYWAY_PLUGIN_STRING_PUB_SUB_H 6 #define SKYWAY_PLUGIN_STRING_PUB_SUB_H 13 #include "std_msgs/String.h" 20 nh_.
advertise<std_msgs::String>(
"skyway_string_publisher", 1000);
23 std::shared_ptr<std::function<void(std::string)>>
callback_;
29 void subscribe(
const std_msgs::String::ConstPtr& msg);
36 std::shared_ptr<rapidjson::Document> parameter,
37 std::shared_ptr<std::function<
void(std::string)>> callback)
override;
38 virtual void Execute(std::string data)
override;
43 #endif // SKYWAY_PLUGIN_STRING_PUB_SUB_H
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
virtual void Execute(std::string data) override
std::shared_ptr< std::function< void(std::string)> > callback_
virtual void Shutdown() override
void subscribe(const std_msgs::String::ConstPtr &msg)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
std::list< std::string > parameters_
virtual void Initialize(std::shared_ptr< rapidjson::Document > parameter, std::shared_ptr< std::function< void(std::string)>> callback) override