def main():
    """ Main entry point

    """

    ################MAIN() CODE FOR FREEZING BOT#############################
    global brokyControlly
    brokyControlly = BrokerController()
    brokyControlly.createBroker()

    # Warning: BotFreezer must be a global variable
    # The name given to the constructor must be the name of the
    # variable
    global BotFreezer
    BotFreezer = BotFreezerModule("BotFreezer")
    ##########END MAIN() CODE FOR FREEZING BOT################################

    #############################PROGRAM SPECIFIC ############################
    # Program specific proxies
    speechProxy = ALProxy("ALTextToSpeech")
    global nonBlockyWalky
    nonBlockyWalky = NonBlockWalk2("nonBlockyWalky")
    nonBlocky = ALProxy("nonBlockyWalky")

    # nonBlocky also has to have a post in it, along with
    # the walk commands INSIDE "NonBlockWalk2.py", if wait()
    # is going to work correctly
    id = nonBlocky.post.walk()
    nonBlocky.wait(id, 0)
    speechProxy.say("I have arrived.")
    ############################END PROGRAM SPECIFIC############################

    ################MAIN() CODE FOR FREEZING BOT################################
    brokyControlly.waitToStop()
def main():
    """ Main entry point
    """

    ########################FOR FREEZING BOT#######################
    global brokyControlly
    brokyControlly = BrokerController()
    brokyControlly.createBroker()

    # Warning: BotFreezer must be a global variable
    # The name given to the constructor must be the name of the
    # variable
    global BotFreezer
    BotFreezer = BotFreezerModule("BotFreezer")

    global cmModule
    cmModule = customMotions("cmModule")
    cm = ALProxy("cmModule")
    ###################FOR FREEZING BOT############################

    ########################FOR FOOT#######################
    global FootFreezer
    FootFreezer = FootFreezerModule("FootFreezer")

    ###################FOR FOOT############################

    stiffnesses  = 1.0
    motionProxy.setStiffnesses("Body", stiffnesses)
    postureProxy.goToPosture("StandInit", 1.0)
    time.sleep(1)

    motionProxy.setExternalCollisionProtectionEnabled("All", False)

    #id = cm.post.detectMarkAndMoveToRight()
    #cm.wait(id,0)
    id = cm.post.moveForward(1)
    cm.wait(id,0)
    id = cm.post.wave()
    cm.wait(id,0)
    tts.say("Hello, I am Robbie.")
    id = cm.post.turnAround()
    cm.wait(id,0)
    #id = cm.post.detectMarkAndMoveToLeft()
    #cm.wait(id,0)
    #id = cm.post.detectMarkAndMoveTo()
    #cm.wait(id,0)
    id = cm.post.turnAround()
    cm.wait(id,0)

    #id = cm.post.turnAround()
    #cm.wait(id, 0)
    #time.sleep(2)
    #tts.say("I am turned around")

    postureProxy.goToPosture("Sit", 1.0)

    #################FOR FREEZING BOT###########################
    # end broker to stop
    brokyControlly.waitToStop()
def main():
    """ Main entry point

    """

    global brokyControlly
    brokyControlly = BrokerController()
    brokyControlly.createBroker()

    # Warning: BotFreezer must be a global variable
    # The name given to the constructor must be the name of the
    # variable
    global BotFreezer
    BotFreezer = BotFreezerModule("BotFreezer")

    nonBlockyWalky = NonBlockWalk()
    #During this non-blocking walk, if any head tactil
    #is pressed, the robot will stop and sit
    nonBlockyWalky.walk()

    brokyControlly.waitToStop()
Exemple #4
0
def main():
    """ Main entry point
    """

    ########################FOR FREEZING BOT#######################
    global brokyControlly
    brokyControlly = BrokerController()
    brokyControlly.createBroker()

    # Warning: BotFreezer must be a global variable
    # The name given to the constructor must be the name of the
    # variable
    global BotFreezer
    BotFreezer = BotFreezerModule("BotFreezer")

    global cmModule
    cmModule = customMotions("cmModule")
    cm = ALProxy("cmModule")
    ###################FOR FREEZING BOT############################

    stiffnesses  = 1.0
    motionProxy.setStiffnesses("Body", stiffnesses)
    postureProxy.goToPosture("StandInit", 1.0)
    time.sleep(1)

    motionProxy.setExternalCollisionProtectionEnabled("All", False)

    #nonBlocky also has to have a post in it, along with
    #the walk commands INSIDE "NonBlockWalk2.py", if wait()
    #is going to work correctly




    #Print information
    # print "x " + str(x) + " (in meters)
    # print "y " + str(y) + " (in meters)"
    # print "z " + str(z) + " (in meters)"

    #turnAround()
    #detectMarkAndMoveTo()

    #id = customMotions.detectMarkAndMoveTo()


    #customMotions.moveForwardY(0, -.25)
    #customMotions.detectMarkAndMoveTo()
    #customMotions.wave()
    #tts.say("Hello I am Robbie")

    id = cm.post.detectMarkAndMoveTo()
    cm.wait(id, 0)

    id = cm.post.moveForwardY(0, -.25)
    cm.wait(id, 0)

    id = cm.post.detectMarkAndMoveTo()
    cm.wait(id, 0)

  #  id = cm.post.wave()
  #  cm.wait(id, 0)

    id = cm.post.turnAround()
    cm.wait(id, 0)

    id = cm.post.detectMarkAndMoveTo()
    cm.wait(id, 0)

    id = cm.post.detectMarkAndMoveTo()
    cm.wait(id, 0)

    id = cm.post.turnAround()
    cm.wait(id, 0)






    #time.sleep(2)
    #tts.say("I am turned around")
    #customMotions.detectMarkAndMoveTo()
    #customMotions.detectMarkAndMoveTo()
    #customMotions.turnAround()


    #motionProxy.changeAngles("HeadYaw",1, 0.1)
    #print motionProxy.getAngles("HeadYaw",False)
    #turnLeft90()
    #print motionProxy.getAngles("HeadYaw", False)


    postureProxy.goToPosture("Sit", 1.0)

    #################FOR FREEZING BOT###########################
    # end broker to stop
    brokyControlly.waitToStop()
def main():
    """ Main entry point
    """

    ########################FOR FREEZING BOT#######################
    global brokyControlly
    brokyControlly = BrokerController()
    brokyControlly.createBroker()

    # Warning: BotFreezer must be a global variable
    # The name given to the constructor must be the name of the
    # variable
    global BotFreezer
    BotFreezer = BotFreezerModule("BotFreezer")

    global cmModule
    cmModule = customMotions("cmModule")
    cm = ALProxy("cmModule")
    #global FootFreezer
    #FootFreezer = FootFreezerModule("FootFreezer")
    ###################FOR FREEZING BOT############################

    stiffnesses  = 1.0
    motionProxy.setStiffnesses("Body", stiffnesses)
    postureProxy.goToPosture("StandInit", 1.0)
    time.sleep(1)

    motionProxy.setExternalCollisionProtectionEnabled("All", False)

    id = cm.post.detectMarkAndMoveTo75Right(80)
    cm.wait(id,0)

    id = cm.post.moveForwardY(0,-.2)
    cm.wait(id,0)
    id = cm.post.detectMarkAndMoveTo75(107)
    cm.wait(id,0)

    id = cm.post.turnRight90()
    cm.wait(id,0)

    id = cm.post.lookAroundForMark(114)
    cm.wait(id,0)

    id = cm.post.wave()
    cm.wait(id,0)
    tts.say("Hello, I am Robbie. I'm a NAO robot. I'm designed and manufactured by the Aldebaan company in France, but all of my present behaviors have been programmed as part of a Senior Software Engineering project. Except for Josh Lee. He didn't do shit")
    tts.say("There's very little I can do without the programs that have designed and constructed by the Senior Software Engineering students here at Montana Tech. I'm afraid that programming me is not easy, but these students have been well equiped by their education here at Tech to deal with complex problems.")


    id = cm.post.fistBump()
    cm.wait(id,0)

    id = cm.post.turnRight50()
    cm.wait(id,0)
    id = cm.post.detectMarkSearch(64, "l")
    cm.wait(id,0)

    id = cm.post.moveForward(.2)
    cm.wait(id,0)

    id = cm.post.detectMarkSearchForward(68)
    cm.wait(id,0)
    id = cm.post.turnAround()
    cm.wait(id,0)

    #id = cm.post.turnAround()
    #cm.wait(id, 0)
    #time.sleep(2)
    #tts.say("I am turned around")



    postureProxy.goToPosture("Sit", 1.0)

    #################FOR FREEZING BOT###########################
    # end broker to stop
    brokyControlly.waitToStop()