def stop_streaming(self, camera_name):
"""
Stop camera streaming by given the camera name.
@type camera_name: str
@param camera_name: camera name
@rtype: bool
@return: False if camera not exists in camera name list or not able
to stop streaming camera. True if the camera not is streaming
mode or the camera successfully stop streaming.
"""
if not self.verify_camera_exists(camera_name):
return False
elif self._camera_streaming_status(camera_name):
self.cameras_io[camera_name]['interface'].set_signal_value(
"camera_streaming", False)
if self._camera_streaming_status(camera_name):
rospy.logerr(' '.join(["Failed to stop", camera_name,
" from streaming on this robot."]))
return False
else:
return True
else: # Camera not in streaming mode
return True
评论列表
文章目录