leonard-lab / dcsl-matlab-api

2 stars 1 forks source link

Change from using web-matlab-bridge to Mathworks ROS I/O package #7

Open BrendanAndrade opened 10 years ago

BrendanAndrade commented 10 years ago

Consider feasibility and benefits of switch to new Mathworks ROS I/O package for MATLAB to ROS communications.

http://www.mathworks.com/hardware-support/robot-operating-system.html

ROS I/O package extends rosjava build for use in MATLAB.

Suggested course of action is to keep the dcsl-matlab-api as is but to change underlying communication method to new I/O package.

Required steps:

  1. Test ROS I/O with ROS Groovy for compatibility and speed.
  2. Assign developer to change and test dcsl-matlab-api
BrendanAndrade commented 10 years ago

Installation was a bit of a pain. I have documented the required steps and am writing them up now. The most annoying issue was that the classpath set and add functions provided in the package won't work out of the box in Ubuntu due to file permissions on classpath.txt.

I did a simple speed test where I wrote a subscriber callback that received an Int message, added 1 to the data and republished it. I had this subscriber receive and publish 1000 messages in a row which took 1.662 seconds or a rate of about 1000 Hz. This is much better than the web-matlab-bridge could do.

Remaining concern is how hard will it be to add custom message types.

illscott commented 10 years ago

Were you able to have it communicate with a roscore that was started outside of matlab?

I installed it in H120 but was unable to use a matlab node to subscribe to messages published by the vision tracker system. It might be an issue with environment variables in matlab, but I'm not sure. Rostopic lists the matlab node as a subscriber, but for some reason the nodes aren't "connected" to each other.

BrendanAndrade commented 10 years ago

The roscore was outside MATLAB and I was able to echo the messages in a terminal using rostopic echo.

You can email me your MATLAB subscriber code and I can take a quick look if you wish.