#!/usr/bin/env python
#
# License: BSD
#   https://raw.github.com/robotics-in-concert/rocon_qt_gui/license/LICENSE
#
##############################################################################
# Imports
##############################################################################

import os
import sys
from rqt_gui.main import Main
import rocon_console.console as console

##############################################################################
# Methods
##############################################################################


def print_usage(name):
    s = ("\n    " + console.green + name + console.reset + " launches a standalone rqt plugin that allows you to\n"
         "    capture and slam with a concert robot. You would normally initiate this\n"
         "    application from the qt rocon remocon connected to a concert running\n"
         "    the " + console.bold + "concert teleop service.\n" + console.reset
         )
    print("%s" % s)

##############################################################################
# Main
##############################################################################

if __name__ == '__main__':
    if len(sys.argv) == 2 and (sys.argv[1] == '-h' or sys.argv[1] == '--help'):
        print_usage(os.path.basename(sys.argv[0]))
        sys.exit(0)
    main = Main()
    sys.exit(main.main(sys.argv, standalone='concert_qt_make_a_map'))
