How do I define a service server with custom service type in MATLAB?

조회 수: 1 (최근 30일)
Abhinav Gandhi
Abhinav Gandhi 2021년 6월 9일
답변: Jagadeesh Konakalla 2021년 6월 11일
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
Jagadeesh Konakalla
Jagadeesh Konakalla 2021년 6월 10일
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.
Abhinav Gandhi
Abhinav Gandhi 2021년 6월 10일
Thanks for your reply Jagadeesh. I have the ROS Toolbox interface for ROS custom messages installed. I am using MATLAB 2020a with ROS1, I'd added that information to my question but I don't see it anymore!
Where can I find documentation for this toolbox? The links I saw point to this page: https://www.mathworks.com/help/ros/ug/ros-custom-message-support.html which talks about rosgenmsg but has no documentation for the interface toolbox.
Thanks!

댓글을 달려면 로그인하십시오.

답변 (1개)

Jagadeesh Konakalla
Jagadeesh Konakalla 2021년 6월 11일
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

카테고리

Help CenterFile Exchange에서 Custom Message Support에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by