19 #ifndef DDS_ROS_BRIDGE_ROS_COMMAND_H_
20 #define DDS_ROS_BRIDGE_ROS_COMMAND_H_
26 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
27 #include "dds_ros_bridge/util.h"
29 #include "ff_msgs/CommandArg.h"
30 #include "ff_msgs/CommandConstants.h"
31 #include "ff_msgs/CommandStamped.h"
33 #include "knDds/DdsTypedSupplier.h"
35 #include "rapidUtil/RapidHelper.h"
37 #include "CommandSupport.h"
38 #include "RapidConstants.h"
45 const std::string& ac_cmd_sub_topic,
46 const std::string& fail_cmd_sub_topic,
47 const std::string& pub_topic,
48 const ros::NodeHandle &nh,
49 const std::string& agent_name_,
50 const unsigned int queue_size = 10);
52 void ACCmdCallback(ff_msgs::CommandStampedConstPtr
const& cmd);
53 void CmdCallback(ff_msgs::CommandStampedConstPtr
const& cmd);
54 void EchoCmd(ff_msgs::CommandStampedConstPtr
const& cmd);
57 using CommandSupplier = kn::DdsTypedSupplier<rapid::Command>;
58 using CommandSupplierPtr = std::unique_ptr<CommandSupplier>;
60 CommandSupplierPtr command_supplier_;
62 ros::Subscriber ac_cmd_sub_, failed_cmd_sub_;
63 std::string ac_subscribe_topic_, failed_cmd_subscribe_topic_;
64 std::string agent_name_;
69 #endif // DDS_ROS_BRIDGE_ROS_COMMAND_H_