Note: This tutorial assumes that you have completed the previous tutorials: Installation.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Create a New App

Description: This tutorial shows you how to create a new Android application for your TurtleBot

Tutorial Level: BEGINNER

Prepare your environment

Go back to the workspace you created in the previous tutorial and source the ros environment:

> source ~/turtlebot_android/devel/setup.bash

Create

A New Repo

If you're not working within a repo, you'll need to setup a few files for gradle in the root of a new repo.

> cd ~/turtlebot_android/src
> catkin_init_android_repo dudes

A New Library/App

The following creates a new library/app pair that depend on each other as well as android_gingerbread:

> cd ~/turtlebot_android/src/dudes
> catkin_create_android_library_pkg dudette android_gingerbread
> catkin_create_android_pkg dude dudette

Finally compile:

> cd ~/turtlebot_android
> yujin_make
# Or alternatively, just the packages and their dependencies
> yujin_make --pkg=dude
> yujin_make --pkg=dudette

Looking Around

Package Manifest - Dependencies

The build_depends tags in your project's package.xml file are used to automatically generate project.properties for you when catkin invokes cmake. It uses some utility functions from catkin_pkg to find and resolve the locations of dependencies that are android libraries.

Whenever you depend on a new android library, simply add it to the build_depends here. If you ever need to regenerate the project properties outside of a catkin build step, simply do something similar to the following:

> source ~/android_apps/devel/setup.bash
> roscd turtlebot_android_follower
> android_generate_project_properties

Ros Messages

These do not need to be explicitly depended on in package.xml (though they should be for completeness). They just need to be in your workspace at the point of building rosjava_messages.

Wiki: turtlebot_android/Tutorials/hydro/Create a New App (last edited 2013-05-07 01:56:54 by DanielStonier)