personbehind.py 文件源码

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

项目:spqrel_tools 作者: LCAS 项目源码 文件源码
def rhMonitorThread (memory_service):
    global last_personid
    t = threading.currentThread()
    print "personbehind thread started"
    personid = 0
    while getattr(t, "do_run", True):
        v = 'false'
        try:
            pdist = memory_service.getData("Device/SubDeviceList/Platform/Back/Sonar/Sensor/Value")
            #distance to consider that the person following
            #print "rear sonar dist: ", pdist
            if (pdist < 1.5):
                v = 'true'
        except:
            v = 'false'

        set_condition(memory_service,'personbehind',v)

        time.sleep(0.5)
    print "personbehind thread quit"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号