Skip to content

Instantly share code, notes, and snippets.

View bgromov's full-sized avatar

Boris Gromov bgromov

View GitHub Profile
@bgromov
bgromov / test_spinner2.cpp
Created May 25, 2016 17:29
Demonstrates the use of AsyncSpinner and custom callback queue in ROS. Uses custom queue for enable/disable topic and global for heartbeats.
#include <ros/ros.h>
#include <ros/spinner.h>
#include <ros/callback_queue.h>
#include <std_msgs/Empty.h>
#include <std_msgs/Bool.h>
boost::shared_ptr<ros::AsyncSpinner> g_spinner;
bool g_enable = false;
@bgromov
bgromov / test_spinner.cpp
Last active May 15, 2023 13:50
Demonstrates the use of AsyncSpinner and custom callback queue in ROS
#include <ros/ros.h>
#include <ros/spinner.h>
#include <ros/callback_queue.h>
#include <std_msgs/Empty.h>
#include <std_msgs/Bool.h>
boost::shared_ptr<ros::AsyncSpinner> g_spinner;
bool g_enable = false;