- 1 Minute to read
- 1 Minute to read
In order for the user to communicate with the robotic device, most of them will include an interactive screen or even a remote mobile App.
For example, Gary robot has a touch screen located in Gary’s upper body.
There are two ways to develop the UI:
Develop your own web application (using React.js for example), and use the communication controller for connecting the frontend design to the robotic device (or develop your own server).
Using the UI controller: Our UI controller provides ready-to-use screens that allow any Python developer to display an amazing UI, by just calling a single method! Also the communication to handle user's feedbacks is included in this controller.
Let’s take a look at the following diagram:
- On our python code, we are calling
display_modal()function, passing relevant data like the title of the modal and confirmation button text. The application will wait for a response from the user.
- The modal UI component is displayed on the chest system.
- Once the user performs some action (closing the modal or pressing any of the buttons), the information is sent back to the python code.
- We can read the action performed by the user and continue with the business logic.
2. Using the controller
Creating the controller in your app:
from raya.application_base import RayaApplicationBase class RayaApplication(RayaApplicationBase): async def setup(self): ... self.UI = self.enable_controller('ui') ...
The controller includes several methods (each method display another UI component):
- display_action_screen() - call to action
For example, if the app name is "hello_world", the URL should be: https://chest-web.web.app/app/hello_world
3. Examples & More info
We extremely encourage you to visit our UI-KIT website. There you will find all the relevant information for all the components and a lot of examples.