Running an application

To run an application, there are 2 options:

Testing on a virtual robot

Step Action

On Android studio:

  • Choose Tools > Pepper SDK > Emulator or
  • Click the emulator_btnEmulator button.

The Robot Emulator appears.

emulator

Make sure that the selected run configuration of your project is app, otherwise, select it.

run_configuration_toolbar

Click the run_btnRun button.

The Select Deployment Target windows appears.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/run_target.png

Select the Emulator as deployment target.

The application starts on the virtual robot displayed on the Robot Emulator.

For further details, see: Robot emulator.

Running an application on a real robot

To run an application on a real robot, there are 3 steps:

Preparing a robot for connection

To be able to connect to a robot, check his Settings on his tablet:

Home > Settings settings_icon.

Make sure:

  • the Developer mode is activated. For further details, see: Enable developer options.
  • the Developer options / Debugging / ADB is also activated.

Connecting to a real robot

Prerequisite: make sure your robot is configured. For further details, see: Preparing a robot for connection.

Step Action

On Android studio:

  • Choose Tools > Pepper SDK > Connect or
  • Click the connect_btnConnect button.

The Robots Browser appears, displaying detected robots.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/robot_browser.png

Select one of the robots in the list.

If the robot does not appear, you can also check then complete Use fix port and Use fixed IP/hostname fields. In this case, use 9559 as fixed port.

For further details, see: Robots Browser.

Click the Select button.

A security alert appears:

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/password_required.png

Enter the robot password and click the OK button.

The Robot Viewer appears.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/robot_viewer.png

For further details, see: Robot Viewer.

If the Connect to tablet alert appears:

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/connect_to_tablet.png

Enter the IP address of the robot tablet.

How to find the IP address?

On the tablet of the robot, display the notifications (swipe down from the top of the screen) and look for the following logo:

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/tablet_ip_address_logo.png

Wait for the complete connection.

Once connected to a real robot, you should automatically be connected to his tablet via ADB.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/connection_succeed.png

Troubleshooting

If Android Studio displays a “Connection failed” alert.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/connection_failed.png

Click the Help link and check the tips.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/connection_help.png
  • Check the tablet IP address and then click the modify IP address link to enter it.
  • Make sure ADB is enabled. For further guidance, see: Preparing a robot for connection.
  • Check on the tablet for an “Allow ADB” pop-up to validate.
  • Make sure another developer is not already connected to the robot.

Run!

Prerequisite

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/connection_succeed.png

Make sure Android Studio is fully connected: not only to the robot, but also to his tablet.

Otherwise, see: Connecting to a real robot.

Step Action

Make sure that the selected run configuration of your project is app, otherwise, select it.

run_configuration_toolbar

Click the run_btnRun button.

The Select Deployment Target windows appears and displays the Tablet.

https://developers.softbankrobotics.com/sites/default/files/repository/54_rst_pepper/public/source/_build/html/_images/run_target_real.png

Select the robot’s tablet as deployment target.

The application starts on the robot’s tablet.