Ask Your Question
0

Output of ros2 node info: what are these publishers/subscribers?

asked 2019-06-02 21:17:58 -0600

wan_da gravatar image

I ran the following command, trying to find out more about my /gazebo node:

 user@ubuntu:~$ ros2 node info /gazebo
/gazebo
  Subscribers:
    /parameter_events: rcl_interfaces/ParameterEvent
  Publishers:
    /clock: rosgraph_msgs/Clock
    /parameter_events: rcl_interfaces/ParameterEvent
    /rosout: rcl_interfaces/Log
  Services:
    /gazebo/describe_parameters: rcl_interfaces/DescribeParameters
    /gazebo/get_parameter_types: rcl_interfaces/GetParameterTypes
    /gazebo/get_parameters: rcl_interfaces/GetParameters
    /gazebo/list_parameters: rcl_interfaces/ListParameters
    /gazebo/set_parameters: rcl_interfaces/SetParameters
    /gazebo/set_parameters_atomically: rcl_interfaces/SetParametersAtomically
    /pause_physics: std_srvs/Empty
    /reset_simulation: std_srvs/Empty
    /reset_world: std_srvs/Empty
    /unpause_physics: std_srvs/Empty

I don't really understand the output. I understand that /gazebo is subscribing to the topic /parameter_events, but what is rcl_interfaces/ParameterEvent? I thought it was a node that was publishing to /parameter_events, but it doesn't show up when I run ros2 node list and it also doesn't appear as a node on rqt_graph.

I also thought that it might be the location of a file, so I went to search in my ros2 workspace, but I didn't find anything with the same name.

What is it, really?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-06-03 01:25:21 -0600

gvdhoorn gravatar image

I understand that /gazebo is subscribing to the topic /parameter_events,

correct.

but what is rcl_interfaces/ParameterEvent?

It is the type of the topic. So the message type published to it -- and conversely: the message type a subscriber expects to receive on the topic.

I thought it was a node that was publishing to /parameter_events, but it doesn't show up when I run ros2 node list and it also doesn't appear as a node on rqt_graph.

it should be clear now why that is the case.

I also thought that it might be the location of a file, so I went to search in my ros2 workspace, but I didn't find anything with the same name.

Via some intermediate steps, rcl_interfaces/ParameterEvent is actually a file a package called rcl_interfaces. See index.ros.org/rcl_interfaces. The exact file is: ros2/rcl_interfaces/rcl_interfaces/msg/ParameterEvent.msg.

See Introduction to msg and srv interfaces for a (WIP) tutorial on how the message generation infrastructure is used.

edit flag offensive delete link more

Comments

Thank you very much. I must have not searched thoroughly enough.

wan_da gravatar imagewan_da ( 2019-06-03 01:37:30 -0600 )edit

There should be (or probably is, I just can't find it) some documentation on the output of ros2 node info. I'm guessing the assumption is that users have some experience with its ROS 1 equivalent (rosnode info).

gvdhoorn gravatar imagegvdhoorn ( 2019-06-03 01:39:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-06-02 21:17:58 -0600

Seen: 87 times

Last updated: Jun 03