14 #include <std_msgs/Bool.h> 24 #elif defined(TARGET_KL25Z) || defined(TARGET_NUCLEO_F401RE) 27 #error "You need to specify a pin for the sensor" 37 long publisher_timer = 0;
42 if (
t.read_ms() > publisher_timer)
46 publisher_timer =
t.read_ms() + 1000;
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
std_msgs::Bool motion_msg
ros::Publisher pub_motion("motion",&motion_msg)