Ask Your Question

Explain in detail what each node does to which topic it sends, I don't understand anything

asked 2021-05-13 14:48:25 -0500

kgtaboy gravatar image

updated 2021-05-15 09:07:57 -0500

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-05-15 09:13:10 -0500

The circles represent the nodes. The text between the arrows is the topic name. The source of the arrow is the node that sends the topic. The tip of the arrow is the node that receives the topic.

For example, the /move_base node sends /cmd_vel to the /gazebo node.

edit flag offensive delete link more



@miura: +100 for posting a response.

Tbh, I would not expand on your answer, unless the OP provides more context and shows some more effort.

Simply plonking a screenshot of rqt_graph in a post and then demanding everything is explained is not what we consider a proper question here on ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2021-05-15 09:23:54 -0500 )edit

To further clarify on the given example:

move_base is publishing a "twist" message on the /cmd_veltopic.

This is a Twist message: geometry_msgs/msg/Twist

How do I know this will be a Twist message? Simply put: that is just what the community has settled-upon. When you want to make a robot move you do it by sending a geometry_msgs/msg/Twist message on the /cmd_vel topic.

As you can see in the flowchart there is also a turtlebot3_teleop_keyboard node publishing Twist messages on the /cmd_vel topic. This isn't a conflict; this is a feature of ROS. Multiple nodes can publish the same messages on a topic, and any number of nodes can subscribe to that topic.

That's not to say that there won't be a conflict. /cmd_vel is telling the robot "You must travel at V m/s with a rotation of W r/s" so ...(more)

Spectre gravatar image Spectre  ( 2021-05-15 13:13:46 -0500 )edit

Another important one to point out is that robot_state_publisher on the right side. As you can see from the flowchart it is publishing a /tf_static topic, but what might not be immediately obvious is that robot_state_publisher is only publishing that topic.

I say this because there are three arrows originating from that node. If you look closely they are all given the same /tf_static label. What this tells us is that there are three other nodes subscribing to that topic:

amcl on the far left side, turtlebot3_slam_gmapping also on the left, and move_base in the center-bottom.

/tf_static is a topic, but it is referring to a Static Transform. I'm running out of space here, but here are some links explaining Transforms in ROS2:

ROS2, "TF2 with ROS2"

Nav2, "Setting Up Transformations"

Spectre gravatar image Spectre  ( 2021-05-15 13:41:07 -0500 )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



Asked: 2021-05-13 14:48:25 -0500

Seen: 42 times

Last updated: May 15