Configure MDK

The default configuration performed by the MDK install script can be modified, if required. Instructions for doing so are on this page.

In most cases, no configuration changes will be required at all—read Install MDK carefully, and determine if you need to make changes before continuing with the instructions on this page.
Where a change is required, almost always it will only be to ensure that the network address is determined correctly—we recommend you change nothing else, at least until you have confirmed correct operation and familiarised yourself with the MDK.

Configuration files

Some of the settings below are stored in ~/.miro2/config/user_setup.bash. This file is also used on-board the robot, and contains various settings relevant only to that environment—you can safely ignore comments and settings that are not described on this page.

Add symbolic link

During install, a link is placed at ~/mdk pointing to the MDK directory (in our example installation, to ~/mdk-190211). You may safely delete—or move—this link if you prefer.

If you do so, you must ensure that the correct path to the MDK is used whenever ~/mdk is used. You should check the remaining items on this page, and also replace ~/mdk wherever it is used in the documentation with the correct path to your MDK installation.

It is strongly recommended that you use the MDK through a symbolic link; this will avoid version control problems if you update your MDK at a later date.
It is recommended that you leave the link at ~/mdk—at least to begin with—since you can then copy-and-paste code directly from the documentation into your terminal.

Initialise automatically

A command is placed at the bottom of your ~/.bashrc to initialise the MDK (by sourcing setup.bash).

# MDK source ~/mdk/setup.bash

Some users will prefer to remove this automatic initialisation command from their ~/.bashrc. In that case, source setup.bash manually in your terminal before each use of the MDK.

If you have deleted or moved the link at ~/mdk, as described in the previous step, you must update the command in ~/.bashrc accordingly.

Configure network automatically

The value listed beside "Local network address" when setup.bash runs should be the network address of your local machine. A correct local network address is required if the MDK is to be able to communicate with the robot or with the simulator.

If the indicated network address is not correct, or if you wish to change how that address is determined, this section describes the procedure.

Option 1 - fix automatic recovery

By default the variable MIRO_LOCAL_IP is recovered by the function miro_resolve_network_address() in ~/mdk/setup.bash. This may fail if your machine is configured differently from our test machines. You can provide your own miro_resolve_network_address() function by uncommenting the template in ~/.miro2/config/user_setup.bash and modifying it to correctly determine the local machine address using standard command-line tools.

Option 2 - set explicitly

Set the environment variable MIRO_LOCAL_IP before you source ~/mdk/setup.bash. This excludes the possibility of automatic recovery of a dynamically-changing IP address.

Option 3 - go into more detail

For more detail on the available options, see Configure Network.

The most common reason for failure to determine the correct network address is if your system has more than one IPv4 network listed by ifconfig—to handle this situation, use the template miro_resolve_network_address() function in ~/.miro2/config/user_setup.bash and specify ADAPTER_NAME explicitly.