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 the LED blink demo on Raspberry Pi and Odroid

To run the demo, launch multiple SSH Terminals and execute each command in each Terminal.

Start roscore:

    $ roscore

Run the executable as root in another Terminal. We are running the node with root privilege, because GPIO handling needs root. If you are working with RPi, the username will be pi instead of odroid:

    $ sudo -s
    # cd /home/odroid/catkin_ws/build/ros_wiring_examples
    #./blink_led

You can publish 1 and 0 to /led_blink to test the node working from another Terminal:

    $ rostopic pub /led_blink std_msgs/Bool 1
    $ rostopic pub /led_blink std_msgs/Bool 0

To run on the Raspberry Pi, we have to perform few more steps. We have to add the following lines to the .bashrc folder of the root ...

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