How to publish several topics for a single node?

5 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Tohru Kikawada
Tohru Kikawada il 2 Mag 2019
Modificato: Tohru Kikawada il 2 Mag 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

Più risposte (0)

Categorie

Scopri di più su Specialized Messages in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by