Skip to Content
ROS Programming: Building Powerful Robots
book

ROS Programming: Building Powerful Robots

by Anil Mahtani, Luis Sanchez, Enrique Fernandez, Aaron Martinez, Lentin Joseph
March 2018
Intermediate to advanced content levelIntermediate to advanced
1396 pages
42h 14m
English
Packt Publishing
Content preview from ROS Programming: Building Powerful Robots

Running ROS serial server on PC

After burning the code, to start subscribing or publishing to the Arduino board, we should start the ROS serial server on the PC side. Let's see how to do so:

  1. Initialize roscore:
          $ roscore
  1. Run the ROS serial server on the PC. The argument of the server is the serial device name of the Arduino device:
         $ rosrun rosserial_python serial_node.py /dev/ttyACM0
  1. Now, you can see the /adc topic using the following command:
          $ rostopic list
  1. You can echo the /adc topic using the following command:
          $ rostopic echo /adc/adc0
  1. You may get following values:
Figure 10: Displaying LDR values from the ROS topic

We ...

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

Programming Robots with ROS

Programming Robots with ROS

Morgan Quigley, Brian Gerkey, William D. Smart
Machine Learning Design Patterns

Machine Learning Design Patterns

Valliappa Lakshmanan, Sara Robinson, Michael Munn

Publisher Resources

ISBN: 9781788627436Supplemental Content