0
$\begingroup$

Rosanswers logo

In our project we want to write a node to check sensor nodes for possible errors. One of the checked criterion is, if the topics of the node are actually published and not just have publisher.

Is it possible to check for published messages or publishing frequency without actually subscribing? The reason behind it is, that some sensors like cameras publishes large amount of data, which slow down the checknode.

Not suitable solutions:

  • "rospy.get_published_topics" does not check, if the publisher is publishing at all.
  • rostopic hz subscribes the topic
  • time saving solutions require subscription at some point

Thank you.


Edit/Solution:

I'm not sure (hence a comment), but there is a chance you could do this using topic statistics.

by gvdhoorn

This is our solution. Thanks.


Originally posted by bearot on ROS Answers with karma: 43 on 2019-01-29

Post score: 4


Original comments

Comment by bearot on 2019-01-30:
It is correct that there are already subscribers to the topics. We want to check on a running system.

Thank you for your answer gvdhoorn. It is definitly new to us and what we searched for. I will post it as answer and mark it as correct.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I'm not sure (hence a comment), but there is a chance you could do this using topic statistics.


Originally posted by gvdhoorn with karma: 86574 on 2019-01-29

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by ahendrix on 2019-01-29:
topic statistics are still per-connection, so if there are no subscribers, there will not be any statistics.

Comment by gvdhoorn on 2019-01-30:
If there are no subscribers, it doesn't make sense to want to check for "publishing frequency" anyway :)

I assumed (perhaps wrongly) that the OP had subscribers, but didn't want to add more just to check node liveness.

$\endgroup$
0
$\begingroup$

Rosanswers logo

All of the software that I've worked on does sensor health reporting with the diagnostic_updater library. It includes built-in functions to measuring and reporting the topic publish frequency, and reporting diagnostic errors if the publish frequency is too high or too low. It also provides a framework for reporting any other problems you might want to detect.

The only downside is that you must modify your nodes to use it; but generally the modifications are quite easy. Many of the mature ROS camera and laser drivers already incorporate diagnostics like this.


Originally posted by ahendrix with karma: 47576 on 2019-01-29

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by bearot on 2019-01-30:
Thank you for your answer, but it does not work out for us. Not every sensor node is written by us and some are missing diagnostic_updater, but it may be a solution for others.

Comment by TinyTurtle on 2022-11-08:
@bearot: did you find a solution or a hack for your problem?

$\endgroup$

Your Answer

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