ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosnode ping /node only once

asked 2020-03-06 13:18:16 -0500

vishnu gravatar image

updated 2023-06-18 09:40:00 -0500

lucasw gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-08 06:43:55 -0500

gvdhoorn gravatar image

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>
edit flag offensive delete link more

Comments

Thanks for the response. Is it possible to suppress the output on the console, like quite mode as opposed to verbose mode?

vishnu gravatar image vishnu  ( 2020-03-09 18:33:26 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-10 03:01:09 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-03-06 13:18:16 -0500

Seen: 948 times

Last updated: Mar 11 '20