How do I define a service server with custom service type in MATLAB?
1 view (last 30 days)
Show older comments
I am trying to write a service along with a callback function. The service would have a response and request of type sensor_msgs/Image. However, there are no such service types in rostype.getServiceList. How can I create a custom service type that will accept the correct request and response msg types? Is this the correct approach for creating a service server in MATLAB?
Thanks!
2 Comments
Jagadeesh Konakalla
on 10 Jun 2021
Hi Abhinav,
My understanding is that you are querying for ROS 1.
If you are using the MATLAB version R2020b or later, Please refer to the following links which will be useful to know how to generate custom messages and custom services in the MATLAB.
If you are using the MATLAB R2020a or before, you need to install the following support package.
Let me know if you need additional information.
Thanks,
Jagadeesh K.
Answers (1)
Jagadeesh Konakalla
on 11 Jun 2021
Hi Abhinav,
Here are the links for R2020a MATLAB release related to custom message creation in MATLAB. As you have already installed the support package, you should be able to use the rosgenmsg function now. Please follow the following links.
Thanks,
Jagadeesh K
0 Comments
See Also
Categories
Find more on Custom Message Support in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!