Overview

This page will take you through installing the MIRO Developer Kit (MDK), along the way installing ROS (and Gazebo, if required).

Once you have installed everything you need, do not forget to go to the bottom of the page for configuration instructions.

The supported software stack for MIRO is Ubuntu Xenial / ROS Kinetic / Gazebo 7; however, other configurations may also be possible. We provide some guidance on this, below, but do not explicitly support these other configurations.

Install ROS

The Robot Operating System (ROS) is a communications layer (amongst other things) that is popular in robotics R&D. MIRO exposes its interface as a ROS node, so you will need to install ROS on your workstation in order to communicate with the robot.

There are many web resources that will help you to install ROS (you might want to look at this, for example). This page is a quick install recipe for Ubuntu Xenial (16.04 LTS) and similar Linux distributions with ROS "kinetic". The procedure will probably be similar for other systems and versions, but watch out for minor changes that might be needed to paths or tokens (such as the token "kinetic"!).

Installation on Ubuntu 16.04 LTS

Follow the instructions at ros.org to install ROS kinetic on your workstation.

Or, roughly, enter the commands below. Note we've chosen the options ros-kinetic-desktop and ros-kinetic-image-transport-plugins; you can instead use base for the former, but you need the latter, regardless.

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' $ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116 $ sudo apt-get update $ sudo apt-get install ros-kinetic-desktop ros-kinetic-image-transport-plugins

Other systems

We only directly support Ubuntu 16.04 LTS; the commands above are for this Linux distribution and version.

However, related Linux flavours ought to work fine, with a little tweak here and there—for example, if installing to Linux Mint 18, change the token $(lsb_release -sc) to the simpler token xenial, to give the following list of commands (i.e. install as if for Ubuntu Xenial).

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' $ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116 $ sudo apt-get update $ sudo apt-get install ros-kinetic-desktop ros-kinetic-image-transport-plugins
Installation on Ubuntu 18.04 LTS should be the same as that for 16.04 LTS.
For Linux Mint 19, the required token is bionic (i.e. install as if for Ubuntu Bionic).

Test

You should now be able to run the ROS core as follows.

$ roscore ... Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://192.168.1.100:41666/ ros_comm version 1.12.2 SUMMARY ======== PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.2 NODES auto-starting new master process[master]: started with pid [21504] ROS_MASTER_URI=http://192.168.1.100:11311/ setting /run_id to a617fb4a-85d4-11e6-885b-74d02bce982a process[rosout-1]: started with pid [21517] started core service [/rosout]

Leave it running

You should leave the ROS master running on your workstation, because we'll be using it when we Commission MIRO.

Install MDK

On your workstation, unzip the MDK (MIRO Developer Kit) to a directory of your choice. This directory will be denoted ~/mdk throughout the documentation.

It is strongly recommended that you keep the original name of the MDK directory, putting it somewhere such as ~/lib/mdk-170616-lite, and then make a symlink to this directory from ~/mdk; this will avoid version control problems if you update your MDK at a later date, and make it possible to copy-and-paste code direct from the documentation into your terminal.

Test

You should now be able to run any of the tools in the MDK by changing into the bin folder for your machine's system. For example, here we test the miro_maint tool on a 64-bit Debian system.

$ cd ~/mdk/bin/deb64 $ ./miro_maint ________________________________________________________________ MIRO tools [miro_maint] Copyright (C) 2017 Consequential Robotics ________________________________________________________________ ...

Install Gazebo

On your workstation, install the robot simulator Gazebo only if you plan to work with a simulated MIRO robot. If you plan to work with physical MIRO, you do not need the simulator.

There are many web resources that will help you to install Gazebo. This page is a quick install recipe for Linux Ubuntu 16.04 (Xenial) using ROS "kinetic" and Gazebo 7. The procedure will probably be similar for other systems and versions, but watch out for minor changes that might be needed to path names.

Installation on Ubuntu 16.04 LTS

To install Gazebo, enter the commands below. Do not install gazebo7 package, because this is not updated regularly. Instead, install ros-kinetic-gazebo-dev which provides the version that marries up with your ROS installation (at time of writing, Gazebo 7.14.0).

$ sudo apt-get install ros-kinetic-gazebo-dev

Test

You should now be able to invoke the simulator as follows.

$ gazebo ...
If the Gazebo window appears and then disappears immediately, you may have a problem with your graphics driver. You may find more information at the bottom of dmesg.
See also the FAQ entry Why does Gazebo halt with errors like OgreRenderSystem?

Install Support

In addition, you may need to add a couple of extra support items, depending on how your workstation is already configured. We list these here—it should be obvious if you need them.

# system packages sudo apt install pip # pip packages pip install opencv-python

Configure your workstation to use MIRO

Give your workstation a fixed IP

If you are using a physical robot or robots, and you plan to run the ROS core on your workstation, they must be able to find it. For that, they will need its IP address. To this end, you should now equip your workstation with a fixed IP address. We will use 192.168.1.100 as a stand-in, below, you should change this to whatever you have used.

If you are only working with the simulator, you do not need to do this, but you must then arrange for ROS_IP to be set automatically, in the configuration snippets below.

Configure your environment

Add the following lines to the file ~/.profile or ~/.bashrc, as preferred, on your workstation (we use ~/.bashrc). You can usually just add them at the end of the file.

This configuration is for MDK R190122 and later; see below for R180509 and earlier.
"~/.bashrc"
# local configuration export ROS_IP=192.168.1.100 # use your own IP! export ROS_MASTER_URI=http://localhost:11311 # setup MDK source ~/mdk/setup.bash

Log out and back in (~/.profile) or just restart bash (~/.bashrc) to cause the above to take effect.

If you did not install (or link) your MDK at ~/mdk, use the appropriate path, above.

Configure your environment (R180509 and earlier)

On earlier MDK editions, the configuration instructions are as follows (though, we recommend you upgrade).

"~/.bashrc"
# local configuration export MIRO_PATH_MDK=~/mdk export ROS_IP=192.168.1.100 # use your own IP! export ROS_MASTER_URI=http://localhost:11311 # usual ROS setup source /opt/ros/kinetic/setup.bash # make our custom messages available to ROS/python export ROS_PACKAGE_PATH=$MIRO_PATH_MDK/share:$ROS_PACKAGE_PATH export PYTHONPATH=$MIRO_PATH_MDK/share:$PYTHONPATH # usual Gazebo setup source /usr/share/gazebo/setup.sh # announce MIRO resources to Gazebo export GAZEBO_RESOURCE_PATH=$MIRO_PATH_MDK/share:${GAZEBO_RESOURCE_PATH}