MATLAB Answers

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

Theodore Chase 님이 질문을 제출함. 15 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

로그인 to comment.

답변 수: 1

Cam Salzberger 님의 답변 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.

  댓글 수: 1

로그인 to comment.

Translated by