0
$\begingroup$

Rosanswers logo

Is it possible to use rostopic to echo multiple topics at once?

I have a node that's consuming a lot of CPU, and I'm not sure why. It publishes a dozen topics, so to help debug, I tried to do:

rostopic echo /mynode/*

but of course, rostopic told me the topic "/mynode/*" doesn't exist.


Originally posted by Cerin on ROS Answers with karma: 940 on 2016-10-13

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can open multiple terminal windows/tabs and use rostopic echo in each one, or you spawn multiple copies of rostopic, all echoing to the console.

rostopic echo /nodename/topic1 & rostopic echo /nodename/topic2 & rostopic echo /nodename/topic3 & ...

But you might find it more useful to use rostopic hz or rostopic bw to see the publish rate or bandwidth for some of these topics. It may be more likely that your main loop is publishing faster than you need. Are you using a rospy.Rate to publish at regular intervals, as in this rospy tutorial? (For the C++ code counterpart see this tutorial.)


Originally posted by Mark Rose with karma: 1563 on 2016-10-13

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.