| Crates.io | kachaka-api |
| lib.rs | kachaka-api |
| version | 0.1.0 |
| created_at | 2025-01-12 14:55:55.158701+00 |
| updated_at | 2025-01-12 14:55:55.158701+00 |
| description | Unofficial Rust API client library for Kachaka Robot |
| homepage | |
| repository | https://github.com/hirtanak/kachaka-api-rust |
| max_upload_size | |
| id | 1513307 |
| size | 8,100,444 |
Kachaka用の非公式Rust APIクライアントライブラリです。
公式では、PythonおよびROS 2向けのクライアントが用意されていますが、このリポジトリではRust向けのクライアントライブラリを提供します。
Cargo.tomlに以下を追加してください:
[dependencies]
kachaka-api = "0.1.0"
use kachaka_api::{KachakaApiClient, StartCommandOptions};
#[tokio::main]
async fn main() {
let mut client = KachakaApiClient::connect("http://kachaka-020.local:26400")
.await
.unwrap();
let response = client
.speak(
"こんにちは、カチャカです",
StartCommandOptions::default()
.title("タイトル")
.cancel_all(true),
)
.await
.unwrap();
println!("{:?}", response);
}
examplesディレクトリには以下のサンプルコードが含まれています:
watch_camera_image.rs: カメラ画像のストリーミングwatch_compressed_camera_image.rs: 圧縮されたカメラ画像のストリーミングshelf_location_resolver.rs: 棚と目的地の名前解決simple_speak.rs: コマンド実行のサンプル (発話とそれをキャンセルするサンプルになっています)watch_update.rs: ロボットの状態監視watch_error.rs: エラー監視get_latest_info.rs: 最新情報の取得Issue、プルリクエストは大歓迎です。