# Client-Class Installation ## Required packages and repositories (software developed by the laboratory) 1. [x_logger](https://github.com/ohara-lab-su/x_logger.git): Log management. 2. [ese774_frame](https://github.com/ohara-lab-su/ese774_frame.git): Framework for communicating with the COBOTTA control server (ESE774 implementation). 3. [cobotta2](https://github.com/ohara-lab-su/cobotta2.git): COBOTTA control server software using ORiN2. 4. [cobotta2_client](https://github.com/shimane-dev/cobotta2_client.git): Example programs for controlling COBOTTA through the server. 5. [cobotta_joypad](https://github.com/ohara-lab-su/cobotta2_joypad.git): 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](https://github.com/shimane-dev/cobotta2_client.git). They cover most of the common COBOTTA operations. A short example follows. ## Displaying the current position (XYZ coordinates) ```python 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