# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
import numpy as np

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_rplidar')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_rplidar')
    _rplidar = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_rplidar', [dirname(__file__)])
        except ImportError:
            import _rplidar
            return _rplidar
        try:
            _mod = imp.load_module('_rplidar', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _rplidar = swig_import_helper()
    del swig_import_helper
else:
    import _rplidar
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _rplidar.delete_SwigPyIterator
    __del__ = lambda self: None

    def value(self):
        return _rplidar.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _rplidar.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _rplidar.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _rplidar.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _rplidar.SwigPyIterator_equal(self, x)

    def copy(self):
        return _rplidar.SwigPyIterator_copy(self)

    def next(self):
        return _rplidar.SwigPyIterator_next(self)

    def __next__(self):
        return _rplidar.SwigPyIterator___next__(self)

    def previous(self):
        return _rplidar.SwigPyIterator_previous(self)

    def advance(self, n):
        return _rplidar.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _rplidar.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _rplidar.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _rplidar.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _rplidar.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _rplidar.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _rplidar.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self
SwigPyIterator_swigregister = _rplidar.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

class RplidarScanMode(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RplidarScanMode, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RplidarScanMode, name)
    __repr__ = _swig_repr
    __swig_setmethods__["id"] = _rplidar.RplidarScanMode_id_set
    __swig_getmethods__["id"] = _rplidar.RplidarScanMode_id_get
    if _newclass:
        id = _swig_property(_rplidar.RplidarScanMode_id_get, _rplidar.RplidarScanMode_id_set)
    __swig_setmethods__["us_per_sample"] = _rplidar.RplidarScanMode_us_per_sample_set
    __swig_getmethods__["us_per_sample"] = _rplidar.RplidarScanMode_us_per_sample_get
    if _newclass:
        us_per_sample = _swig_property(_rplidar.RplidarScanMode_us_per_sample_get, _rplidar.RplidarScanMode_us_per_sample_set)
    __swig_setmethods__["max_distance"] = _rplidar.RplidarScanMode_max_distance_set
    __swig_getmethods__["max_distance"] = _rplidar.RplidarScanMode_max_distance_get
    if _newclass:
        max_distance = _swig_property(_rplidar.RplidarScanMode_max_distance_get, _rplidar.RplidarScanMode_max_distance_set)
    __swig_setmethods__["ans_type"] = _rplidar.RplidarScanMode_ans_type_set
    __swig_getmethods__["ans_type"] = _rplidar.RplidarScanMode_ans_type_get
    if _newclass:
        ans_type = _swig_property(_rplidar.RplidarScanMode_ans_type_get, _rplidar.RplidarScanMode_ans_type_set)
    __swig_setmethods__["scan_mode"] = _rplidar.RplidarScanMode_scan_mode_set
    __swig_getmethods__["scan_mode"] = _rplidar.RplidarScanMode_scan_mode_get
    if _newclass:
        scan_mode = _swig_property(_rplidar.RplidarScanMode_scan_mode_get, _rplidar.RplidarScanMode_scan_mode_set)

    def __init__(self):
        this = _rplidar.new_RplidarScanMode()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _rplidar.delete_RplidarScanMode
    __del__ = lambda self: None
RplidarScanMode_swigregister = _rplidar.RplidarScanMode_swigregister
RplidarScanMode_swigregister(RplidarScanMode)

DRIVER_TYPE_SERIALPORT = _rplidar.DRIVER_TYPE_SERIALPORT
DRIVER_TYPE_TCP = _rplidar.DRIVER_TYPE_TCP
class ChannelDevice(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ChannelDevice, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ChannelDevice, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def bind(self, arg2, arg3):
        return _rplidar.ChannelDevice_bind(self, arg2, arg3)

    def open(self):
        return _rplidar.ChannelDevice_open(self)

    def close(self):
        return _rplidar.ChannelDevice_close(self)

    def flush(self):
        return _rplidar.ChannelDevice_flush(self)

    def waitfordata(self, data_count, timeout=-1, returned_size=None):
        return _rplidar.ChannelDevice_waitfordata(self, data_count, timeout, returned_size)

    def senddata(self, data, size):
        return _rplidar.ChannelDevice_senddata(self, data, size)

    def recvdata(self, data, size):
        return _rplidar.ChannelDevice_recvdata(self, data, size)

    def setDTR(self):
        return _rplidar.ChannelDevice_setDTR(self)

    def clearDTR(self):
        return _rplidar.ChannelDevice_clearDTR(self)

    def ReleaseRxTx(self):
        return _rplidar.ChannelDevice_ReleaseRxTx(self)
    __swig_destroy__ = _rplidar.delete_ChannelDevice
    __del__ = lambda self: None
ChannelDevice_swigregister = _rplidar.ChannelDevice_swigregister
ChannelDevice_swigregister(ChannelDevice)

class RPlidarDriver(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RPlidarDriver, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RPlidarDriver, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    DEFAULT_TIMEOUT = _rplidar.RPlidarDriver_DEFAULT_TIMEOUT
    MAX_SCAN_NODES = _rplidar.RPlidarDriver_MAX_SCAN_NODES
    LEGACY_SAMPLE_DURATION = _rplidar.RPlidarDriver_LEGACY_SAMPLE_DURATION
    if _newclass:
        CreateDriver = staticmethod(_rplidar.RPlidarDriver_CreateDriver)
    else:
        CreateDriver = _rplidar.RPlidarDriver_CreateDriver
    if _newclass:
        DisposeDriver = staticmethod(_rplidar.RPlidarDriver_DisposeDriver)
    else:
        DisposeDriver = _rplidar.RPlidarDriver_DisposeDriver

    def connect(self, arg2, arg3, flag=0):
        return _rplidar.RPlidarDriver_connect(self, arg2, arg3, flag)

    def disconnect(self):
        return _rplidar.RPlidarDriver_disconnect(self)

    def isConnected(self):
        return _rplidar.RPlidarDriver_isConnected(self)

    def reset(self, *args):
        return _rplidar.RPlidarDriver_reset(self, *args)

    def clearNetSerialRxCache(self):
        return _rplidar.RPlidarDriver_clearNetSerialRxCache(self)

    def getAllSupportedScanModes(self, *args):
        return _rplidar.RPlidarDriver_getAllSupportedScanModes(self, *args)

    def getTypicalScanMode(self, *args):
        return _rplidar.RPlidarDriver_getTypicalScanMode(self, *args)

    def startScan(self, force, useTypicalScan, options=0, outUsedScanMode=None):
        return _rplidar.RPlidarDriver_startScan(self, force, useTypicalScan, options, outUsedScanMode)

    def startScanExpress(self, *args):
        return _rplidar.RPlidarDriver_startScanExpress(self, *args)

    def getHealth(self, *args):
        return _rplidar.RPlidarDriver_getHealth(self, *args)

    def getDeviceInfo(self, *args):
        return _rplidar.RPlidarDriver_getDeviceInfo(self, *args)

    def getSampleDuration_uS(self, *args):
        return _rplidar.RPlidarDriver_getSampleDuration_uS(self, *args)

    def setMotorPWM(self, pwm):
        return _rplidar.RPlidarDriver_setMotorPWM(self, pwm)

    def setLidarSpinSpeed(self, *args):
        return _rplidar.RPlidarDriver_setLidarSpinSpeed(self, *args)

    def startMotor(self):
        return _rplidar.RPlidarDriver_startMotor(self)

    def stopMotor(self):
        return _rplidar.RPlidarDriver_stopMotor(self)

    def checkMotorCtrlSupport(self, *args):
        return _rplidar.RPlidarDriver_checkMotorCtrlSupport(self, *args)

    def checkIfTofLidar(self, *args):
        return _rplidar.RPlidarDriver_checkIfTofLidar(self, *args)

    def getFrequency(self, *args):
        return _rplidar.RPlidarDriver_getFrequency(self, *args)

    def startScanNormal(self, *args):
        return _rplidar.RPlidarDriver_startScanNormal(self, *args)

    def checkExpressScanSupported(self, *args):
        return _rplidar.RPlidarDriver_checkExpressScanSupported(self, *args)

    def stop(self, *args):
        return _rplidar.RPlidarDriver_stop(self, *args)

    def grabScanData(self, *args):
        return _rplidar.RPlidarDriver_grabScanData(self, *args)

    def grabScanDataHq(self, *args):
        return _rplidar.RPlidarDriver_grabScanDataHq(self, *args)

    def ascendScanData(self, *args):
        return _rplidar.RPlidarDriver_ascendScanData(self, *args)

    def getScanDataWithInterval(self, nodebuffer, count):
        return _rplidar.RPlidarDriver_getScanDataWithInterval(self, nodebuffer, count)

    def getScanDataWithIntervalHq(self, nodebuffer, count):
        return _rplidar.RPlidarDriver_getScanDataWithIntervalHq(self, nodebuffer, count)
    __swig_destroy__ = _rplidar.delete_RPlidarDriver
    __del__ = lambda self: None
    __swig_setmethods__["_chanDev"] = _rplidar.RPlidarDriver__chanDev_set
    __swig_getmethods__["_chanDev"] = _rplidar.RPlidarDriver__chanDev_get
    if _newclass:
        _chanDev = _swig_property(_rplidar.RPlidarDriver__chanDev_get, _rplidar.RPlidarDriver__chanDev_set)
RPlidarDriver_swigregister = _rplidar.RPlidarDriver_swigregister
RPlidarDriver_swigregister(RPlidarDriver)

def RPlidarDriver_CreateDriver(*args):
    return _rplidar.RPlidarDriver_CreateDriver(*args)
RPlidarDriver_CreateDriver = _rplidar.RPlidarDriver_CreateDriver

def RPlidarDriver_DisposeDriver(drv):
    return _rplidar.RPlidarDriver_DisposeDriver(drv)
RPlidarDriver_DisposeDriver = _rplidar.RPlidarDriver_DisposeDriver

class lidar_sample(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, lidar_sample, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, lidar_sample, name)
    __repr__ = _swig_repr
    __swig_setmethods__["angle"] = _rplidar.lidar_sample_angle_set
    __swig_getmethods__["angle"] = _rplidar.lidar_sample_angle_get
    if _newclass:
        angle = _swig_property(_rplidar.lidar_sample_angle_get, _rplidar.lidar_sample_angle_set)
    __swig_setmethods__["distance"] = _rplidar.lidar_sample_distance_set
    __swig_getmethods__["distance"] = _rplidar.lidar_sample_distance_get
    if _newclass:
        distance = _swig_property(_rplidar.lidar_sample_distance_get, _rplidar.lidar_sample_distance_set)
    __swig_setmethods__["quality"] = _rplidar.lidar_sample_quality_set
    __swig_getmethods__["quality"] = _rplidar.lidar_sample_quality_get
    if _newclass:
        quality = _swig_property(_rplidar.lidar_sample_quality_get, _rplidar.lidar_sample_quality_set)

    def __init__(self):
        this = _rplidar.new_lidar_sample()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _rplidar.delete_lidar_sample
    __del__ = lambda self: None
lidar_sample_swigregister = _rplidar.lidar_sample_swigregister
lidar_sample_swigregister(lidar_sample)

class Rplidar(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Rplidar, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Rplidar, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _rplidar.new_Rplidar()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _rplidar.delete_Rplidar
    __del__ = lambda self: None

    def connect(self, *args):
        return _rplidar.Rplidar_connect(self, *args)

    def destroy(self):
        return _rplidar.Rplidar_destroy(self)

    def checkHealth(self):
        return _rplidar.Rplidar_checkHealth(self)

    def startMotor(self, scanmode=2):
        if self.checkHealth():
            return _rplidar.Rplidar_startMotor(self, scanmode)
        else:
            raise(RuntimeError("LiDAR is not connected."))

    def stopMotor(self):
        if self.checkHealth():
            return _rplidar.Rplidar_stopMotor(self)
        else:
            raise(RuntimeError("LiDAR is not connected."))

    def getSamples(self, filter_quality=True):
        return _rplidar.Rplidar_getSamples(self, filter_quality)

    def getVectors(self, filter_quality=True):
        return np.array(_rplidar.Rplidar_getVectors(self, filter_quality))

    def getXY(self, filter_quality=True):
        return np.array(_rplidar.Rplidar_getXY(self, filter_quality))[:,::-1]

    def getMap(self, size=(300,300), limit_distance=12000,  filter_quality=True):
        pixmap=np.zeros(size[::-1])

        width,height=(None,None)

        if type(size) in (tuple, list):
            width,height=(size[0]/2,size[1]/2)
        elif type(size) in (str, int, float):
            size=int(size)
            width,height=(size/2,size/2)
        else:
            raise(ValueError("The argument 'size' is not available."))

        coords=np.array(self.getXY())

        is_ranged=np.mean(np.abs(coords)<limit_distance, axis=1)==1.0

        for i in range(len(is_ranged)):
            if is_ranged[i]:
                x,y=( (coords[i]*(1.,-1.)) /limit_distance) * (width,height) + (width,height)
                pixmap[int(y),int(x)]+=1

        std=np.mean(pixmap)+np.std(pixmap)

        if std != 0:
            pixmap=np.where(pixmap>std, std, pixmap)
            pixmap=(pixmap/std)*255

        return pixmap


Rplidar_swigregister = _rplidar.Rplidar_swigregister
Rplidar_swigregister(Rplidar)

class vector_double(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_double, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_double, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _rplidar.vector_double_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rplidar.vector_double___nonzero__(self)

    def __bool__(self):
        return _rplidar.vector_double___bool__(self)

    def __len__(self):
        return _rplidar.vector_double___len__(self)

    def __getslice__(self, i, j):
        return _rplidar.vector_double___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rplidar.vector_double___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rplidar.vector_double___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rplidar.vector_double___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rplidar.vector_double___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rplidar.vector_double___setitem__(self, *args)

    def pop(self):
        return _rplidar.vector_double_pop(self)

    def append(self, x):
        return _rplidar.vector_double_append(self, x)

    def empty(self):
        return _rplidar.vector_double_empty(self)

    def size(self):
        return _rplidar.vector_double_size(self)

    def swap(self, v):
        return _rplidar.vector_double_swap(self, v)

    def begin(self):
        return _rplidar.vector_double_begin(self)

    def end(self):
        return _rplidar.vector_double_end(self)

    def rbegin(self):
        return _rplidar.vector_double_rbegin(self)

    def rend(self):
        return _rplidar.vector_double_rend(self)

    def clear(self):
        return _rplidar.vector_double_clear(self)

    def get_allocator(self):
        return _rplidar.vector_double_get_allocator(self)

    def pop_back(self):
        return _rplidar.vector_double_pop_back(self)

    def erase(self, *args):
        return _rplidar.vector_double_erase(self, *args)

    def __init__(self, *args):
        this = _rplidar.new_vector_double(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, x):
        return _rplidar.vector_double_push_back(self, x)

    def front(self):
        return _rplidar.vector_double_front(self)

    def back(self):
        return _rplidar.vector_double_back(self)

    def assign(self, n, x):
        return _rplidar.vector_double_assign(self, n, x)

    def resize(self, *args):
        return _rplidar.vector_double_resize(self, *args)

    def insert(self, *args):
        return _rplidar.vector_double_insert(self, *args)

    def reserve(self, n):
        return _rplidar.vector_double_reserve(self, n)

    def capacity(self):
        return _rplidar.vector_double_capacity(self)
    __swig_destroy__ = _rplidar.delete_vector_double
    __del__ = lambda self: None
vector_double_swigregister = _rplidar.vector_double_swigregister
vector_double_swigregister(vector_double)

class vector_lidar_sample(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_lidar_sample, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_lidar_sample, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _rplidar.vector_lidar_sample_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rplidar.vector_lidar_sample___nonzero__(self)

    def __bool__(self):
        return _rplidar.vector_lidar_sample___bool__(self)

    def __len__(self):
        return _rplidar.vector_lidar_sample___len__(self)

    def __getslice__(self, i, j):
        return _rplidar.vector_lidar_sample___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rplidar.vector_lidar_sample___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rplidar.vector_lidar_sample___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rplidar.vector_lidar_sample___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rplidar.vector_lidar_sample___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rplidar.vector_lidar_sample___setitem__(self, *args)

    def pop(self):
        return _rplidar.vector_lidar_sample_pop(self)

    def append(self, x):
        return _rplidar.vector_lidar_sample_append(self, x)

    def empty(self):
        return _rplidar.vector_lidar_sample_empty(self)

    def size(self):
        return _rplidar.vector_lidar_sample_size(self)

    def swap(self, v):
        return _rplidar.vector_lidar_sample_swap(self, v)

    def begin(self):
        return _rplidar.vector_lidar_sample_begin(self)

    def end(self):
        return _rplidar.vector_lidar_sample_end(self)

    def rbegin(self):
        return _rplidar.vector_lidar_sample_rbegin(self)

    def rend(self):
        return _rplidar.vector_lidar_sample_rend(self)

    def clear(self):
        return _rplidar.vector_lidar_sample_clear(self)

    def get_allocator(self):
        return _rplidar.vector_lidar_sample_get_allocator(self)

    def pop_back(self):
        return _rplidar.vector_lidar_sample_pop_back(self)

    def erase(self, *args):
        return _rplidar.vector_lidar_sample_erase(self, *args)

    def __init__(self, *args):
        this = _rplidar.new_vector_lidar_sample(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, x):
        return _rplidar.vector_lidar_sample_push_back(self, x)

    def front(self):
        return _rplidar.vector_lidar_sample_front(self)

    def back(self):
        return _rplidar.vector_lidar_sample_back(self)

    def assign(self, n, x):
        return _rplidar.vector_lidar_sample_assign(self, n, x)

    def resize(self, *args):
        return _rplidar.vector_lidar_sample_resize(self, *args)

    def insert(self, *args):
        return _rplidar.vector_lidar_sample_insert(self, *args)

    def reserve(self, n):
        return _rplidar.vector_lidar_sample_reserve(self, n)

    def capacity(self):
        return _rplidar.vector_lidar_sample_capacity(self)
    __swig_destroy__ = _rplidar.delete_vector_lidar_sample
    __del__ = lambda self: None
vector_lidar_sample_swigregister = _rplidar.vector_lidar_sample_swigregister
vector_lidar_sample_swigregister(vector_lidar_sample)

class vector_vector_double(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, vector_vector_double, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, vector_vector_double, name)
    __repr__ = _swig_repr

    def iterator(self):
        return _rplidar.vector_vector_double_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rplidar.vector_vector_double___nonzero__(self)

    def __bool__(self):
        return _rplidar.vector_vector_double___bool__(self)

    def __len__(self):
        return _rplidar.vector_vector_double___len__(self)

    def __getslice__(self, i, j):
        return _rplidar.vector_vector_double___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rplidar.vector_vector_double___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rplidar.vector_vector_double___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rplidar.vector_vector_double___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rplidar.vector_vector_double___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rplidar.vector_vector_double___setitem__(self, *args)

    def pop(self):
        return _rplidar.vector_vector_double_pop(self)

    def append(self, x):
        return _rplidar.vector_vector_double_append(self, x)

    def empty(self):
        return _rplidar.vector_vector_double_empty(self)

    def size(self):
        return _rplidar.vector_vector_double_size(self)

    def swap(self, v):
        return _rplidar.vector_vector_double_swap(self, v)

    def begin(self):
        return _rplidar.vector_vector_double_begin(self)

    def end(self):
        return _rplidar.vector_vector_double_end(self)

    def rbegin(self):
        return _rplidar.vector_vector_double_rbegin(self)

    def rend(self):
        return _rplidar.vector_vector_double_rend(self)

    def clear(self):
        return _rplidar.vector_vector_double_clear(self)

    def get_allocator(self):
        return _rplidar.vector_vector_double_get_allocator(self)

    def pop_back(self):
        return _rplidar.vector_vector_double_pop_back(self)

    def erase(self, *args):
        return _rplidar.vector_vector_double_erase(self, *args)

    def __init__(self, *args):
        this = _rplidar.new_vector_vector_double(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, x):
        return _rplidar.vector_vector_double_push_back(self, x)

    def front(self):
        return _rplidar.vector_vector_double_front(self)

    def back(self):
        return _rplidar.vector_vector_double_back(self)

    def assign(self, n, x):
        return _rplidar.vector_vector_double_assign(self, n, x)

    def resize(self, *args):
        return _rplidar.vector_vector_double_resize(self, *args)

    def insert(self, *args):
        return _rplidar.vector_vector_double_insert(self, *args)

    def reserve(self, n):
        return _rplidar.vector_vector_double_reserve(self, n)

    def capacity(self):
        return _rplidar.vector_vector_double_capacity(self)
    __swig_destroy__ = _rplidar.delete_vector_vector_double
    __del__ = lambda self: None
vector_vector_double_swigregister = _rplidar.vector_vector_double_swigregister
vector_vector_double_swigregister(vector_vector_double)

# This file is compatible with both classic and new-style classes.


