Note: This tutorial assumes that you have completed the previous tutorials: Introspect Rapps.
(!) 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 Robot App

Description: How to create and install a robot application (rapp) for pairing or concert modes.

Keywords: rapp

Tutorial Level: INTERMEDIATE

Next Tutorial: Troubleshooting Rapps

Overview

This tutorial provides simple instructions on creating your own rapp.

Preparation

It is highly recommended to review Rapp Specification Document before move on. Also make sure you have installed either the rocon_app_platform environment, or the full rocon environment itself.

What is a Rapp?

Read the Rapp Specification! To summarise briefly here though, a rapp is the entity that is usually installed and executed by the robot's application manager (rocon_app_manager). Typically a rapp is simply a ROS launcher with a rapp specification (metadata, icon, public interface etc.) and no code, just dependencies on code packages.

Breakdown

A simple example is the talker app. A quick browse through the files should give you something of an inkling on what is going on. A more detailed breakdown of the three files:

Launch

<launch>
  <node name="talker" pkg="rospy_tutorials" type="talker" required="true"/>
</launch>

This is what the app manager launches when requested to start the app. There are no special buttons and whistles beyond the usual capabilities of a roslaunch file.

Interface

publishers: 
  - name: chatter
    type: std_msgs/String
subscribers: []
services: []
action_clients: []
action_servers: []

Those are the parts of your software that will be exposed to remote systems for either pairing or concert (multimaster) modes. At the moment it is a yaml list of publishers, services, action_clients and action_servers.

Rapp

display: Talker
description: Default ros style talker tutorial
compatibility: rocon:/
launch: <Relative path from .rapp>/talker.launch
public_interface: <Relative path from .rapp>/talker.interface
icon: <Relative path from .rapp>/rocon_bubble.png

This file stores all the meta-data for the application. Each of the fields should be self-evident except for the compatibility string - this is a rocon_uri and determines which platforms the rapp is compatible to run on. Alternatively you can constrain the rapp to run on a particular hardware platform, os, application framework or combination thereof. Note that the values for the interface and icon keys are resource names.

Create

A rapp can be a standalone ROS package, or you can collect a group of rapps together inside a single package (e.g. rocon_apps). In either case, simply follow the steps below to create your own rapp:

  • Create a catkin package for your rapp, e.g. my_rapps

    • This is optional. You can also add your rapps to an existing catkin package.
  • Create a folder for your rapp, e.g. my_rapps/apps/my_new_rapp

  • Copy the interface, rapp and launch files from the talker rapp to the new folder.

  • Modify the contents of these to suit your application.
  • Let the system know about your rapp by exporting its information in the package.xml of the catkin package your rapp folder belongs to, e.g. my_rapps/package.xml

<export>
    <rocon_app>apps/my_new_rapp/my_new_rapp.rapp</rocon_app>
</export>

Wiki: rocon_app_utilities/Tutorials/indigo/Create a Robot App (last edited 2015-03-11 04:16:48 by jihoonl)