MATLAB Answers

How to publish several topics for a single node?

6 views (last 30 days)
James Ang
James Ang on 21 Apr 2015
Edited: Tohru Kikawada on 2 May 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?
>> robot = rospublisher({'/mobile_base/commands/velocity','/odom'}) % not working

Accepted Answer

Tohru Kikawada
Tohru Kikawada on 2 May 2019
Edited: Tohru Kikawada on 2 May 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:

More Answers (0)

Community Treasure Hunt

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

Start Hunting!