ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The former (ie: rossrv
) is a tool to display ROS service definitions (ie: the files which define them, ending in .srv
).
The latter (ie: rosservice
) is a tool to interact with ROS service servers. It allows you to call services in nodes, display the returned result, find out about their types and find all service servers which offer services of a specific type (see rosservice --help
for all supported operations).
So rossrv
is an "off-line" tool, while rosservice
is a tool you use with a live, running ROS node graph.
I have
catkin_ws/src/simple_arm/srv/GoToPosition.srv
that I see when I runrossrv list
assimple_arm/GoToPosition
However, my request handler is in
catkin_ws/src/simple_arm/src/arm_mover.cpp
and I only see it inrosservice list
as/arm_mover/safe_move
. Why can't I see/arm_mover/safe_move
underrossrv list
if it is a service? And the inverse withsimple_arm/GoToPosition
This should now be clear: rossrv
would only show you information on (and contents of) the GoToPosition.srv
file, while rosservice
will show you information about /arm_mover/safe_move
(which is apparently the name you've given to the service server.
2 | No.2 Revision |
The former (ie: rossrv
) is a tool to display ROS service definitions (ie: the files which define them, ending in .srv
).
The latter (ie: rosservice
) is a tool to interact with ROS service servers. (ie: those running as part of your ROS node). It allows you to call services in nodes, display the returned result, find out about their types and find all service servers which offer services of a specific type (see rosservice --help
for all supported operations).
So rossrv
is an "off-line" tool, while rosservice
is a tool you use with a live, running ROS node graph.
I have
catkin_ws/src/simple_arm/srv/GoToPosition.srv
that I see when I runrossrv list
assimple_arm/GoToPosition
However, my request handler is in
catkin_ws/src/simple_arm/src/arm_mover.cpp
and I only see it inrosservice list
as/arm_mover/safe_move
. Why can't I see/arm_mover/safe_move
underrossrv list
if it is a service? And the inverse withsimple_arm/GoToPosition
This should now be clear: rossrv
would only show you information on (and contents of) the GoToPosition.srv
file, while rosservice
will show you information about /arm_mover/safe_move
(which is apparently the name you've given to the service server.