You may like to wirelessly interface with MIRO using the included ROS interface.
Run ROS core on workstation
In a shell, start the ROS core, as follows.
Run USB-ROS bridge on MIRO
MIRO must be running the USB-ROS bridge in order to expose a ROS interface to the network. You can start this manually, after logging in to MIRO, as follows.
MIRO tools [miro_bridge]
Copyright (C) 2019 Consequential Robotics
network: ROS (/miro/rob01)
sync_interval: (do not change)
frame: (do not change)
[000.000] enter threadproc
[000.001] interf opening (FLAGS=0x8)...
[000.002] start thread
[000.012] open() /dev/P2 OK
[000.021] initializing ROS...
[000.054] attempting to contact ROS master...
[000.059] upstream connection validated
[000.194] loading sound from: /home/root/sound
[000.309] finished: total RAM used is 1171 kiB
[000.310] advertising main topics...
[005.324] hooking SIGINT
[005.330] received: PLATFORM_READY
[005.331] sending P2_W_SYNC [n_hi=0]... [MIRO_USB_OK]
[005.334] read model_pars persist file... NOT FOUND!
[005.335] sending SET_MODEL_PARS... [MIRO_USB_OK]
[005.336] sending SET_RTC (16:25:08)... [MIRO_USB_OK]
[005.356] received (in msg_id=57445): ACK_SET_MODEL_PARS
[005.357] received (in msg_id=57445): ACK_SET_RTC
For clarity, all WARNINGs have been stripped from the trace, above—a handful of warnings whilst the bridge starts up and settles are to be expected, and can safely be ignored.
If you want to start the bridge in the background, instead, you can use
instead—make sure it is configured to use
first, and stop it using
Test ROS connectivity
If the bridge has started correctly, you will be able to see the interface exposed by MIRO by running
rostopic on your workstation, as shown below.
$ rostopic list
This shows that the default name for the robot on the network is
If this test has not worked, you should first make sure of the following.
- On board your MIRO, the environment variables
ROS_MASTER_IP are set correctly (to the IP of P3, and of your workstation, respectively) before the bridge starts—see
- On your workstation,
ROS_IP has been set to the workstation's own IP address, as detailed in Install ROS.
Note that if you have chosen a network configuration other than that described here you should take your own steps to ensure that both your robot and your ROS master are configured so that they can find each other.
Exchanging data with your MIRO from your workstation
requires a low-latency network connection—if you are in a busy radio environment, or the wireless network is weak, you will probably have trouble establishing communications.
We provide an example interpreted Python Command-line Client on-board MIRO for you to use as a starting point. It also works to test that the preparations, above, have been performed correctly.
MIRO is going to move! Support it with its wheels off the ground, or ensure that it can move around safely.
$ cd ~/mdk/bin/shared
$ ./miro_ros_client.py robot=rob01
2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
The client's main thread produces tick, tock, periodically. Meanwhile, each time a message arrives from the bridge with updated
platform_sensors data, a message is sent back down, and the robot is driven in a forward-turn-forward-turn pattern, indefinitely.
You can try any one of the client Examples, they will all run against the configuration above. The Python GUI Client, in particular, gives you access to most of the robot interface.