Skip to Content
Hands-On ROS for Robotics Programming
book

Hands-On ROS for Robotics Programming

by Bernardo Ronquillo Japón
February 2020
Intermediate to advanced
432 pages
10h 50m
English
Packt Publishing
Content preview from Hands-On ROS for Robotics Programming

A node that listens to the topic

As there is one node that publishes the incremental counter in the /counter topic, we will now launch a node that subscribes to this topic.

To start, let's visualize the current ROS graph by issuing the following command in T3:

T3 $ rqt_graph

A window pops up and shows this:

There is a single node, that is, the one we launched in T2. The /counter topic does not appear because no other node is listening to it. In order to make the topic show, launch the listener in T4:

T4 $ rosrun ros_basics topic_subscriber.py

You will see this log in the bottom-right terminal window, a neverending live data stream unless you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering ROS for Robotics Programming

Mastering ROS for Robotics Programming

Lentin Joseph
ROS Robotics By Example - Second Edition

ROS Robotics By Example - Second Edition

Lentin Joseph, Carol Fairchild, Dr. Thomas L. Harman

Publisher Resources

ISBN: 9781838551308Supplemental Content