Page tree
Skip to end of metadata
Go to start of metadata

Problem Statement

This example explains a solution to the following problem:

  • We have a Microstrain/Lord 3DM-GX4-45 navigation sensor.  
  • We would like to use the sensor for feedback control of a mobile vehicle.  
  • The architecture of the system is fairly constrained. The high-level control should be done in MATLAB/Simulink running on a Windows computer.

Solution Sketch

We would like to leverage the existing ROS drivers for this device:, but running ROS on Windows is challenging.  Below is a sketch of how we might do this...

We would add a small Linux PC (e.g., Rasberry Pi or Odroid) with ROS.  The driver publishes the sensor information on a ROS topic over Ethernet.  MATLAB/Simulink running on the Windows computer then subscribes to those messages.

Increment 1: Testing the Driver and Logging Data

The first step is to make sure that our driver will indeed work with the sensor.  We have tested this driver by connecting the device to a Linux machine with ROS installed.  It required some slight changes to the driver software - so we may need to fork the driver to do some modification.

We logged a short bag file as an example of what topics are published by the driver.  That log file is in the git repository:

Increment 2: Testing Windows Connection with Logged Data

On a Linux computer we can playback the logfile.  Here is a script to setup a continual loop of data published on one machine:

Now on a separate Windows computer, connected to the same network as the Linux 
PC, we can receive all of the sensor data.  Here is a simple proof-of-concept script to illustrate that process: 

The resulting rqt_graph looks like this...

Increment 3: Testing Simulink Connections

Using this proof-of-concept, Kelvin is working on making the same connection using Simulink.

Increment 4: Testing Simulink and Sensor

Once that is working we will fork the microstrain driver so that we can modify the driver slightly.  Then we can test the same connections with the ROS driver talking to Simulink

Increment 5: Porting to Embedded

Once that is all working we can move the system to embedded computers: an Odroid for the Linux/ROS bits and a PC104 for the Windows/MATLAB bits.


  • No labels