Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Russian

Вступление

В общих чертах подготовка к работе с SDK выглядит так:

  1. Установить SDK на компьютер разработчика.

  2. Собрать (to build) примеры (т.е. проект examples) на компьютере разработчика (на том же компьютере, где установлена SDK).

  3. Установить примеры (т.е. проект examples) на роботе.

Первый и второй шаги описаны в файлах README.md и в configure_qt_creator.txt, которые находятся в архиве с SDK. Чтобы выполнить третий шаг (на роботе) запустите следующую команду в терминале:

Блок кода
languagebash
sudo pb_tool install promobot_examples

Что касается третьего шага, возможно приложения проекта examples уже установлены на роботе. Чтобы проверить это, зайдите в Сервисное меню → Настройки → Система → Панель меню и сравните ваш экран со скриншотом:

Image Added

Если приложения не установлены, то обратитесь в тех. поддержку, чтобы специалист удаленно подключился и установил их.

Общая информация

Сценарий использования SDK:

Разработчик (представитель владельца робота) хочет взять какое-нибудь приложение из проекта examples и чем-то его дополнить. Дополнять (т.е. писать код и редактировать элементы интерфейса) он будет на компьютере, где установлена SDK. А потом он хочет запустить это обновленное приложение на роботе, чтобы проверить, как оно работает.


Образец прохождения сценария:

Попробуем поменять что-то в приложении TemplateUIApp, чтобы посмотреть, как нужно вносить на робота свои изменения, когда вы что-то добавили в примеры (т.е. в приложения из проекта examples).


Местоположения в файловой системе, которые понадобятся:

  • /opt/promobot/plugin/promobot_app_templateui/                        (на роботе)
  • /examples/src/TemplateUIApp/src/                                                    (на компьютере, где установлена SDK)
  • /examples/devel-debug/plugin/promobot_app_templateui/      (на компьютере, где установлена SDK)

Демонстрация

Предупреждение

Перед началом работы удостоверьтесь, что на компьютере разработчика и на роботе установлена одна и та же версия операционной системы (оба Ubuntu 16 или оба Ubuntu 18).

Если вы попытаетесь поместить приложение, которое собрали (build) в Ubuntu 18, на робота, который работает на Ubuntu 16, то приложение не будет отображаться в сервисном меню, и вы вообще не сможете зайти в это приложение.


До изменений приложение TemplateUIApp выглядит так:


Сейчас нам нужно что-то поменять в приложении TemplateUIAppДля наглядности изменений добавим пару кнопок на экран. Заходим в папку /examples/src/TemplateUIApp/src/ и открываем файл templateobject.uiФайл откроется в программе Qt Designer. Добавляем кнопки (перетаскиваем из левой части экрана), можем поменять их название, должно получиться что-то такое:


Далее нужно сохранить изменения. В верхней части экрана нажимаем File -> Save All.


Теперь нужно собрать (build) приложение. Для этого можно собрать весь проект examples как было описано в configure_qt_creator.txt (потому что TemplateUIApp входит в состав этого проекта и, соответственно, тоже соберется).


Теперь нужно скопировать на флешку so-файл, который находится в папке /examples/devel-debug/plugin/promobot_app_templateui/.


Теперь нужно флешку подключить к роботу и скопировать этот so-файл в папку /opt/promobot/plugin/promobot_app_templateui/ (т.е. заменить находящийся там файл новым файлом с флешки). Папка выглядит так:


Далее нужно перезагрузить робота из сервисного меню и зайти в приложение с главного экрана.

Приложение должно выглядеть примерно следующим образом:

Примечание

Если в приложении ничего не изменилось попробуйте перезапустить робота по кнопке на днище передвижной платформы.


...

English

Pagetitle
How to run an application on a robot
How to run an application on a robot

Introduction

In general, preparation for working with the SDK looks like this:

  1. Install the SDK on the developer's computer.
  2. Build the examples (examples project) on the developer's computer (on the same computer where the SDK is installed).
  3. Install examples (examples project) on the robot.

The first and second steps are described in the files README.md and configure_qt_creator.txt from SDK archive. To complete the third step (on a robot) run the following command in a terminal:


Блок кода
languagebash
sudo pb_tool install promobot_examples

General Information

SDK use case:

Software developer (representative of the robot owner) wants to choose some application from examples project and add something to it. Software developer will work with the application (to write code and edit interface elements) on the computer where the SDK is installed. And then he wants to run this updated application on the robot to test how it works.


Sample use case walkthrough:

Let's try to change something in the application TemplateUIApp to see how you should push code changes to the robot.


Locations in the filesystem that you will need:


  • /opt/promobot/plugin/promobot_app_templateui/                        (on the robot)
  • /examples/src/TemplateUIApp/src/                                                    (on the computer with SDK installed)
  • /examples/devel-debug/plugin/promobot_app_templateui/      (on the computer with SDK installed)

Demonstration


Предупреждение

Before starting work, make sure that the same version of the operating system is installed on the developer's computer and on the robot (both Ubuntu 16 or both Ubuntu 18).

If you will try to put an application which was built on Ubuntu 18 on the robot with Ubuntu 16, then the application will not be displayed in Service menu and you will not be able to open this application at all.


Before changes the TemplateUIApp applicationlooks like this:


Now we are going to change something in the TemplateUIApp application. For clarity of changes, let's add a couple of buttons to the screen. Go to the /examples/src/TemplateUIApp/src/ folder and open templateobject.ui file. The file will be openned in the Qt Designer program. Add buttons (drag from the left side of the screen), you can change their titles as well. You should get something like that:



Next, you need to save the changes. At the top of the screen, click File -> Save All.


Now you need to build the application. To do this, you can build the entire examples project as described in the file configure_qt_creator.txt (because TemplateUIApp is part of this project and will build as well).


Now you need to copy the so-file, which is located in the /examples/devel-debug/plugin/promobot_app_templateui/ folder, to the USB flash drive.


Now you need to connect the USB flash drive to the robot and copy this so-file to the /opt/promobot/plugin/promobot_app_templateui/ folder (replace the file located there with a new file from a USB flash drive). The folder looks like this:


Next, you need to restart the robot from the service menu and enter the application from the main screen. The application should look something like this:


Примечание

If nothing has changed in the application, try restarting the robot using the button on the robot's bottom of moving platform.