34 void TestBb::init() {}
36 void TestBb::stop() {}
38 void TestBb::baseCallback(
const nav_msgs::Odometry& lmsg)
40 static int msg_count = 0;
41 float x=lmsg.pose.pose.position.x;
42 float y=lmsg.pose.pose.position.y;
44 float vx=lmsg.twist.twist.linear.x;
45 float vy=lmsg.twist.twist.linear.y;
52 std::cout<<
"shutdown sub"<<std::endl;
61 std::string robot_id_string=
"robot_"+boost::lexical_cast<std::string>(get_id());
63 val.data = get_id()+count;
64 bb.put(robot_id_string, val);
70 std::string robot_id_string=
"robot_"+boost::lexical_cast<std::string>(get_id());
71 std_msgs::Int32 val = bb.get(robot_id_string);
72 std::cout<<robot_id_string<<
": "<<val.data<<std::endl;
86 std::string robot_id_string=
"robot_" + boost::lexical_cast<std::string>(get_id());
89 bb.put(robot_id_string, val);
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)