Ejemplo n.º 1
0
def publishSegStatus(segStatusPub, abort=False):
    segStat = SegStatusMsg()
    segStat.lastSegComplete = lastSegNumber
    segStat.abort = abort
    if (currSeg is not None):
        if (currSeg.pathSeg is not None):
            segStat.seg_number = currSeg.pathSeg.seg_number
        else:
            segStat.seg_number = 0
        segStat.progress_made = currSeg.segDistDone
    else:
        segStat.seg_number = 0
        segStat.progress_made = 0.0

    segStatusPub.publish(segStat)
Ejemplo n.º 2
0
def publishSegStatus(segStatusPub,abort=False):
    segStat = SegStatusMsg()
    segStat.lastSegComplete = lastSegNumber
    segStat.abort = abort
    if(currSeg is not None):
        if(currSeg.pathSeg is not None):
            segStat.seg_number = currSeg.pathSeg.seg_number
        else:
            segStat.seg_number = 0
        segStat.progress_made = currSeg.segDistDone
    else:
        segStat.seg_number = 0
        segStat.progress_made = 0.0
        
    segStatusPub.publish(segStat)
Ejemplo n.º 3
0
def publishSegStatus(segStatusPub,abort=False):
    global currState
    
    status = SegStatusMsg()

    if(currState.pathSeg is not None):
        status.seg_number = currState.pathSeg.seg_number
        status.abort = abort
        status.progress_made = currState.segDistDone
        
        if(currState.segDistDone < 1.0):
            status.segComplete = False
        else:
            status.segComplete = True   
        
    segStatusPub.publish(status)