Overview
On this page, we'll have a look around on-board MiRo, after logging in, and see what's there that you might want to work with.
Therefore, all the work on this page requires you to first log in. We will then use the terminal prompt to issue commands.
Everything on this page has an analogue when using the MDK on a
workstation, but the results may be a bit different.
Operating system
You are logged in to a Raspbian Linux operating system.
miro@miropi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Terminal environment
You can list MiRo-specific environment variables and some information about the robot using the command miro_info
which is provided by the MDK.
miro@miropi:~ $ miro_info
[ MIRO ]
MIRO_BRIDGE_FLAGS=l!
MIRO_DIR_BIN=~/mdk/bin/arm32
MIRO_DIR_CONFIG=~/.miro2/config
MIRO_DIR_DUMP=/tmp/miro2/dump
MIRO_DIR_LOG=/tmp/miro2/log
MIRO_DIR_MDK=~/mdk
MIRO_DIR_ONBOARD=~/mdk/bin/onboard
MIRO_DIR_PID=/tmp/miro2/pid
MIRO_DIR_SHARE=~/mdk/share
MIRO_DIR_STATE=/run/user/1001/miro2/state
MIRO_DIR_TMP=/tmp/miro2
MIRO_DIR_TRASH=~/.miro2/trash
MIRO_DIR_USER=~/.miro2
MIRO_DYNAMIC_IP_MATCH=^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$
MIRO_DYNAMIC_IP_WAIT=60
MIRO_EDITION=2
MIRO_MDK_RELEASE=R210921
MIRO_MULTITOOL=~/mdk/bin/onboard/multitool.sh
MIRO_NETWORK_MODE=dynamic
MIRO_ON_ROBOT=1
MIRO_ROBOT_NAME=miro
MIRO_ROS_RELEASE=kinetic
MIRO_SPEAK_IP=
MIRO_STATIC_IP=
MIRO_SYSTEM=arm32
MIRO_SYSTEM_UPDATE_SCHEDULE=never
MIRO_TOKEN=miro2
MIRO_USER_SETUP=~/.miro2/config/user_setup.bash
MIRO_WEB_PASSPHRASE=
[ ROS ]
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ROS_MASTER_IP=localhost
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROS_IP=192.168.1.157
ROS_PACKAGE_PATH=~/mdk/catkin_ws/install/share:/opt/ros/kinetic/share
ROSLISP_PACKAGE_DIRECTORIES=
MIRO_ROS_RELEASE=kinetic
ROS_DISTRO=kinetic
PYTHONPATH=~/mdk/share/python:~/mdk/catkin_ws/install/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages
[ ROBOT ]
Clock: Thu 28 Oct 11:49:57 BST 2021
Software release: R210921
Battery voltage: 5.40V
Bridge: running
IP address: 192.168.1.157
On a
workstation, this command will give similar results, but the section
[ ROBOT ]
will be empty.
MDK
The MiRo Developer Kit (MDK) is on-board the robot at ~/mdk
. If you are a Developer, you will find that the on-board MDK has many similarities to the off-board variant, but with some additions and deletions.
miro@miropi:~/mdk $ cat README
This is the MDK ("MIRO Developer Kit") for MIRO-E.
The MDK provides all the tools & resources required by a user
for working with their robot (or with the robot simulator).
ROS clients
Controllers for the robot take the form of 'ROS clients'. Several example clients are provided, and can be found under ~/mdk/bin/shared
. Here we run one of the simplest examples, on-board.
miro@miropi:~/mdk/bin/shared $ python ./client_read_battery.py
('subscribe', '/miro/sensors/battery')
wait for connect...
5.33278369904
5.33278369904
5.342856884
5.34688615799
5.344871521
...
Since the release of the
2020 edition, the MDK has moved to use Python 3 by default, whilst the robot still uses Python 2. As a result, running example clients on-board now requires the explicit call to
python
(Python 2), as shown above.
You can find information on all of the examples in this directory on the
Examples page.
Configuration files
Whether working on-board or off-board, MDK configuration files are stored in the same place. We can list them as follows.
miro@miropi:~ $ cd ~/.miro2/config/
miro@miropi:~/.miro2/config $ ls -1
demo_parameters.py
platform_parameters
serial_number
simulation_parameters
update_config.190801a
update_platform.R190518
update_platform.R191016
update_platform.R200720
update_platform.R210210
user_setup.bash
See Configuration Files for more details.