mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-07 10:17:45 +08:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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]); \
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user