dooropen.py 文件源码

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

项目:spqrel_tools 作者: LCAS 项目源码 文件源码
def rhMonitorThread (memory_service):
    t = threading.currentThread()
    while getattr(t, "do_run", True):
        sonarValues =  memory_service.getListData(sonarValueList)
#       print "Sonar: [Front, Back]", sonarValues
        laserValues =  memory_service.getListData(laserValueList)
#       print "Laser center: ", laserValues[42],laserValues[44],laserValues[46] # X values of central beams
        # TODO
        if (laserValues[42]>2 and laserValues[44]>2 and laserValues[46]>2):
            v = 'true'
        else:
            v = 'false'
        set_condition(memory_service,'dooropen',v)
#        print 'dooropen = ',v
        time.sleep(1)
    print "dooropen thread quit"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号