示例#1
0
    def __init__(self, occupancyGrid, planner, controller):
        PlannerControllerBase.__init__(self, occupancyGrid, planner,
                                       controller)

        self.mapUpdateSubscriber = rospy.Subscriber('updated_map', MapUpdate,
                                                    self.mapUpdateCallback)
        self.gridUpdateLock = threading.Condition()
    def __init__(self, occupancyGrid, planner, controller):
        PlannerControllerBase.__init__(self, occupancyGrid, planner,
                                       controller)

        self.mapUpdateSubscriber = rospy.Subscriber('updated_map', MapUpdate,
                                                    self.mapUpdateCallback)
        self.gridUpdateLock = threading.Condition()
        self.aisleToDriveDown = None

        # Set the coordinates of aisles
        self.aisleCoords = {
            Aisle.A: (26, 32),
            Aisle.B: (43, 32),
            Aisle.C: (59, 32),
            Aisle.D: (75, 32),
            Aisle.E: (91, 32)
        }

        # Store the starting position
        self.start = (0, 0)

        # Store the current cost of robot
        self.currentCost = 0

        # wait time
        self.waitTime = 0

        # has waited?
        self.waited = False
示例#3
0
    def __init__(self, occupancyGrid, planner, controller):
        PlannerControllerBase.__init__(self, occupancyGrid, planner, controller)
        
        self.mapUpdateSubscriber = rospy.Subscriber('updated_map', MapUpdate, self.mapUpdateCallback)
        self.gridUpdateLock =  threading.Condition()
        self.aisleToDriveDown = None

        self.exportDirectory = None
        self.initialPlanFlag = True
示例#4
0
    def __init__(self, occupancyGrid, planner, controller):
        PlannerControllerBase.__init__(self, occupancyGrid, planner,
                                       controller)

        self.mapUpdateSubscriber = rospy.Subscriber('updated_map', MapUpdate,
                                                    self.mapUpdateCallback)
        self.gridUpdateLock = threading.Condition()
        self.aisleToDriveDown = None
        self.lambda_B = 1 / 90

        #for Part 2 Q1 and Q2, use:
        #self.obstacle_B_prob = 1

        #for Part 2 Q3, use:
        self.obstacle_B_prob = 0.8
        self.expectedWaitTime = self.obstacle_B_prob / self.lambda_B
        #L_W
        self.waitCost = 2