Skip to content

Tutorial: Morse Demo

Sean Trott edited this page Jun 13, 2016 · 10 revisions

Sean Trott contact: seantrott@icsi.berkeley.edu


We integrated our NLU system with the Morse Robotics Simulator to create a simulated robot that can be controlled with input language. See this video link for a compilation.

If you haven't already, read the tutorial on the text-based demo to familiarize yourself with the system. Once you've done that, you can move onto the instructions below.


Install MORSE

Step one is installing Morse. Check out the instructions here.

Initialize the Analyzer

If you've done the text-based tutorial, this will already be familiar to you. Follow the exact same instructions here.

Initializing Morse/Blender

If you have Blender and Morse installed, you can run the Morse simulator, which allows you to view the robot’s actions. We've included a bash script, morse.sh, which exports the MORSE_BLENDER variable and then initializes the default Morse "scene", found in this file.

Note that before you run the script, you'll probably need to change the export MORSE_BLENDER line to reflect whichever path on your computer you've installed Blender in. Be sure to point to the executable, found in the “package contents”, not just the Application (as shown in the command below). For example, if {CUSTOM_PATH} represents the path of your "Blender" folder, you would change the command to look like this:

export MORSE_BLENDER={CUSTOM_PATH}/Blender/blender.app/Contents/MacOS/blender

Then, run the bash script with the following command:

sh morse.sh
OR
./morse.sh

This script runs the Morse "scene" with the following command:

morse run src/main/morse/scene.py

You can either run the bash script, or run the commands within it manually. If everything is installed correctly, you should see a graphics simulator with two robots and multiple colored boxes.

Initializing the NLU System

This involves a similar procedure as in the text-based system, with one key difference. Instead of initializing the text-based Robot Problem Solver, it initializes the Morse Problem Solver.

Once the Analyzer is running, you can start the text-based system by running:

./setup_morse.sh

This initializes the following Agents:

  1. Morse Problem Solver: receives n-tuple, solves problem, makes API call to Morse
  2. UI-Agent: receives text, produces n-tuple with help from Analyzer and Specializer (also sets up a proxy connection to the localhost on which the Analyzer runs)
  3. Text-Agent: prompts user for input, sends text to UI-Agent

If all goes well, you should be prompted for input.

Using the System

Using the system is quite similar to using the text-based system. The main difference is that instead of printing out actions to the screen, the Problem Solver makes API calls to Morse, which results in a visualization of those actions.

The Morse Problem Solver subclasses the Robot Problem Solver, meaning it solves problems in the same way, but it also has additional problem solving. Since the Morse Problem Solver entails a simulated environment, it has to plan its routes to objects so that it avoids obstacles. We created a custom class called 2D Obstacle Avoidance Solver, which has the ability to plot routes given a start, a destination, and a list of objects in the world. This obstacle avoidance is not perfect, and there are much better systems out there, but this is relatively simple and doesn't require any extra installation. There will likely be some bugs (e.g. the robot taking a while to move because it's moving to many small points along a path), but it is functional.

As with the text-based system, simply type commands, questions, or assertions into the prompt.