コード例 #1
0
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        cmd.up(1),
        cmd.forward(5),
        cmd.right(2),
        cmd.backward(4),
        cmd.left(4),
        cmd.forward(5),
        
        # cmd.turn_left(45),
        # cmd.forward(sqrt(2)),
        # cmd.turn_right(45),
        # cmd.right(1),
        # cmd.turn_left(45),
        # cmd.forward(sqrt(0.5)),
        # cmd.turn_left(90),
        # cmd.forward(sqrt(0.5)),
        # cmd.turn_left(45),
        # cmd.forward(1),
        # cmd.turn_right(45),
        # cmd.backward(sqrt(2)),
        # cmd.turn_left(45),
        # cmd.forward(1),
    ]

    mission.add_commands(commands)
コード例 #2
0
ファイル: solution.py プロジェクト: yantao006/autonavx_web
def plan_mission(mission):

    mission.add_commands([
        cmd.up(1.0),
        cmd.forward(1),
        cmd.left(2),
        cmd.forward(4),
        cmd.turn_left(45),
        cmd.backward(sqrt(32)),
        cmd.turn_right(45),
        cmd.forward(4),
        cmd.left(2),
    ])
コード例 #3
0
ファイル: es1_fastest.py プロジェクト: giomasce/autonavx
def plan_mission(mission):

    DELTA = 0.125
    VDELTA = 0.45
    commands  = [
        cmd.up(1-VDELTA),
        cmd.forward(5-DELTA),
        cmd.left(2-DELTA),
        cmd.backward(4-2*DELTA),
        cmd.right(4-2*DELTA),
        cmd.forward(6),
    ]

    mission.add_commands(commands)
コード例 #4
0
def plan_mission(mission):

    commands  = [
        cmd.up(1),
        cmd.forward(1),
        cmd.right(2),
        cmd.forward(4),
        cmd.left(4),
        cmd.backward(4),
        cmd.turn_right(45),
        cmd.forward(3),
    ]

    mission.add_commands(commands)
コード例 #5
0
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        cmd.up(1),
        cmd.forward(5),
        cmd.right(2),
        cmd.backward(4),
        cmd.left(4),
        cmd.forward(5),
    ]

    mission.add_commands(commands)
コード例 #6
0
ファイル: solution.py プロジェクト: OpenGelo/autonavx_web
def plan_mission(mission):

    mission.add_commands(
        [
            cmd.up(1.0),
            cmd.forward(1),
            cmd.left(2),
            cmd.forward(4),
            cmd.turn_left(45),
            cmd.backward(sqrt(32)),
            cmd.turn_right(45),
            cmd.forward(4),
            cmd.left(2),
        ]
    )
コード例 #7
0
def plan_mission(mission):

    commands = [
        cmd.up(1.0),  # cmd.up: move x meters up
        cmd.left(2.0),  # cmd.left: move x meters to the left
        cmd.forward(6.0),  # cmd.forward: move x meters forward
        cmd.right(2.0),  # cmd.right: move x meters to the right
        cmd.backward(6.0),  # cmd.backward: move x meters backward
        cmd.right(2.0),
        cmd.forward(6.0),
        cmd.left(2.0),
        cmd.backward(6.0)
    ]

    mission.add_commands(commands)
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        # suppose that the beacons are placed on a set of grid points, 
        # labelled as follows:
        # (0,0), (0,1), (0,2)
        # (1,0), (1,1), (1,2)
        # (2,0), (2,1), (2,2)
        
        # increase altitude to meet beacons
        cmd.up(1.0),
        
        # align with first grid point at grid point (2,2)
        cmd.turn_right(90.0),
        cmd.forward(2.0),
        cmd.turn_left(90.0),
        
        # move through the beacon at (2,2) to the beacon at (0,2)
        cmd.forward(5.0),
        
        # align with beacon at grid point (0,1)
        cmd.turn_left(90.0),

        # move from beacon at (0,2) through the beacon at (0,1) to the beacon at (0,0)
        cmd.forward(4.0),

        # align with beacon at grid point (1,0)
        cmd.turn_left(90.0),

        # move from beacon at (0,0) through the beacon at (1,0) to the beacon at (2,0)
        cmd.forward(4.0),

        # align with beacon at grid point (2,1)
        cmd.turn_left(90.0),

        # move beacon at grid point (2,1)
        cmd.forward(2.0),

        # align with beacon at grid point (1,1)
        cmd.turn_left(90.0),

        # move beacon at grid point (2,1)
        cmd.forward(2.0),
    ]

    mission.add_commands(commands)
コード例 #9
0
ファイル: QTP.py プロジェクト: Ilvif666/autonav
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands = [
        cmd.up(1),
        cmd.turn_left(90 - 26.57),
        cmd.forward(sqrt((2 * 0.5)**2 + (4 * 0.5)**2)),
        cmd.turn_right(90 - 26.57),
        cmd.forward(4),
        cmd.right(2),
        cmd.backward(4),
        cmd.right(2),
        cmd.forward(4),
        cmd.turn_left(45),
    ]

    mission.add_commands(commands)
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        cmd.up(1),
        cmd.forward(6),
        cmd.turn_left(90),
        cmd.forward(2),
        cmd.turn_left(90),
        cmd.forward(6),
        cmd.turn_left(90),
        cmd.forward(4),
        cmd.turn_left(90),
        cmd.forward(6),
    ]

    mission.add_commands(commands)
コード例 #11
0
ファイル: hw1.py プロジェクト: dsbmac/AUTONAVx
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        # middle column
        cmd.up(1),
        cmd.forward(5),
        
        # right column
        cmd.right(2),
        cmd.backward(5),
        
        # left column
        cmd.left(4),
        cmd.forward(6),
        
        
    ]

    mission.add_commands(commands)
コード例 #12
0
def plan_mission(mission):

    commands = [
        cmd.down(0.5),
        cmd.right(1),
        cmd.turn_left(45),
        cmd.forward(sqrt(2)),
        cmd.turn_right(45),
        cmd.right(1),
        cmd.turn_left(45),
        cmd.forward(sqrt(0.5)),
        cmd.turn_left(90),
        cmd.forward(sqrt(0.5)),
        cmd.turn_left(45),
        cmd.forward(1),
        cmd.turn_right(45),
        cmd.backward(sqrt(2)),
        cmd.turn_left(45),
        cmd.forward(1),
    ]

    #mission.add_commands(commands)

    myCommand = [
        cmd.up(1),
        cmd.right(2),
        cmd.forward(5),
        cmd.left(2),
        cmd.backward(5),
        cmd.left(2),
        cmd.forward(5),
        cmd.right(2),
        cmd.turn_right(360),
        cmd.backward(5),
        cmd.turn_left(360),
        cmd.down(1),
    ]

    mission.add_commands(myCommand)
コード例 #13
0
ファイル: plan_mission.py プロジェクト: witwiki/autonav-algos
def plan_mission(mission):

    commands  = [
        cmd.down(0.5),
        cmd.right(1),
        cmd.turn_left(45),
        cmd.forward(sqrt(2)),
        cmd.turn_right(45),
        cmd.right(1),
        cmd.turn_left(45),
        cmd.forward(sqrt(0.5)),
        cmd.turn_left(90),
        cmd.forward(sqrt(0.5)),
        cmd.turn_left(45),
        cmd.forward(1),
        cmd.turn_right(45),
        cmd.backward(sqrt(2)),
        cmd.turn_left(45),
        cmd.forward(1),
    ]
    
    #mission.add_commands(commands)
    
    myCommand = [
        cmd.up(1),
        cmd.right(2),
        cmd.forward(5),
        cmd.left(2),
        cmd.backward(5),
        cmd.left(2),
        cmd.forward(5),
        cmd.right(2),
        cmd.turn_right(360),
        cmd.backward(5),
        cmd.turn_left(360),
        cmd.down(1),
    ]
    
    mission.add_commands(myCommand)
コード例 #14
0
ファイル: HW1-1.py プロジェクト: krahul24x7/TUMx-Homework
def plan_mission(mission):

    # this is an example illustrating the different motion commands,
    # replace them with your own commands and activate all beacons
    commands  = [
        cmd.up(1),
        cmd.turn_right(degrees(atan(2))),
        cmd.forward(sqrt(1 + 2**2)),
        cmd.turn_right(degrees(atan(0.5)) + 45),
        cmd.backward(sqrt(4**2 + 4**2)),
        cmd.turn_left(45),
        cmd.forward(4),
        cmd.turn_left(degrees(atan(0.5))),
        cmd.backward(sqrt(2**2 + 4**2)),
        cmd.turn_left(degrees(atan(2))),
        cmd.backward(2),
        cmd.turn_right(90),
        cmd.forward(2),
        cmd.turn_left(45),
        cmd.forward(sqrt(2**2 + 2**2)),
        cmd.down(1)
    ]

    mission.add_commands(commands)