10 #ifndef DYNAMIC_GRAPH_ROS_SUBSCRIBE_HH 11 #define DYNAMIC_GRAPH_ROS_SUBSCRIBE_HH 15 #include <boost/shared_ptr.hpp> 17 #include <dynamic-graph/command.h> 18 #include <dynamic-graph/entity.h> 19 #include <dynamic-graph/signal-ptr.h> 20 #include <dynamic-graph/signal-time-dependent.h> 35 namespace rosSubscribe
37 using ::dynamicgraph::command::Command;
38 using ::dynamicgraph::command::Value;
40 #define ROS_SUBSCRIBE_MAKE_COMMAND(CMD) \ 41 class CMD : public Command \ 44 CMD(RosSubscribe& entity, const std::string& docstring); \ 45 virtual Value doExecute(); \ 48 ROS_SUBSCRIBE_MAKE_COMMAND(Add);
49 ROS_SUBSCRIBE_MAKE_COMMAND(Clear);
50 ROS_SUBSCRIBE_MAKE_COMMAND(List);
51 ROS_SUBSCRIBE_MAKE_COMMAND(Rm);
53 #undef ROS_SUBSCRIBE_MAKE_COMMAND 67 DYNAMIC_GRAPH_ENTITY_DECL();
68 typedef boost::posix_time::ptime ptime;
71 typedef std::pair<boost::shared_ptr<dynamicgraph::SignalBase<int> >,
72 boost::shared_ptr<ros::Subscriber> >
78 virtual std::string getDocString()
const;
79 void display(std::ostream& os)
const;
81 void add(
const std::string& signal,
const std::string& topic);
82 void rm(
const std::string& signal);
87 void add(
const std::string& signal,
const std::string& topic);
89 std::map<std::string, bindedSignal_t>& bindedSignal()
99 template <
typename R,
typename S>
100 void callback(boost::shared_ptr<dynamicgraph::SignalPtr<S, int> > signal,
103 template <
typename R>
104 void callbackTimestamp(
105 boost::shared_ptr<dynamicgraph::SignalPtr<ptime, int> > signal,
108 template <
typename T>
112 static const std::string docstring_;
113 ros::NodeHandle& nh_;
114 std::map<std::string, bindedSignal_t> bindedSignal_;
Publish ROS information in the dynamic-graph.
Definition: ros_subscribe.hh:65
this is this package namespace in order to avoid naming conflict
Definition: device.hh:22
Definition: ros_queued_subscribe.hh:66