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

Code walkthrough

Let's check out the Android-ROS application code for the basic publisher-subscriber app. You can get it from ~/android_core/android_tutorial_pubsub/src. You'll see a file called MainActiviy.java, and now I'll explain the code.

In the beginning of the code, you can see the package name and required Android modules for this application. The important modules are RosActivity and NodeConfiguration. These will help us create a new ROS node in an Android activity (https://developer.android.com/guide/components/activities.html).

 package org.ros.android.android_tutorial_pubsub; import android.os.Bundle; import org.ros.android.MessageCallable; import org.ros.android.RosActivity; import org.ros.android.view.RosTextView; import org.ros.node.NodeConfiguration; ...
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