How to publish several topics for a single node?

4 visualizaciones (últimos 30 días)
James Ang
James Ang el 21 de Abr. de 2015
Editada: Tohru Kikawada el 2 de Mayo de 2019
Hi all,
I'm able to create a publisher for a topic by typing
>> robot = rospublisher('/mobile_base/commands/velocity')
How do I create publishers for multiple topics?
e.g
>> robot = rospublisher({'/mobile_base/commands/velocity','/odom'}) % not working
Thanks.

Respuesta aceptada

Tohru Kikawada
Tohru Kikawada el 2 de Mayo de 2019
Editada: Tohru Kikawada el 2 de Mayo de 2019
You'll need to create two publshers corresponding to each topic. Regarding the single node, you can control nodes running on MATLAB using the following expression: https://mathworks.com/help/robotics/ref/robotics.publisher.html

Más respuestas (0)

Categorías

Más información sobre Specialized Messages en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by