14 #include <std_msgs/Bool.h> 25 #elif defined(TARGET_KL25Z) || defined(TARGET_NUCLEO_F401RE) 28 #error "You need to specify a pin for the sensor" 38 long publisher_timer = 0;
43 if (
t.read_ms() > publisher_timer)
47 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 collision_msg
ros::Publisher pub_collision("collision",&collision_msg)