Robotics StackExchange | Archived questions

Output of rostopic list

Hi, I am new to ROS and bash script. I'm writing a bash script and inside this, I add rostopic list command. In order to make sure everything is ok, there must be a display of 50+ topics and when I run my bash script, instead of seeing all the topics, I just wanna see how many topics I have. So, after running it, I wanna have an output that says "you have 50 topics" or "you have 2 topics, try again". I hope my question makes sense. Appreciate any help!

Asked by hitty on 2022-09-10 15:41:28 UTC

Comments

Answers