# COBOTTA Control [![en](https://img.shields.io/badge/lang-en-red.svg)](https://ohara-lab-su.github.io/cobotta2/en/index.html) [![ja](https://img.shields.io/badge/lang-ja-yellow.svg)](https://ohara-lab-su.github.io/cobotta2/ja/index.html) [![GitHub](https://img.shields.io/badge/GitHub-ohara--lab--su%2Fcobotta2-181717?logo=github)](https://github.com/ohara-lab-su/cobotta2/) [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-Documentation-222222?logo=githubpages&logoColor=white)](https://ohara-lab-su.github.io/cobotta2/en/) [![Ohara Lab](https://img.shields.io/badge/Ohara%20Lab-Home-4B5563?logo=homeassistant&logoColor=white)](https://ohara-lab-su.github.io/index.en.html) --- ```{toctree} :maxdepth: 2 :caption: Contents: api/modules tutorials/index man/function man/camera man/joypad man/tips man/history ``` ## COBOTTA Control Classes (v0.10.3) The COBOTTA control architecture is organized around four main classes and two interface classes. - `cobotta_bcap.py`: low-level COBOTTA control through b-CAP. - `cobotta_orin2.py`: COBOTTA control through ORiN2. - `cobotta_ctrl.py`: COBOTTA control interface. - `cobotta_ctrl_joypad.py`: joystick control and COBOTTA control through `cobotta_bcap`. ### b-CAP control `cobotta_bcap.py` → `cobotta_ctrl_joypad.py` ### ORiN2 control `cobotta_orin2.py` → `cobotta_ctrl.py` The b-CAP and ORiN2 implementations are intended to be largely interchangeable for basic operations. ORiN2, however, uses Windows COM, whose objects have thread-affinity and lifetime-management constraints. When integrating ORiN2 into a server framework such as gRPC, calls must be dispatched through an appropriate COM-owning thread. Python bindings require particular care to release COM references and relinquish robot control correctly. ### `pad`: joystick support `input_grpc_client.py`, `input_grpc_server.py`, `input_joypad_local.py`, `joypad_core.py`, `joypad_mover.py`, `joypad_runtime.py`. ### `server_fastapi`: communication through [ese774](https://ohara-lab-su.github.io/ese774_frame/) The `clients`, `models`, and `routers` directories provide client implementations, Pydantic interface models, and server routers. `spec_ctrl.py` defines the control interface. Server launch scripts include `joypad_grpc_server.py` and `orin2_grpc_server.py`. ### `server_grpc`: communication through [grpc_frame](https://ohara-lab-su.github.io/grpc_frame/) Clients include `bcap_grpc_async_client.py`, `joypad_grpc_client.py`, and `orin2_grpc_client.py`. The `make_bcap_pyi.py`, `make_joypad_pyi.py`, and `make_orin2_pyi.py` scripts generate `.pyi` stubs to support editor completion when dynamic dispatch would otherwise obscure method signatures. ## Control examples and tests The [tests directory](https://github.com/ohara-lab-su/cobotta2/tree/main/tests) contains examples covering direct control, FastAPI/ese774, gRPC, and local operation. --- ## Author - Kengo NAKADA