How can I use user defined type message in rossubscriber?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I want to connect a topic with rossubscriber in MATLAB. But there is a problem. While the basic form of a message(std_msgs, sensor_msgs etc.) was connected, I couldn't connect the type of message which is defined by my .msg files. For example, if The topic name is '/right_arm_status' and the MessageType is 'com_pkg/MotionStatus') , the following error appears: Failed to create a subscriber with topic name /right_arm_status and type com_pkg/MotionStatus.
What can I do?
if true
sub = rossubscriber('/right_arm_status', 'com_pkg/MotionStatus')
end
댓글 수: 0
답변 (1개)
Cam Salzberger
2019년 3월 14일
Hello Yun,
For any non-standard (non-built-in) message types, you can make them available for use in MATLAB by using the Custom Message workflow. This will involve installing the support package for Custom Messages, and then generating the files required by MATLAB to use the custom messages. Once you do that, you should be able to create publishers and subscribers that use the message types you built.
-Cam
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Specialized Messages에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!