Added warning after 10 seconds if any callback has not been called since the start (rtabmap, rtabmapviz and odometry nodes).

This commit is contained in:
matlabbe
2016-09-28 12:08:11 -04:00
parent 24afa89477
commit 5119b3ab90
12 changed files with 122 additions and 21 deletions
+2 -1
View File
@@ -377,7 +377,8 @@ void CommonDataSubscriber::setupRGBDCallbacks(
{
rgbdSub_ = nh.subscribe("rgbd_image", 1, &CommonDataSubscriber::rgbdCallback, this);
ROS_INFO("\n%s subscribed to:\n %s",
subscribedTopicsMsg_ =
uFormat("\n%s subscribed to:\n %s",
ros::this_node::getName().c_str(),
rgbdSub_.getTopic().c_str());
}
+1
View File
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace rtabmap_ros {
#define IMAGE_CONVERSION() \
callbackCalled(); \
std::vector<cv_bridge::CvImageConstPtr> imageMsgs(2); \
std::vector<cv_bridge::CvImageConstPtr> depthMsgs(2); \
rtabmap_ros::toCvShare(image1Msg, imageMsgs[0], depthMsgs[0]); \
+4
View File
@@ -36,6 +36,7 @@ void CommonDataSubscriber::stereoCallback(
const sensor_msgs::CameraInfoConstPtr& leftCamInfoMsg,
const sensor_msgs::CameraInfoConstPtr& rightCamInfoMsg)
{
callbackCalled();
nav_msgs::OdometryConstPtr odomMsg; // Null
sensor_msgs::LaserScanConstPtr scanMsg; // null
sensor_msgs::PointCloud2ConstPtr scan3dMsg; // null
@@ -49,6 +50,7 @@ void CommonDataSubscriber::stereoInfoCallback(
const sensor_msgs::CameraInfoConstPtr& rightCamInfoMsg,
const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
{
callbackCalled();
nav_msgs::OdometryConstPtr odomMsg; // Null
sensor_msgs::LaserScanConstPtr scan2dMsg; // null
sensor_msgs::PointCloud2ConstPtr scan3dMsg; // null
@@ -63,6 +65,7 @@ void CommonDataSubscriber::stereoOdomCallback(
const sensor_msgs::CameraInfoConstPtr& leftCamInfoMsg,
const sensor_msgs::CameraInfoConstPtr& rightCamInfoMsg)
{
callbackCalled();
sensor_msgs::LaserScanConstPtr scanMsg; // Null
sensor_msgs::PointCloud2ConstPtr scan3dMsg; // null
rtabmap_ros::OdomInfoConstPtr odomInfoMsg; // null
@@ -76,6 +79,7 @@ void CommonDataSubscriber::stereoOdomInfoCallback(
const sensor_msgs::CameraInfoConstPtr& rightCamInfoMsg,
const rtabmap_ros::OdomInfoConstPtr & odomInfoMsg)
{
callbackCalled();
sensor_msgs::LaserScanConstPtr scan2dMsg; // Null
sensor_msgs::PointCloud2ConstPtr scan3dMsg; // Null
commonStereoCallback(odomMsg, leftImageMsg, rightImageMsg, leftCamInfoMsg, rightCamInfoMsg, scan2dMsg, scan3dMsg, odomInfoMsg);