MATLAB Answers

How do I install ROS IO package on matlab for mac?

2 views (last 30 days)
Anna
Anna on 21 Dec 2014
Edited: Christoph GR on 11 Feb 2015
Hello,
I've been using matlab and now I want to try using ROS IO package on matlab R2013a for mac but when I try to install the package I always get the same error messsage. The installation instructions are for a windows computer and even though I try to select the right installation path it says that the path doesn't exist or is not valid and it is not possible to write the path manually.
Does anyone know how should I access the folowing path on the installation dialog on a mac?
/Aplications/MATLAB_R2013/toolbox/matlab/general/Contents.m

Answers (2)

Adnan Munawar
Adnan Munawar on 16 Jan 2015
The best way to install it on Mac or (Unix) is by using a terminal. 1. Open your terminal in mac. 2. go to the folder where you unzipped the install file. (By cd /<place where you extracted>) 3. Just to make sure, type: sudo chmod +x ROSIOPackage-R2014a_v0.1.6.2_mac64-Install
Noting that the name of the file will very based on the version and OS.
4. Now just do : sudo ./ROSIOPackage-R2014a_v0.1.6.2_glnxa64-Install Again, the name of the file being the one you extracted. Just do TAB to autocomplete
Possible issues: If you get the possible issue of not finding the right directory, or not being able to change it from the mac installation window, then run the following command:
Make a temporary directory in the same folder: 1. mkdir tmpMat 2. sudo ./ROSIOPackage<the remaining file name> --mode console --temp ./tmpMat --prefix matlab install dir
For instance, on my unix, I can run the command
sudo ./ROSIOPackage-R2014a_v0.1.6.2_glnxa64-Install --mode console --temp ./tmpMat --prefix /usr/local/MATLAB/R2014b/
Then just follow the instructions in the terminal. Basically enter 'y' once and enter again and maybe once more and you are done.
To know your install dir, just open your matlab program, and type matlab root on the console, the outcome is your matlab install dir.
Hope that helps.

Christoph GR
Christoph GR on 11 Feb 2015
Edited: Christoph GR on 11 Feb 2015
I had the very same problem and the answer by Adnan Munawar is absolutely helpful! However, I needed to do some additional steps on my Mac to update the path. This is a summary including the steps from Adnan:
  • In a console, go to the folder of the install file. Type the following commands, but if you are not using R2014a mac64, make sure to exchange the file names in the commands:
sudo chmod +x ROSIOPackage-R2014a_v0.1.6.2_mac64-Install
mkdir tmpMat
sudo ./ROSIOPackage-R2014a_v0.1.6.2_mac64-Install \
--mode console --temp ./tmpMat \
--prefix /Applications/MATLAB_R2014a.app
  • Open Matlab and enter pathtool
  • In the opening path tool window, click Add with subfolders. Hit the key combination cmd + shift + G, enter /Applications/MATLAB_R2014a.app/toolbox/psp in the opening window and hit Go.
  • Select the folder rosmatlab and finish via clicking Open.
  • Save and Close the path tool.
  • In the Matlab console, enter
rehash toolboxreset
rosmatlab_AddClassPath
  • Restart Matlab and enjoy ROS :-)
I also tested it on Matlab R2014b, it works fine with the R2014a-release of ROS I/O; just change the name of the .app folder accordingly.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by