mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-07 02:07:45 +08:00
Add rtabmap_msgs/SensorData (#1055)
* Add rtabmap_msgs/SensorData * After testing fixes * Updated output topic name * added explicit --logconsole for nodelets * fixed intermediate nodes not generated * Refactored SyncDiagnostic usage to handle nodelet name * SyncDiagnostic: added TimeStampStatus. Odom: added new status when data not received yet * rtabmap: Fixed parameters not updated when using nodelet
This commit is contained in:
@@ -58,7 +58,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
namespace rtabmap_sync
|
||||
{
|
||||
|
||||
class RGBDSync : public nodelet::Nodelet, public SyncDiagnostic
|
||||
class RGBDSync : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
RGBDSync() :
|
||||
@@ -142,7 +142,8 @@ private:
|
||||
cameraInfoSub_.getTopic().c_str());
|
||||
NODELET_INFO(subscribedTopicsMsg.c_str());
|
||||
|
||||
initDiagnostic(rgb_nh.resolveName("image"),
|
||||
syncDiagnostic_.reset(new SyncDiagnostic(nh, pnh, getName()));
|
||||
syncDiagnostic_->init(rgb_nh.resolveName("image"),
|
||||
uFormat("%s: Did not receive data since 5 seconds! Make sure the input topics are "
|
||||
"published (\"$ rostopic hz my_topic\") and the timestamps in their "
|
||||
"header are set. %s%s",
|
||||
@@ -157,7 +158,7 @@ private:
|
||||
const sensor_msgs::ImageConstPtr& depth,
|
||||
const sensor_msgs::CameraInfoConstPtr& cameraInfo)
|
||||
{
|
||||
tick(image->header.stamp);
|
||||
syncDiagnostic_->tick(image->header.stamp);
|
||||
|
||||
if(rgbdImagePub_.getNumSubscribers() || rgbdImageCompressedPub_.getNumSubscribers())
|
||||
{
|
||||
@@ -304,6 +305,8 @@ private:
|
||||
|
||||
typedef message_filters::sync_policies::ExactTime<sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo> MyExactSyncDepthPolicy;
|
||||
message_filters::Synchronizer<MyExactSyncDepthPolicy> * exactSyncDepth_;
|
||||
|
||||
std::unique_ptr<SyncDiagnostic> syncDiagnostic_;
|
||||
};
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(rtabmap_sync::RGBDSync, nodelet::Nodelet);
|
||||
|
||||
Reference in New Issue
Block a user