-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Topics & Services #4610
Comments
# Terminal-1
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run demo_nodes_cpp talker
...
# Terminal-2
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 topic pub -r 1 /greetings std_msgs/msg/String "{data: 'Hello from terminal'}"
...
# Terminal-3
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 topic find std_msgs/msg/String
/chatter
/greetings
probably we do not want to mention all options, so we could add something like
we already have this in rolling and jazzy with ros2/ros2cli#771, not available on iron or humble. root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 service info /add_two_ints
Type: example_interfaces/srv/AddTwoInts
Clients count: 0
Services count: 1 verbose option: ros2/ros2cli#916 is W.I.P.
i do not really understand the requirement here, can you elaborate a bit? root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 node info talker
Unable to find node 'talker'
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 node info /talker
/talker
Subscribers:
/parameter_events: rcl_interfaces/msg/ParameterEvent
... |
Hi Fujitatomoya,
I checked
Yes, please add this explanation for all distributions.
Good to hear that it has been added for the newer version.
node name and node namespace are two different things. For example, when we want to run a create a node, we can use the following command to run a node with a specific node name and namespace. For example, the command Best wishes, |
can you share the
do you mean it should print |
Yes, you are right. When a user uses the command As a summary of the suggestions, the command |
https://docs.ros.org/en/rolling/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Topics/Understanding-ROS2-Topics.html does not introduce the all
https://docs.ros.org/en/rolling/Concepts/Basic/About-Command-Line-Tools.html introduces
I do not think we need to add this explanation of
i would argue that this should be explained in see ros2/ros2cli#923 |
I would like to contribute to this issue and introduce more |
Rephrase description of bw command for clarity Fixes ros2#4610 Signed-off-by: mnhaqq <[email protected]>
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b)
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b)
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b)
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b) Co-authored-by: mnhaqq <[email protected]>
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b) Co-authored-by: mnhaqq <[email protected]>
* Update Understanding-ROS2-Topics.rst Introduce bw and find commands to understanding topics tutorial * Update Understanding-ROS2-Topics.rst Rephrase description of bw command for clarity Fixes #4610 * Update Understanding-ROS2-Topics.rst Remove redundant lines * Update Understanding-ROS2-Topics.rst * Update Understanding-ROS2-Topics.rst Changes for readability and remove unnecessary lines Signed-off-by: mnhaqq <[email protected]> (cherry picked from commit a839c3b) Co-authored-by: mnhaqq <[email protected]>
Hi.
I have read and used the commands mentioned in the tutorial of ROS2 Iron for topics and services. The following suggestions came to my mind which make the commands for topics and services more rememberable and consistent.
For topics:
It is beneficial to create the command of
ros2 topic find <topic_type>
like what we have for services asros2 service find <setvice_type>
which finds all the services of a specific type.The command
ros2 topic info <topic_name>
just shows the number of publishers and subscribers. It is beneficial to mention on the tutorial that by using the option--verbose
, the command lists the names of publisher and subscriber nodes of a topic, as well. Like the commandros2 node info <node_name>
which lists the names of all the topics, services, and actions connected to a node.For services:
3. It is beneficial to create the command of
ros2 service info <service_name>
like what we have for topics asros2 topic info <topic_name>
which shows the number of publishers and subscribers of a topic. Additionally, it is useful if the proposed command lists the name of service and client nodes connected to the service.For nodes:
4. It is useful to add an option to the command
ros2 node info <node_name>
to show the namespace of the node.Best wishes,
Peyman
The text was updated successfully, but these errors were encountered: