camera.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:intera_sdk 作者: RethinkRobotics 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号