How can I use user defined type message in rossubscriber?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Cam Salzberger
el 14 de Mzo. de 2019
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 comentarios
Ver también
Categorías
Más información sobre Specialized Messages en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!