From 3bf7a82be23c53e3d0dafb7a430f01ad980bd0a1 Mon Sep 17 00:00:00 2001 From: Marcus Liebhardt Date: Thu, 1 Aug 2013 14:12:22 +0900 Subject: [PATCH] prevents dynamic_reconfigure from overwritting update rate param on start-up --- gazebo_plugins/src/gazebo_ros_camera_utils.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gazebo_plugins/src/gazebo_ros_camera_utils.cpp b/gazebo_plugins/src/gazebo_ros_camera_utils.cpp index 652039b55..2a3551d12 100644 --- a/gazebo_plugins/src/gazebo_ros_camera_utils.cpp +++ b/gazebo_plugins/src/gazebo_ros_camera_utils.cpp @@ -59,9 +59,12 @@ GazeboRosCameraUtils::GazeboRosCameraUtils() void GazeboRosCameraUtils::configCallback( gazebo_plugins::GazeboRosCameraConfig &config, uint32_t level) { - ROS_INFO("Reconfigure request for the gazebo ros camera_: %s. New rate: %.2f", - this->camera_name_.c_str(), config.imager_rate); - this->parentSensor_->SetUpdateRate(config.imager_rate); + if (this->initialized_) + { + ROS_INFO("Reconfigure request for the gazebo ros camera_: %s. New rate: %.2f", + this->camera_name_.c_str(), config.imager_rate); + this->parentSensor_->SetUpdateRate(config.imager_rate); + } } ////////////////////////////////////////////////////////////////////////////////