protected static Options parseArguments(String[] args) throws JSAPException, IOException {
    JSAP jsap = new JSAP();

    FlaggedOption rosNameSpace =
        new FlaggedOption("namespace")
            .setLongFlag("namespace")
            .setShortFlag(JSAP.NO_SHORTFLAG)
            .setRequired(false)
            .setStringParser(JSAP.STRING_PARSER);
    rosNameSpace.setDefault(DEFAULT_PREFIX);

    FlaggedOption tfPrefix =
        new FlaggedOption("tfPrefix")
            .setLongFlag("tfPrefix")
            .setShortFlag(JSAP.NO_SHORTFLAG)
            .setRequired(false)
            .setStringParser(JSAP.STRING_PARSER);
    tfPrefix.setDefault(DEFAULT_TF_PREFIX);

    FlaggedOption model =
        new FlaggedOption("robotModel")
            .setLongFlag("model")
            .setShortFlag('m')
            .setRequired(false)
            .setStringParser(JSAP.STRING_PARSER);
    model.setDefault(DEFAULT_STRING);

    FlaggedOption location =
        new FlaggedOption("startingLocation")
            .setLongFlag("location")
            .setShortFlag('s')
            .setRequired(false)
            .setStringParser(JSAP.STRING_PARSER);
    location.setDefault(DEFAULT_STRING);

    Switch visualizeSCSSwitch =
        new Switch("disable-visualize").setShortFlag('d').setLongFlag("disable-visualize");
    visualizeSCSSwitch.setHelp("Disable rendering/visualization of Simulation Construction Set");

    Switch requestAutomaticDiagnostic =
        new Switch("requestAutomaticDiagnostic")
            .setLongFlag("requestAutomaticDiagnostic")
            .setShortFlag(JSAP.NO_SHORTFLAG);
    requestAutomaticDiagnostic.setHelp("enable automatic diagnostic routine");

    jsap.registerParameter(model);
    jsap.registerParameter(location);
    jsap.registerParameter(rosNameSpace);
    jsap.registerParameter(tfPrefix);
    jsap.registerParameter(requestAutomaticDiagnostic);
    jsap.registerParameter(visualizeSCSSwitch);
    JSAPResult config = jsap.parse(args);

    Options options = new Options();
    options.robotModel = config.getString(model.getID());
    options.disableViz = config.getBoolean(visualizeSCSSwitch.getID());
    options.startingLocation = config.getString(location.getID());
    options.tfPrefix = config.getString(tfPrefix.getID());
    options.nameSpace = config.getString(rosNameSpace.getID());
    options.runAutomaticDiagnosticRoutine = config.getBoolean(requestAutomaticDiagnostic.getID());
    return options;
  }