February 8, 2015 | Technical

Using Thalmic Myo with ROS Indigo + Ubuntu Virtualbox

I will be doing some work with some robotics applications in the near future. In order for me to prepare for it was important that I become familiar with ROS or Robotics Operating System. It’s an extensible framework to develop for robotic things. ROS is used by robotics researchers and prototypers across the world, with its strength lying in the large network that use it.

The operating system on my laptop is Mac OS X. ROS is commonly run on Ubuntu and therefore as a result this setup has the greatest amount of resources available for it.  In order to get ROS up and running I began by installing Virtualbox and downloading a Ubuntu virtual machine with ROS Indigo Igloo pre-installed. In order to run  the VM, once Virtualbox is launched go to File > Import Appliance and set the location of the Ubuntu VM. Once the import is complete you can launch the Ubuntu VM from Virtualbox. The beginner level tutorials (1.1) for ROS were pretty helpful in learning the basic concepts.

The first application that I wanted to focus on was using the Thalmic Myo to control the ROS Turtle Simulation. After some digging I was able to find excellent example code (myo_ros) that already implemented this. With some specific setup details I was able to successfully run the sample programs.

Officially Myo development is supported for Mac, Windows, iOS and Android. However the data from the Myo USB dongle can also be accessed in Linux. In order to allow for the host USB  to be accessible by the guest virtual machine it must be set as a USB device filter on Virtualbox for that guest as seen here.

In the guest virtual machine you will need to ensure that the Myo dongle is selected for the attached USB devices as seen here.

This will allow for the data from the Myo to be accessible in the Ubuntu virtual machine to interact with ROS simulations like the Turtle or potentially even robots with ROS controls.

Now download or clone the myo_ros repository from Github in your Ubuntu VM. What you just downloaded is a ROS package called “myo_ros”. In order for you to be able execute this piece of  code, ensure that you place the package in your ROS workspace. As I did do all the basic ROS tutorials, my workspace is located in ~/catkin_ws/ directory. This package will be therefore placed in ~/catkin_ws/src/. Next we need to build the newly added package:

$ cd ~/catkin_ws/ 
$ catkin_make

Details regrading running the appropriate ROS nodes are located here. However when running any code from the myo_ros package ensure that following  is done beforehand in the new terminal, otherwise things will not function as intended.

$ cd ~/catkin_ws/ 
$ source devel/setup.bash

Here is a video of me driving the ROS Turtle Simulation using the Myo!

share

return to top