MATLAB Answers

How to use rosgenmsg with a filepath on a separate computer?

6 views (last 30 days)
Theodore Chase
Theodore Chase on 15 Apr 2019
Commented: Theodore Chase on 18 Apr 2019
My Setup:
I have created a custom service (.srv in the srv folder of the desired package) on my main machine (Ubuntu 16.04/ ROS Kinetic/ ROS master on this one). I have Matlab on another computer (Windows 10). The windows computer has full connectivity with ros on the linux computer (Matlab can publish and subscribe to topics and call services through the robotics system toolbox).
My Question:
How do I have Matlab call the rosgenmsg(), a function that generates a Matlab object file from .srv or .msg files, with a file path to a package on a separate computer?

  0 Comments

Sign in to comment.

Answers (1)

Cam Salzberger
Cam Salzberger on 15 Apr 2019
Hey Theodore,
Barring odd situations where you have other computer systems accessible through network paths ro the like, rosgenmsg is designed to work only on the computer from which you run it. It does not actually communicate over or with ROS at all, it simply uses the tools in MATLAB to build the custom messages into MATLAB and Java files necessary to use them with MATLAB. So you would need to get the message packages off of your Linux machine and put them local to your Windows machine in order to run rosgenmsg.
As a side note, if you have multiple machines that have MATLAB on them, you can just build the libraries once, and share them between machines. See the instructions here.
-Cam

Sign in to answer this question.