Run & Debug

Your robot application can be run on both virtual robot environment and real robot (tablet).

If you have a physical robot, you can run and test your application on the robot using its IP and ADB over WiFi. You can also use a virtual robot environment, provided by the SDK Manager. The Android Virtual Device acts as the tablet of a real robot.

Note: There is no need to create an Android Virtual Device using the AVD Manager of Android Studio.

If you have already done Robot Application…, robot app will automatically be added to the Run Configuration of your project.

image61

The default settings of this configuration is as below:

Deployment Target Options Emulator
AVD Options x86 / Selected GPU

You can adjust the configuration for your run environment.

Run configuration

Pepper SDK Plugin provides Run Configuration for robot applications like the image below.

image62

This section describes the settings you can configure in this menu

Module Description
Deployment Target Options

Emulator

  • Runs your application in Virtual Robot Environment.
  • This will automatically run Virtual Robot Environment if it is not already running.

Real robot tablet

  • Runs your application on the real robot tablet.

  • Connects to the tablet using the entered IP address through ADB over WiFi.

    The IP address of the tablet can be found in Settings > Wi-Fi screen.

Note

This is not the same as the robot’s head IP address.

AVD Options This only applies when Deployment Target Options is set to Emulator

CPU/ABI

The CPU type of the AVD image.

Provides “x86” and “armeabi-v7a” options and developer should select what is best for their environment.

Use Host GPU

  • Uses GPU acceleration when running AVD. This may not work depending on the PC H/W. If your PC H/W does not support GPU acceleration, this option should be disabled.

To accelerate the performance of your AVD, install Intel x86 Emulator Accelerator (HAXM installer) from Android SDK Manager.

See the link below for installation guide:

https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

When the installation is complete, set your AVD options to the following:

CPU/ABI x86
Use Host GPU Checked

Launch application

Once Run Configuration is done, to run your application, click the Run button in toolbar.

image63

This section explains how robot application is run.

Step Action
A Verify the target device using Deployment Target Options.
B If the target device is Emulator and Virtual Robot Environment is not running, launch Virtual Robot Environment.
C Build the application. (APK)
D Install the built APK on the target device.
E

When installation is complete, look up for the launch activity in AndroidManifest.xml and run the application.

<action android:name=”android.intent.action.MAIN”/>

<category android:name=”android.intent.category.LAUNCHER”/>

F

Check the application is run on the target device.

The progress of the process above can be seen using Run Window and Event Log like the image below.

image64