checking for published rostopic with data, without using terminal commands.
I am beginner novice working on a robotics project, I have written a series of rostopic list that publishes the data on the topic. But when I try launching many launch files, I wasn't able check for only the published topic, unless using the command
rostopic echo /topic_name
to check if its publishing for the proper communication between the various channels. Is there a way to check for all publshing topic with data in the rostopic list and return some error messages if that particular topic is not publishing without entering the manual commands in terminal?.
There are some mistakes/misunderstanding here : You do'nt publish data with
rostopic list
you only print a list of all the existing topics, whether they are used or not. If you want to check if a node publish correclty on a topic you have to create subscribers to get the data, you will then..be able to deal with this data and print an error message or not. Check the simple subscriber tutorial (exists for cpp too)
Would be nice to detail what you actually did here