ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to have matlab use a custom service which is part of a package on a separate computer?

asked 2019-04-15 12:22:12 -0500

theodork02 gravatar image

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/interface to simulator). 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?

edit retag flag offensive close merge delete

Comments

This seems like a question for Mathworks support or the Mathworks support fora.

Have you seen ROS Custom Message Support?

gvdhoorn gravatar image gvdhoorn  ( 2019-04-15 13:30:48 -0500 )edit

I have seen this, unfortunately the package is one machine, and matlab/prescan simulator is on the other. I have posted on mathworks: https://www.mathworks.com/matlabcentr... Thank you for your support anyway!

theodork02 gravatar image theodork02  ( 2019-04-15 13:46:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-15 13:52:36 -0500

gvdhoorn gravatar image

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?

According to ROS Custom Message Support you don't - that's not how it works. From the documentation:

ROS custom messages are specified in ROS package folders that contain a package.xml file and optional msg and srv directories. The msg folder contains all your custom message type definitions. You should also add all custom service type definitions to the srv folder.

This implies that the package must exist on the machine on which Matlab is run.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-04-15 12:22:12 -0500

Seen: 792 times

Last updated: Apr 15 '19