Exemplo n.º 1
0
Arquivo: move.py Projeto: uf-mil/mil
 def init(cls):
     parser = ThrowingArgumentParser(
         description='Command Line Mission Runner',
         usage='Pass any pose editor commands with an arguments. \n\t\
                                            forward 1 (moves forward 1 meter) \n\t\
                                            backward 2ft (moves backward 2 feet)\
                                            \n\t forward 1 backward 2ft\
                                            (moves forward 1 meter then from there moves backward 2 feet), '
     )
     parser.add_argument(
         'commands',
         type=str,
         nargs='*',
         help=
         'Pose editor commands to run each followed by an argument to pass to the command\
                               (distance or angle usally). \
                               Optionally a unit can be added if a non-standard unit is desired.'
     )
     parser.add_argument('-s',
                         '--speed',
                         type=float,
                         default=0.2,
                         help="How fast to execute the move. (m/s)")
     parser.add_argument('-z',
                         '--zrp',
                         action='store_true',
                         help="Make end goal have zero roll and pitch.")
     parser.add_argument('-b',
                         '--blind',
                         action='store_true',
                         help="Do not check if waypoint is safe.")
     cls.parser = parser
Exemplo n.º 2
0
    def init(cls):
        parser = ThrowingArgumentParser(description='start gate marshall',
                                        usage='''start gate marshall''')
        parser.add_argument('-q',
                            '--quals',
                            action='store_true',
                            help='set for quals')

        cls.parser = parser
Exemplo n.º 3
0
    def init(cls):
        parser = ThrowingArgumentParser(
            description='Dock',
            usage='''Default parameters: \'runtask Docking
                                         \'''')
        parser.add_argument('-t', '--time', type=int, default=-1)
        cls.parser = parser

        cls.bboxsub = cls.nh.subscribe("/bbox_pub", ObjectsInImage)
        cls.camera_lidar_tf = cls.nh.get_service_client(
            '/camera_to_lidar/front_right_cam', CameraToLidarTransform)
Exemplo n.º 4
0
 def init(cls):
     parser = ThrowingArgumentParser(description='Explore a bit mission',
                                     usage='Default parameters: \'runtask ExploreJaxon\'')
     parser.add_argument('-c', '--count', type=int, default=5,
                         help='number of unclassified objects to attempt')
     parser.add_argument('-d', '--dist', type=float, default=30.,
                         help='distance to limit checks to')
     parser.add_argument('-b', '--backup', type=float, default=7.,
                         help='distance to limit checks to')
     parser.add_argument('-w', '--wait', type=float, default=8.,
                         help='distance to limit checks to')
     cls.parser = parser
Exemplo n.º 5
0
    def init(cls):
        parser = ThrowingArgumentParser(description='Start Gate Mission',
                                        usage='Default parameters: \'runtask ObstacleAvoid\'')
        parser.add_argument('-p', '--numpasses', type=int, default=3,
                            help='number of passes through the obstacle course to make')
        parser.add_argument('-d', '--outoffset', type=int, default=10,
                            help='distance from the course in meters to traverse to')
        parser.add_argument('-i', '--usepoi', action='store_true',
                            help='set to use pois for square corners')
        parser.add_argument('-s', '--speed', type=float, default=0.75,
                            help='set speed_factor of boat')

        cls.parser = parser
Exemplo n.º 6
0
 def init(cls):
     parser = ThrowingArgumentParser(description="Navigation Pass Mission")
     parser.add_argument('--use-pcodar', dest='pcodar', action='store_true',
                         help='User PCODAR objects instead of clicked point')
     parser.add_argument('-m', '--moves', dest='num_moves', type=int, default=5,
                         help='Number of moves to make, more is more likely to not leave gate')
     cls.parser = parser
Exemplo n.º 7
0
 def init(cls):
     parser = ThrowingArgumentParser(description='Command Line Mission Runner',
                                     usage='Pass any pose editor commands with an arguments. \n\t\
                                            forward 1 (moves forward 1 meter) \n\t\
                                            backward 2ft (moves backward 2 feet)\
                                            \n\t forward 1 backward 2ft\
                                            (moves forward 1 meter then from there moves backward 2 feet), ')
     parser.add_argument('commands', type=str, nargs='*',
                         help='Pose editor commands to run each followed by an argument to pass to the command\
                               (distance or angle usally). \
                               Optionally a unit can be added if a non-standard unit is desired.')
     parser.add_argument('-s', '--speed', type=float, default=0.2,
                         help="How fast to execute the move. (m/s)")
     parser.add_argument('-z', '--zrp', action='store_true',
                         help="Make end goal have zero roll and pitch.")
     parser.add_argument('-b', '--blind', action='store_true',
                         help="Do not check if waypoint is safe.")
     cls.parser = parser
Exemplo n.º 8
0
    def init(cls):
        parser = ThrowingArgumentParser(description='Start Gate Mission',
                                        usage='Default parameters: \'runtask ObstacleAvoid\'')
        parser.add_argument('-p', '--numpasses', type=int, default=3,
                            help='number of passes through the obstacle course to make')
        parser.add_argument('-d', '--outoffset', type=int, default=10,
                            help='distance from the course in meters to traverse to')

        cls.parser = parser
Exemplo n.º 9
0
    def init(cls):
        class Range(object):
            '''
                https://stackoverflow.com/a/12117089
            '''
            def __init__(self, start, end):
                self.start = start
                self.end = end

            def __eq__(self, other):
                return self.start <= other <= self.end

        parser = ThrowingArgumentParser(
            description='Start Gate Mission',
            usage='''Default parameters: \'runtask EntranceGate
                                         --scandist 10 --speed 0.75 --scantime 10 --traversaldist 7\''''
        )
        parser.add_argument(
            '-p',
            '--passscan',
            action='store_true',
            help=
            '''setting results in a scan by traversing the gates (pass scan mode),
                            not setting results in a scan by listening at two points (two points scan mode)'''
        )
        parser.add_argument(
            '-m',
            '--multilateration',
            action='store_true',
            help=
            'setting enables multilateration-based scanning, otherwise uses intersecting lines'
        )
        parser.add_argument(
            '-c',
            '--scandist',
            type=int,
            default=10,
            help='distance from the gates in meters to scan from')
        parser.add_argument(
            '-s',
            '--speed',
            type=float,
            default=0.75,
            choices=[Range(0.0, 1.0)],
            help='speed to move when scanning in pass pass mode')
        parser.add_argument(
            '-k',
            '--nokill',
            action='store_false',
            help='set to not kill thrusters during scan in two points scan mode'
        )
        parser.add_argument(
            '-t',
            '--scantime',
            type=int,
            default=10,
            help=
            'number of seconds to scan at each point for in two points scan mode'
        )
        parser.add_argument(
            '-d',
            '--traversaldist',
            type=int,
            default=7,
            help=
            'distance from each side of the gates to navigate to when crossing'
        )
        cls.parser = parser
Exemplo n.º 10
0
 def init(cls):
     parser = ThrowingArgumentParser(
         description='Command Line Mission Runner',
         usage='Pass any pose editor command with an argument. \n\t\
                forward 1 (moves forward 1 meter) \n\t backward 2ft (moves backward 2 feet)'
     )
     parser.add_argument('commands',
                         type=str,
                         nargs='*',
                         help='Pose editor command to run')
     parser.add_argument(
         '-m',
         '--movetype',
         type=str,
         default='drive',
         help=
         'Move type. See lqrrt documentation for info on how to use this.')
     parser.add_argument(
         '-f',
         '--focus',
         type=str,
         help=
         'Point to focus on. See lqrrt documentation for info on how to use this. \
                               If not specified, default to focusing around clicked point. ex. "[10, 2.3, 1]"'
     )
     parser.add_argument(
         '-p',
         '--plantime',
         type=float,
         help='Time given to the planner for it\'s first plan.')
     parser.add_argument(
         '-b',
         '--blind',
         action='store_true',
         help='Move without looking at the ogrid. DANGEROUS.')
     parser.add_argument(
         '-sf',
         '--speedfactor',
         type=str,
         default="[1, 1, 1]",
         help=
         'Speed to execute the command, don\'t go too much higher than 1 on the real boat. \
                               Use like "[1, 1, .2]" to reduce rotation speed to 20% max or just ".5"\
                               to reduce x, y, and rotational speed to 50% max.'
     )
     cls.parser = parser
Exemplo n.º 11
0
 def init(cls):
     parser = ThrowingArgumentParser(
         description='Command Line Mission Runner',
         usage='Pass any pose editor command with an argument. \n\t\
                forward 1 (moves forward 1 meter) \n\t backward 2ft (moves backward 2 feet)')
     parser.add_argument('commands', type=str, nargs='*',
                         help='Pose editor command to run')
     parser.add_argument('-m', '--movetype', type=str, default='drive',
                         help='Move type. See lqrrt documentation for info on how to use this.')
     parser.add_argument('-f', '--focus', type=str,
                         help='Point to focus on. See lqrrt documentation for info on how to use this. \
                               If not specified, default to focusing around clicked point. ex. "[10, 2.3, 1]"')
     parser.add_argument('-p', '--plantime', type=float,
                         help='Time given to the planner for it\'s first plan.')
     parser.add_argument('-b', '--blind', action='store_true',
                         help='Move without looking at the ogrid. DANGEROUS.')
     parser.add_argument('-sf', '--speedfactor', type=str, default="[1, 1, 1]",
                         help='Speed to execute the command, don\'t go too much higher than 1 on the real boat. \
                               Use like "[1, 1, .2]" to reduce rotation speed to 20% max or just ".5"\
                               to reduce x, y, and rotational speed to 50% max.')
     cls.parser = parser
Exemplo n.º 12
0
    def init(cls):
        parser = ThrowingArgumentParser(
            description='Detect Deliver Find',
            usage='''Default parameters: \'runtask DetectDeliverFind
                                         \'''')
        parser.add_argument('-l',
                            '--longscan',
                            action='store_true',
                            help='set to scan the long side')
        parser.add_argument('-s',
                            '--shortscan',
                            action='store_true',
                            help='set to scan the short side')
        parser.add_argument(
            '-o',
            '--overridescale',
            action='store_true',
            help=
            '''setting causes manual dock size to replace scale, where scale is only
                                    used to determine which side is longer''')
        parser.add_argument(
            '-c',
            '--circle',
            action='store_true',
            help=
            '''setting causes navigator to circle the dock once first in order to help
                                    PCODAR gather enough information to produce scale and an accurate orientation'''
        )
        parser.add_argument('-d',
                            '--scandist',
                            type=int,
                            default=6,
                            help='distance to scan the images from')
        parser.add_argument(
            '-i',
            '--lookin',
            action='store_true',
            help='look into the dock at the end instead of being side ways')
        parser.add_argument('-e',
                            '--enddist',
                            type=int,
                            default=5,
                            help='the distance to go to as the end point')
        cls.parser = parser

        cls.bboxsub = cls.nh.subscribe("/bbox_pub", ObjectsInImage)