Client-Class Installation

Required packages and repositories (software developed by the laboratory)

  1. x_logger: Log management.

  2. ese774_frame: Framework for communicating with the COBOTTA control server (ESE774 implementation).

  3. cobotta2: COBOTTA control server software using ORiN2.

  4. cobotta2_client: Example programs for controlling COBOTTA through the server.

  5. cobotta_joypad: Joypad control using high-speed gRPC communication.

Using client programs (accessing the COBOTTA server)

The following examples use ese774_frame and cobotta2 developed in the SUSANOO project. They demonstrate the BL774-style distributed-control architecture (more precisely, a client–server architecture) for COBOTTA.

Basic examples are available in cobotta2_client. They cover most of the common COBOTTA operations.

A short example follows.

Displaying the current position (XYZ coordinates)

import logging
import asyncio
from pathlib import Path

import asyncio
from cobotta2 import Config, MotionMode
from cobotta2.server import AsyncCobottaClient
from x_logger import XLogger

# Restrict httpx logging to WARNING and above (suppress INFO)
logging.getLogger("httpx").setLevel(logging.WARNING)

#@pytest.mark.asyncio
async def work():

    HERE = Path(__file__).parent
    Config.load_yaml(HERE / "config_cobotta1.yaml")
    # Config.load_yaml("config_cobotta1.yaml")

    logger = XLogger(log_level="info", logger_name=Config.CLIENT_LOGGER_NAME)
    client = AsyncCobottaClient(config=Config, logger=logger)

    try:
        # Queries such as busy_status should not require taking the arm.
        result = await client.current_position()
        logger.info(type(result))
        logger.info(result)
    except Exception as e:
        print(e)
    assert "result" == "result"
    # send_command("unknown")  # This causes an error

if __name__ == "__main__":
    asyncio.run(work())

Basic motion using internal position variables


Author

  • Kengo NAKADA