Welcome

Welcome to the Mr.I application instruction manual. At this time, the Mr.I application has been developed for use by the University of Nevada, Reno Robotics Research students and faculty. This instructions page has been written specifically for those individual. Because of its general purpose, Mr.I has been designed using aspect-oriented architecture, providing vase modularity to its function. The use of the word ‘entity’ is used frequently in this document and is synonymous to an application module.

The basic uses for Mr.I can be summed up into a few functionalities. First and foremost, the main purpose of the application is to allow users to assign a robot specific behavior. However, there are steps that must be taken in order for this to happen. First, a user must load robots into the interface. This is done by supplying the interface with a yaml, and two python files. This is fully explained in the section labeled ‘Loading Entities’. Once loaded, a robot must then be declared as active in order for the GUI to track its location on the interface. Finally, once a robot is visible in the interface, it can be assigned a task from the overlay.

Another purpose of the interface is to display sensor readings relative to each robot. This functionality will be optional, but must be included in the python files provided by the user. The reason we mention this in the instruction manual is because Mr.I has provided a GUI API to the users for creating primitive graphic images to represent sensor readings. The API has been created using OpenGL. See ‘Creating Entities’ for a full explanation.

Finally, another characteristic of Mr.I is that which allows users to customize the overlay appearance and functionality. This will also be included in a robot’s entity code.

Launching Mr.I

First off, change directory to where the mri.py file is contained. The application can then be run from the command line using the argument:

$ python mri.py

Command line options are option are as follows:

-c/--config runOption.yaml; If the config option is used, a yaml file needs to also be specified (runOption.yaml in this case).

--map map.jpg; If the map option is included, an image file needs to be specified

-v/--verbose; Runs the application in Verbose mode, displaying debug information on the terminal.

--project projectPath; Include this argument when the entities are loaded into a path other than the one specified by default.

An example of contents from a cofiguration file are as follows:

Creating Entities

An entity consists of 3 to 4 different files. There will be at least 2 python files and 1 yaml file. Of the python files, 1 will be named __init__.py, the others will contain the functionality of the entity and an optional python file will be called WidgetInit.py and is only necessary for graphics entities.

The following complete yet simple example is of a button entity.

The Yaml file simply outlines the name of an entity, its variable names and its aspects. The following shows the contents of the file button.yaml:

The __init__.py file essentially tells the application which modules it will need to import in order for an entity to have full funcitonality. Notice 'import ButtonRender' in this example:

The buttonRender.py file defines the ButtonRender class. This was imported in the __init__.py.

Loading entities

At this time, the entity files must be placed into the subfolder. If another location besides that which is specified as the default is desired, a command line argument must be included specifying the new location. The application then will read all entities from the corresponding folder and they will be available for the applicaiton to access.

Using the GUI

The GUI displays an area map as its main image. The user options can be brought up on the overlay using the corresponding hot key (see 'hot keys'). On the overlay, there are 4 options that will always be available to users. Those options include: 'Available Robots', 'Mapped Robots', 'Help', and 'Quit'.

Available Robots: When selected, this option will bring up a window showing all robots which have not been added to the area map, but are available to be included. Select a robot name on this window and that robot image will appear on the GUI in its current location.

Mapped Robots: When Selected this option will open a window with a list of robots which are currently active on the map. If the user selects a robot in this list, another window will open listing the specific behaviors of that robot (as defined by the entity's aspects).

Help: Selecting help will open this page in a web browser.

Quit: Selecting quit will open a window which confirms the the user does in fact want to close the appliation.

Hot Keys

Tab: Pressing this key will open and close the overlay.

Z: Locks and unlocks the zoom.

Right-Click while moving the mouse upwards zooms in on the map.

Left-Click while moving the mouse downward zooms out on the map.

Moving the mouse either left, right, up, or down within the map will cause the map image to shift in the corresponding direction. This will only occur if the map is zoom in enough such that all the viewing area connot be seen in the screen resolution.

Activating robots

If robots are loaded into the application without being seen on the area map those robots are not active. The way robots are activated is by openning the overlay, selecting 'Available Robots' and clicking on the robot in the list which the user wants to see on the map.

Assigning behaviors

There are a couple of different ways to assign a behavior or task to a robot.

1) When view the area map, right-clicking on a robot will bring up the list of its corresponding behaviors. If more than one robot is selected, right clicking will bring up all of the behaviors for each robot. Just select 'OK' next to the behavior or task the robot should execute and it will be assigned.

2) Bring up the overlay. In the lower toolbar, select 'Mapped Robots'. On the window, click on the robot you would like to see behaviors for. From there, click okay next to the behavior or task the robot should execute and it will be assigned.