simulink read ROS Service Request

2 views (last 30 days)
Markus Krovinovitsch
Markus Krovinovitsch on 19 Jun 2020
Answered: Cam Salzberger on 22 Jun 2020
Hi support team,
i need help for reading ROS service requests.
I can call Services, but i can't read a service request, when i'm providing a service in Simulink.
Can you help me?
Thank you!
Best regards.

Answers (1)

Cam Salzberger
Cam Salzberger on 22 Jun 2020
Hello Markus,
To contact the Technical Support team directly, please file a service request. MATLAB Answers is designed to be a community resource for sharing information and helping each other, and is not really a way to directly get in contact with MathWorks. Some members of the tech support team or other teams at MathWorks, such as myself, may view and answer questions here, but it is not guaranteed.
In the case of your specific question, I'm not entirely sure what you are asking. If you are looking to create a ROS service server in Simulink, and react to service requests as they arrive, that functionality is not available right now for Simulink. You can create a service server in MATLAB, with a callback to react to the requests, or you can create a service client in Simulink to make those requests.
Part of the difficulty in using services with Simulink is that they are two very different paradigms of programming. Simulink is designed to be executing tasks in a loop, working on a regular cadence. Service and action servers, on the other hand, are reactive, only executing their tasks when new information comes. Services in particular are tricky because their calls are designed to be blocking, executing their tasks while stopping further execution until they are done and return a response.
If you are trying to accomplish a specific task, contacting technical support may be a good way to get some advice on how to work around this limitation or go about getting similar functionality in a different way.
-Cam

Categories

Find more on Wireless Communications in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!