Ping from .launch file
Hello! I am attempting to add a line to my ros .launch file that would emulate the 'ping ##.#.###.##' command used in the command line. Is this possible? I am running Ubuntu 16.04. Thanks!
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hello! I am attempting to add a line to my ros .launch file that would emulate the 'ping ##.#.###.##' command used in the command line. Is this possible? I am running Ubuntu 16.04. Thanks!
'emulate' or actually run ping
?
If the latter: see #q272267.
Running regular (ie: non-ROS) binaries from roslaunch
is possible, but requires some special care.
The example there is with Python, but a simple bash script should also work.
With the assistance of your answer, I made a small python script and put that in the launch file. Thank you!
ICMP
ping, you can also run rosping node from your launch.For xmlrpc
ping in ROS network level, in rosnode Python API there are some methods, e.g. rosnode_ping. In the simplest form you can run a command like:
python -c "import rosnode; rosnode.rosnode_ping('/rosout', verbose=True)"
@AmateurHour: this is a good suggestion and was actually why I asked:
'emulate' or actually run
ping
?
Asked: 2018-06-26 16:26:11 -0600
Seen: 379 times
Last updated: Sep 15 '18