Metadata-Version: 2.3
Name: pylekiwi
Version: 0.9.0
Summary: Python package for controlling the LeKiwi robot
Author: neka-nat
Author-email: neka-nat <nekanat.stock@gmail.com>
Requires-Dist: eclipse-zenoh>=1.5.1
Requires-Dist: gunicorn>=23.0.0
Requires-Dist: kinpy>=0.5.5
Requires-Dist: loguru>=0.7.3
Requires-Dist: mesop>=1.1.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: opencv-python-headless>=4.11.0.86
Requires-Dist: pydantic>=2.11.10
Requires-Dist: rustypot>=1.3.0
Requires-Dist: typer>=0.19.2
Requires-Dist: pynput>=1.8.1 ; extra == 'client'
Requires-Dist: rerun-sdk>=0.28.1 ; extra == 'client'
Requires-Python: >=3.11
Provides-Extra: client
Description-Content-Type: text/markdown

# pylekiwi
[![PyPI version](https://badge.fury.io/py/pylekiwi.svg)](https://badge.fury.io/py/pylekiwi)

Python package for controlling the LeKiwi robot.

![lekiwi](assets/lekiwi.jpg)

## Quick Start

### Web UI

Log into the robot and run the following command:

```bash
ssh <your robot ip>
sudo chmod 666 <your_follower_robot_serial_port>
uvx pylekiwi webui --serial-port <your_follower_robot_serial_port>
```

Then, open a web browser and navigate to `http://<your robot ip>:8080` to see the web UI.

![web ui](assets/webui.png)

### Leader and Follower/Client Nodes

Run the following command to start the follower node (host) on the robot (Respberry Pi):

```bash
ssh <your robot ip>
sudo chmod 666 <your_follower_robot_serial_port>
uvx pylekiwi host --serial-port <your_follower_robot_serial_port>
```

Run the following command to start the leader node (client) on the remote machine:

```bash
sudo chmod 666 <your_leader_robot_serial_port>
uvx --from 'pylekiwi[client]' pylekiwi leader --serial-port <your_leader_robot_serial_port>
# Use rerun to view the camera frames
uvx --from 'pylekiwi[client]' pylekiwi leader --serial-port <your_leader_robot_serial_port>
```

Or use the following command to start the leader node (client) on the remote machine:

```bash
sudo chmod 666 <your_leader_robot_serial_port>
uvx pylekiwi client capture --camera base --output photo.jpg
uvx pylekiwi client pose go <name_or_angles>     # preset pose name or "10,20,30,40,50"
uvx pylekiwi client pose save <name>             # save current pose
uvx pylekiwi client pose list                    # list preset poses
uvx pylekiwi client pose delete <name>           # delete preset pose
uvx pylekiwi client grasp                        # grasp object
uvx pylekiwi client release                      # release object
```
