Loading

Uli SDK

Python Apps

17. Python Apps

The Python Binding of the comp app libraries opens the door for integrating Uli SDK with Python apps. The Python app gets/sets JSON data from/to the comp app libraries through the Python Binding.

The graph below shows the relationship between the Python GUI app, client Comp app, service comp apps:



You can find the following Python GUI apps in the uli_sdk/pyapps directory: DashBoard UI and Mobility UI. Both DashBoard UI and Mobility UI use qtwidgets of the pyqt5.

The upcoming OCU UI, which uses qtQuick/qml, will be available in next release.

17.1 DashBoard UI

DashBoard UI gets JSON data from the comp app library, apps/dash_board_, for displaying subsystems in the network and their status details. The comp app library, apps/dash_board_, hosts the core_client.DiscoveryClient, that discovers subsystems in the network.

17.1.1 Block Diagram

17.1.2 JSON Data

The dash_board_ui gets the following data from dash_board comp app:

  1. List of subsystems discovered:
  2. url:
    data://ocu.apps.uli_sdk/core_clients.DashBoard?location=subsystemlist

    data: List of SubsystemIdControlRec_t
    defined: services/core_clients/messages/core_clients_messages_defs.h

  3. Status details of the subsystem:
  4. url:

    data://ocu.apps.uli_sdk/core_clients.DashBoard?location=subsystemstatusdetails&id=100

    data: SubsystemCompStatusDetailsRec_t

    defined: utils/message_utils/message_utils_defs.h
     

17.2 Mobility UI

The Mobility UI allows operator to gain control and drive the Uli-Kaya Robot in the network. It integrates Approximate Engineering Input (Gamepad) for using Sony PS-4 controller.

Uli-Kaya Robot runs sm and nm comp apps so that it can be discovered as a subsystem by the core_clients.DashBoard service hosted by the apps/ocu_. The core.SubsystemControl service hosted in the sm allows the client comp app library, apps/ocu_, to gain exclusive control of the subsystem of the Uli-Kaya Robot.

The server comp app library, apps/mobility_, hosts the mobility.PrimitiveDriver service. The client comp app library, apps/ocu_, can gain exclusive control of the mobility.PrimitiveDriver service and send drive commands from the joysticks to the mobility.PrimitiveDriver service, where the codelet UliMobility gets the drive commands to drive Uli-Kaya Robot. See Isaac SDK Integration for details.

17.2.1 Block Diagram



17.2.2 JSON Data

The Mobility UI gets the following data:

  1. List of subsystems discovered:
  2. url:

    data://ocu.apps.uli_sdk/core_clients.DashBoard?location=subsystemlist

    data: List of SubsystemIdControlRec_t

    defined: services/core_clients/messages/core_clients_messages_defs.h

  3. Status details of the subsystem:
  4. url:

    data://ocu.apps.uli_sdk/core_clients.DashBoard?location=subsystemstatusdetails&id=100

    data: SubsystemCompStatusDetailsRec_t

    defined: utils/message_utils/message_utils_defs.h

The Mobility UI sets the following data:

  1. Joystick record:
  2. url:

    data://ocu.apps.uli_sdk/core_clients.Data?location=joystick1rec

    data: JoystickRec_t

    defined: apps/ocu/data_store/data_store_defs.h

  3. Gui record:
  4. url:

    data://ocu.apps.uli_sdk/core_clients.Data?location=guirec

    data: GuiRecRec_t

    defined: apps/ocu/data_store/data_store_defs.h