0
$\begingroup$

Rosanswers logo

I need to use 'rosnode ping /node' command inside my rosnode source file. Is it possible to ping a node only once? If I simply write "rosnode ping /node", it repeatedly pings the node for some duration. Any information or help regarding this would be much appreciated.

Thanks

PS: Is it possible to suppress the output on the console, like quite mode as opposed to verbose mode?


Originally posted by vishnu on ROS Answers with karma: 25 on 2020-03-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

From the rosnode ping --help output (also on the wiki page of rosnode (wiki/rosnode: ping)):

Usage: rosnode ping [options] <node>
Options:
  -h, --help  show this help message and exit
  -a, --all   ping all nodes
  -c COUNT    number of pings to send. Not available with --all

So this should do what you ask:

rosnode ping -c 1 <name of node>

Originally posted by gvdhoorn with karma: 86574 on 2020-03-08

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by vishnu on 2020-03-09:
Thanks for the response. Is it possible to suppress the output on the console, like quite mode as opposed to verbose mode?

Comment by gvdhoorn on 2020-03-10:
Not that I know of.

PS: it's not a good idea to ask follow up questions in comments under questions with an already accepted answer.

Visibility is really low in that case.

It could be someone else knows, but they won't see your question, as the "rosnode ping only once" question already is answered, so they have no reason to look at it.

$\endgroup$

Your Answer

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