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

Inspecting published topics and messages

Now that we've identified the three topics, let's take a look at them and get some robot-specific information:

  1. To find the last five values of the battery, run the following command in a Terminal. This will allow you to inspect the /battery_voltage topic:
T1 $ rostopic echo battery_voltage -n 5data: 9.568---data: 9.551---data: 9.594---data: 9.568---data: 9.586

You can infer that the voltage is about 9.6V on average, which means the batteries are charged.

  1. Let's investigate how this topic is built:
T1 $ rostopic info battery_voltage      Type: std_msgs/Float64

It uses the std_msgs/Float64 message type, which corresponds to a floating-point number that's 64 bits size. This message type is part of the ROS ...

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