def process_args()

in scripts/add_map_plugin.py [0:0]


def process_args(args, default_args):
    '''
    Processes arguments for map plugin tool.
    '''

    # default arguments
    if hasattr(args, 'world_name'):
        world_name = args.world_name
        config_file = default_args[world_name][0]
        try:
            world_file = "simulation_ws/src/deps/{0}/worlds/{1}.world".format(default_args[world_name][1], world_name) if world_name!="worldforge" \
                else os.path.join(default_args[world_name][1], os.environ['WORLD_ID'], os.environ['WORLD_ID']+".world")
        except KeyError:
            raise KeyError("Please set WORLD_ID to your worldforge world as per the README instructions")
        output_file = "simulation_ws/src/cloudwatch_simulation/worlds/map_plugin.world"

    #custom config file, world file, output file
    else:
        config_file, world_file, output_file = args.config_file, args.world_file, args.output_file
    
    p_args = [os.path.abspath(x) for x in [config_file, world_file, output_file]]
    
    return p_args