File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
moveit_ros/moveit_servo/src Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ void ServoNode::pauseServo(const std::shared_ptr<std_srvs::srv::SetBool::Request
155155 response->message = message;
156156 return ;
157157 }
158+ std::lock_guard<std::mutex> lock_guard (lock_);
158159 servo_paused_ = request->data ;
159160 response->success = (servo_paused_ == request->data );
160161 if (servo_paused_)
@@ -164,7 +165,6 @@ void ServoNode::pauseServo(const std::shared_ptr<std_srvs::srv::SetBool::Request
164165 }
165166 else
166167 {
167- std::lock_guard<std::mutex> lock_guard (lock_);
168168 // Reset the smoothing plugin with the robot's current state in case the robot moved between pausing and unpausing.
169169 last_commanded_state_ = servo_->getCurrentRobotState (true /* block for current robot state */ );
170170 servo_->resetSmoothing (last_commanded_state_);
You can’t perform that action at this time.
0 commit comments