From 22f1be582e3c175b13ef1ccb08396b6a9bb0fbfa Mon Sep 17 00:00:00 2001 From: Martin Ganeff Date: Thu, 21 Jun 2018 15:56:22 +0200 Subject: [PATCH] Corrected depth camera plugin initialization (#748) * Initialize depth_image_connect_count_ to 0 * Removed duplicate line in CMakeLists.txt --- gazebo_plugins/CMakeLists.txt | 1 - gazebo_plugins/src/gazebo_ros_depth_camera.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gazebo_plugins/CMakeLists.txt b/gazebo_plugins/CMakeLists.txt index c96dda864..d9fefff2c 100644 --- a/gazebo_plugins/CMakeLists.txt +++ b/gazebo_plugins/CMakeLists.txt @@ -312,7 +312,6 @@ install(TARGETS MultiCameraPlugin gazebo_ros_depth_camera gazebo_ros_openni_kinect - gazebo_ros_openni_kinect gazebo_ros_laser gazebo_ros_block_laser gazebo_ros_p3d diff --git a/gazebo_plugins/src/gazebo_ros_depth_camera.cpp b/gazebo_plugins/src/gazebo_ros_depth_camera.cpp index d3008493d..e701c8b71 100644 --- a/gazebo_plugins/src/gazebo_ros_depth_camera.cpp +++ b/gazebo_plugins/src/gazebo_ros_depth_camera.cpp @@ -45,6 +45,7 @@ GZ_REGISTER_SENSOR_PLUGIN(GazeboRosDepthCamera) GazeboRosDepthCamera::GazeboRosDepthCamera() { this->point_cloud_connect_count_ = 0; + this->depth_image_connect_count_ = 0; this->depth_info_connect_count_ = 0; this->last_depth_image_camera_info_update_time_ = common::Time(0); }