Example #1
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)
Example #2
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)
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.forward(1),
        cmd.up(1),
        cmd.left(2),
        cmd.forward(4),
        cmd.right(2),
        cmd.backward(4),
        cmd.right(2),
        cmd.forward(4),
    ]

    mission.add_commands(commands)
Example #4
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.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)
Example #5
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)
Example #6
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)
Example #7
0
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)
Example #8
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)
Example #9
0
    def mission_setup(self, planner):
        import quadrotor.command as cmd

        # guess what this flightplan will do :)
        commands = [
            cmd.down(0.5),
            cmd.right(1),
            cmd.turn_left(45),
            cmd.forward(math.sqrt(2)),
            cmd.turn_right(45),
            cmd.right(1),
            cmd.turn_left(45),
            cmd.forward(math.sqrt(0.5)),
            cmd.turn_left(90),
            cmd.forward(math.sqrt(0.5)),
            cmd.turn_left(45),
            cmd.forward(1),
            cmd.turn_right(45),
            cmd.backward(math.sqrt(2)),
            cmd.turn_left(45),
            cmd.forward(1),
        ]

        planner.add_commands(commands)
Example #10
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  = [
        # 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)