Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiaai authored Aug 20, 2023
1 parent a0314e4 commit 8f83c7c
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Micro-ROS Arduino library for [Kaia.ai](https://kaia.ai)

This is an Arduino ESP32 Micro-ROS library for [Kaia.ai](https://kaia.ai) home pet robots platform.
[Kaia.ai](https://kaiaai) is a platform for 3D-printable pet robots. Please sign up for an early launch invite [here](https://remake.ai).

This repo is an Arduino ESP32 Micro-ROS library for [Kaia.ai](https://kaia.ai) home pet robots platform.

## Install a library release using Arduino Library Manager
- open your Arduino IDE
- select the Tools -> Manage Libraries menu
- type `kaia` in the search filter
- click Install

Keep in mind that this library is pre-built for ESP32 platform only. If you would like to use it with another platform, see instructions below on how to modify and rebuild the library. In particular, try omitting `-p esp32` in the `docker run` command.

## Install a library release by .zip download
- Navigate to the [release section](https://github.com/kaiaai/micro_ros_arduino_kaia/releases), expand Assets
and download the latest `Source code (zip)` release
Expand All @@ -36,29 +36,35 @@ Download the Kaia.ai firmware project code from the [Kaia.ai Arduino firmware re
open the downloaded `kaia_esp32.ino` project file in your Arduino IDE and click the build button.
The project should build successfully. At this point, feel free to burn your ESP32 module with the compiled code and/or modify the firmware to your liking.

## Extend, modify and rebuild Micro-ROS Arduino library for Kaia.ai
## Mod and rebuild Micro-ROS Arduino library for Kaia.ai
In some cases, tayloring [Kaia.ai](https://kaia.ai) software to your particular robot may require tweaking the Kaia.ai library code in addition to the Kaia.ai firmware - for example to add new types of Micro-ROS messages. Follow these steps to [extend and/or adapt](https://micro.ros.org/docs/tutorials/advanced/create_new_type/) and rebuild the Kaia.ai Arduino library on Windows for your particular robot design.
- Install Docker for your PC platform, e.g. [Docker for Windows](https://docs.docker.com/desktop/install/windows-install/) and make sure the Docker agent is running
- Install the [Micro-ROS Arduino library for Kaia.ai](https://github.com/kaiaai/micro_ros_arduino_kaia/) using the instructions above. Let's assume you are using Arduino IDE for Windows and your Arduino libraries are stored under `C:\Users\YOUR-USER-NAME\Documents\Arduino\libraries`.
- Open a Windows command shell and run these commands to rebuild the library using the [Micro-ROS library builder](https://github.com/micro-ROS/micro_ros_arduino):
```
cd %HOMEPATH%\Documents\Arduino\libraries
git clone -b rolling --depth 1 https://github.com/kaiaai/micro_ros_arduino_kaia micro_ros_kaia
docker run -it --rm -v .\micro_ros_kaia:/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:rolling
```

## Hints
- You can also rebuild the library for a particular platform only, e.g. for ESP32:
```
docker run -it --rm -v .\micro_ros_kaia:/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:rolling -p esp32
```

## Acknowledgements and modifications
This is a fork of [Micro-ROS Arduino library](https://github.com/micro-ROS/micro_ros_arduino)
adapted to [Kaia.ai](https://kaia.ai/)-based robots. Specifically, this adapted fork

- successfully builds on Windows PC when using `git clone` to download the library
- adds [kaia_msgs](https://github.com/kaiaai/kaia/) ROS2 package
- fixes `library_generation.sh` script to build the library correctly on Windows
- adds a `git clone` to download the library
- adds [kaia_msgs](https://github.com/kaiaai/kaia_msgs/) ROS2 package
- moves `WiFi.begin()` outside of the Micro-ROS library for cleaner and convenient code development
- tweaks colcon.meta to optimize library features, performance and memory usage
- tweaks colcon.meta to optimize library features, performance and memory usage for Kaia.ai applications
- sets up the library for inclusion into the Arduino Library Manager
- pre-built for ESP32 only

## API tweaks
### API tweaks
Now you can handle connecting to WiFi as you see fit, instead of Micro-ROS doing this for you. For example:
```
WiFi.begin(ssid, passw);
Expand Down

0 comments on commit 8f83c7c

Please sign in to comment.