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

Revision history [back]

click to hide/show revision 1
initial version

Well, based on your answer (comment?) a node is not also a topic. There is a node named /rosout and a topic with the name /rosout. If you run rostopic info /rosout you'll see that the node /rosout is not publishing to the topic /rosout.

I'm not sure what node(s) you were running for your question so I am using the turtlesim_node here because it looks to be pretty similar.

With turtlesim_node running, if i run rostopic list -v I get the following output

Published topics:
 * /turtle1/color_sensor [turtlesim/Color] 1 publisher
 * /rosout [rosgraph_msgs/Log] 1 publisher
 * /rosout_agg [rosgraph_msgs/Log] 1 publisher
 * /turtle1/pose [turtlesim/Pose] 1 publisher

Subscribed topics:
 * /turtle1/cmd_vel [geometry_msgs/Twist] 1 subscriber
 * /rosout [rosgraph_msgs/Log] 1 subscriber

This shows the names of the topics such as /turtle1/color_sensor, the message type turtlesim/Color, and how many publishers 1 publisher listed under the section labeled Published topics. It's similar for the subscribers.

Now, if I run rostopic list, I get the following output:

/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose

and if I run rostopic list -p, I get the following output:

/rosout
/rosout_agg
/turtle1/color_sensor
/turtle1/pose

The difference between the two commands (as far as I know) is that rostopic list shows all topics and rostopic list -p shows only the topics that are currently being published. Notice with the last command that the /turtle1/cmd_vel isn't shown. This is because nothing is publishing to it. The turtlesim_node is subscribed to it, that's why it's listed with rostopic list. You can prove this by running rostopic info /turtle1/cmd_vel:

Type: geometry_msgs/Twist

Publishers: None

Subscribers: 
 * /turtlesim (http://jayess:55350/)

So, don't get confused when nodes and topics have the same name, they are completely different entities but can have the same name without affecting anything (except to sometimes confuse people).

Well, based on your answer (comment?) a node is not also a topic. topic (if I understand you correctly). There is a node named /rosout and a topic with the name /rosout. If you run rostopic info /rosout you'll see that the node /rosout is not publishing to the topic /rosout.

I'm not sure what node(s) you were running for your question so I am using the turtlesim_node here because it looks to be pretty similar.

With turtlesim_node running, if i run rostopic list -v I get the following output

Published topics:
 * /turtle1/color_sensor [turtlesim/Color] 1 publisher
 * /rosout [rosgraph_msgs/Log] 1 publisher
 * /rosout_agg [rosgraph_msgs/Log] 1 publisher
 * /turtle1/pose [turtlesim/Pose] 1 publisher

Subscribed topics:
 * /turtle1/cmd_vel [geometry_msgs/Twist] 1 subscriber
 * /rosout [rosgraph_msgs/Log] 1 subscriber

This shows the names of the topics such as /turtle1/color_sensor, the message type turtlesim/Color, and how many publishers 1 publisher listed under the section labeled Published topics. It's similar for the subscribers.

Now, if I run rostopic list, I get the following output:

/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose

and if I run rostopic list -p, I get the following output:

/rosout
/rosout_agg
/turtle1/color_sensor
/turtle1/pose

The difference between the two commands (as far as I know) is that rostopic list shows all topics and rostopic list -p shows only the topics that are currently being published. Notice with the last command that the /turtle1/cmd_vel isn't shown. This is because nothing is publishing to it. The turtlesim_node is subscribed to it, that's why it's listed with rostopic list. You can prove this by running rostopic info /turtle1/cmd_vel:

Type: geometry_msgs/Twist

Publishers: None

Subscribers: 
 * /turtlesim (http://jayess:55350/)

So, don't get confused when nodes and topics have the same name, they are completely different entities but can have the same name without affecting anything (except to sometimes confuse people).

people). Like @gvdhoorn suggested, you should pick up some books on ROS (and read more of the wiki) to help clarify some of these concepts.

Well, based on your answer (comment?) a node is not also a topic (if I understand you correctly). There is a node named /rosout and a topic with the name /rosout. If you run rostopic info /rosout you'll see that the node /rosout is not publishing to the topic /rosout.

:

Type: rosgraph_msgs/Log

Publishers: 
 * /turtlesim (http://jayess:55350/)

Subscribers: 
 * /rosout (http://jayess:38176/)

I'm not sure what node(s) you were running for your question so I am using the turtlesim_node here because it looks to be pretty similar.

With turtlesim_node running, if i run rostopic list -v I get the following outputoutput:

Published topics:
 * /turtle1/color_sensor [turtlesim/Color] 1 publisher
 * /rosout [rosgraph_msgs/Log] 1 publisher
 * /rosout_agg [rosgraph_msgs/Log] 1 publisher
 * /turtle1/pose [turtlesim/Pose] 1 publisher

Subscribed topics:
 * /turtle1/cmd_vel [geometry_msgs/Twist] 1 subscriber
 * /rosout [rosgraph_msgs/Log] 1 subscriber

This shows the names of the topics such as /turtle1/color_sensor, the message type turtlesim/Color, and how many publishers 1 publisher listed under the section labeled Published topics. It's similar for the subscribers.

Now, if I run rostopic list, I get the following output:

/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose

and if I run rostopic list -p, I get the following output:

/rosout
/rosout_agg
/turtle1/color_sensor
/turtle1/pose

The difference between the two commands (as far as I know) is that rostopic list shows all topics and rostopic list -p shows only the topics that are currently being published. Notice with the last command that the /turtle1/cmd_vel isn't shown. This is because nothing is publishing to it. The turtlesim_node is subscribed to it, that's why it's listed with rostopic list. You can prove this by running rostopic info /turtle1/cmd_vel:

Type: geometry_msgs/Twist

Publishers: None

Subscribers: 
 * /turtlesim (http://jayess:55350/)

So, don't get confused when nodes and topics have the same name, they are completely different entities but can have the same name without affecting anything (except to sometimes confuse people). Like @gvdhoorn suggested, you should pick up some books on ROS (and read more of the wiki) to help clarify some of these concepts.