Overview

Configuration files are stored at ~/.miro2/config. Only two (really, only one) of these files will need to be accessed by most users, and these are described on this page. The remainder can safely be ignored unless you have been asked to access them by a support engineer.

Changing these configuration files to an invalid state may render your robot inaccessible necessitating removal of the SD card from the robot for repair—please tread carefully if you are not confident, and please backup your configuration files before changing them.
Many of the values in these files are written by MiRoapp—any changes you make may therefore be overwritten from MiRoapp.
Provided you are not having problems with your robot, you are unlikely to need to edit these files, but a support engineer may ask you to do so in some circumstances.
Advanced users may wish to make use of a small set of settings that are not accessible through MiRoapp, as detailed below.
These configuration files occasionally have additions made, with new releases of the robot software. Your files, therefore, may look slightly different to the ones shown here. The latest default files are always in the latest MDK at mdk/share/config.
Changes you make may not take effect until the robot is rebooted.

Edit file

You can edit these files any way you choose, but be sure to make a backup before you do so in case you make a mistake and need to revert. You can always find the default versions of these files in the MDK downloaded from the software download page, under mdk/share/config.

We would usually log in, then use nano to edit one of the files. vi is also available on-board, if you are that kind of mad. Alternatively, you can transfer the files off-board, edit them, and then transfer them back—see File Transfer.

user_setup.bash

This is the configuration file for the MDK.

################ ROBOT & OFF-BOARD ################ # The settings in this section are used both on-board and off-board; # see the separate documentation pages listed above, but their behaviour # is much the same in both cases. # MIRO_NETWORK_MODE # # Select one of the available network modes, "dynamic", "static", or # "loopback". The robot's network address is set either from the # network address dynamically assigned to the network adapter (e.g. # by DHCP), from MIRO_STATIC_IP, or to the loopback address. export MIRO_NETWORK_MODE=dynamic # MIRO_STATIC_IP # # Static network address for this robot. If MIRO_NETWORK_MODE is set # to "static", MIRO_STATIC_IP is used as the robot's network address; # otherwise, this setting is not used. export MIRO_STATIC_IP= # ROS_MASTER_IP # # This value locates the ROS master on the network. In addition, if it is # set to "" (empty), a ROS master is started automatically at boot time. export ROS_MASTER_IP= # MIRO_ROBOT_NAME # # This setting is used as the base name for ROS topics (e.g. "/miro/..."). export MIRO_ROBOT_NAME=${MIRO_ROBOT_NAME-miro} # MIRO_ROS_RELEASE # # This setting indicates which ROS release to use in case more than # one version is installed on the system. export MIRO_ROS_RELEASE=${MIRO_ROS_RELEASE-noetic} ################ ROBOT ONLY ################ # The settings in this section are used only on-board, and are not # relevant to an off-board (workstation) installation of the MDK. # MIRO_BRIDGE_FLAGS # # This setting is the flag set passed to the bridge when it is started # by the multitool. See "miro_bridge help" for details of flags. export MIRO_BRIDGE_FLAGS=l! # MIRO_SPEAK_IP # # This setting, if equal to "1", causes the network address to be read # out at boot time. export MIRO_SPEAK_IP=1 # MIRO_SYSTEM_UPDATE_SCHEDULE # # This setting can be "never" (default if blank or missing), "weekly", # "hourly", or "always". msm update_system will update the operating # system on that basis, actioned in on_system_ready. export MIRO_SYSTEM_UPDATE_SCHEDULE= # MIRO_DYNAMIC_IP_WAIT # # Dynamic address recovery period in seconds. If MIRO_NETWORK_MODE is # set to "dynamic", the robot's network address is recovered from the # network adapter after it has connected. If the adapter has still not # connected after MIRO_DYNAMIC_IP_WAIT seconds, the loopback address is # used instead, allowing on-board software to run if the network is # not available. # # NB: A value of "inf" will wait indefinitely for the connection. export MIRO_DYNAMIC_IP_WAIT=60 # MIRO_DYNAMIC_IP_MATCH # # Dynamic address recovery will continue until an address matching # this regular expression is found. This prevents accidentally # picking up a temporarily-assigned IP address. If this is not # necessary, use the default given below which matches any # valid IP address. # # (default) MIRO_DYNAMIC_IP_MATCH=^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ export MIRO_DYNAMIC_IP_MATCH='^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' # MIRO_WEB_PASSPHRASE # # Requests sent to MIRO's web servers will be decrypted using this # passphrase, so it must be used also at the encoding end. # # NB: If empty, the value 'miro web passphrase' is assumed. export MIRO_WEB_PASSPHRASE= ################ FUNCTIONS ################ # miro_get_dynamic_address # # If the user has configured the network to their own preference and # the automatic address recovery function provided is not working, the # user can override the provided function here by uncommenting below # and authoring their own version that works with their network. #miro_get_dynamic_address() #{ # # this function just has to return this value # MIRO_DYNAMIC_IP= # # # for example, to recover address of named adapter "wlan0" in # # an off-board installation, use these lines: # ADAPTER_NAME=wlan0 # MIRO_DYNAMIC_IP=`/sbin/ifconfig | grep -A 2 | grep inet | grep -v inet6 | grep -v 127.0.0.1 | head -n 1 | sed 's/[^0-9]*//' | sed 's/\ .*//'` #}

Advanced users

Advanced users may make use of the following settings.

MIRO_BRIDGE_FLAGS
See bridge flags.
MIRO_DYNAMIC_IP_MATCH
See Advanced network settings.
miro_get_dynamic_address
In case your networking configuration is out of the ordinary and the default version of miro_get_dynamic_address (in mdk/setup.bash) cannot correctly determine the local network address of the robot, you can author your own function, in this file, and based on the given template, to do so.

platform_parameters

This is the configuration file for the robot (aka the "platform").

################################################################ # # this file contains the platform parameters. these affect the # behaviour of the platform at all four levels (P1, P2, bridge # and demo). # # the values in this file may be updated by the user or by the # system. you may change values safely, but they may also be # changed (at your request) automatically. # # for details of individual parameters, see the documentation # page at Platform Parameters. # platform option flags option_flags= # camera frame= jpeg= # servo calibration lift_adj= yaw_adj= pitch_adj= droop_adj= wag_adj= eye0_adj= eye1_adj= ear0_adj= ear1_adj= # servo sensor maps sensor_map_lift= sensor_map_yaw= sensor_map_pitch= # wheel speed calibration wheel0_adj= wheel1_adj= # cliff sensor calibration cliff_adj_l= cliff_adj_r= # cliff perception threshold cliff_thresh= cliff_margin= # cliff sensor memory cliff_mem= # touch sensor masks touch_body_mask= touch_head_mask= # touch sensor sensitivities touch_body_sensitivity= touch_head_sensitivity= # demo flags demo_flags=

Advanced users

Advanced users may make use of the following settings.

frame
Set this to any value such that the line forms a valid command for the ROS topic control/command, and the camera frame size and rate will be initialised as specified at boot time. The default value is empty, which is interpreted as 360w@15, giving the default camera configuration of 640x360 at 15fps.
jpeg
Set this to any value such that the line forms a valid command for the ROS topic control/command, and the camera compression level will be initialised as specified at boot time. The default value is empty, which is interpreted as 75, giving the default camera compression level of 75%.