checking for published rostopic with data, without using terminal commands.

asked 2019-01-31 02:03:36 -0500

rathish gravatar image

updated 2019-01-31 02:34:53 -0500

Delb gravatar image

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?.

edit retag flag offensive close merge delete

Comments

1

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..

Delb gravatar image Delb  ( 2019-01-31 02:39:39 -0500 )edit

be able to deal with this data and print an error message or not. Check the simple subscriber tutorial (exists for cpp too)

Delb gravatar image Delb  ( 2019-01-31 02:41:16 -0500 )edit
1

I have written a series of rostopic list that publishes the data on the topic

Would be nice to detail what you actually did here

Delb gravatar image Delb  ( 2019-01-31 02:43:17 -0500 )edit