Home

Awesome

Micro-ROS Arduino library for Kaia.ai

Kaia.ai is a platform for 3D-printable pet robots. Please sign up for an early launch invite here.

This repo is an Arduino Micro-ROS library for Kaia.ai home pet robots platform.

Questions? Please visit the Support Forum!

Install a library release using Arduino Library Manager

Install a library release by .zip download

Install library using git

Alternatively, you can git clone this library as follows. This method may be useful if you need to edit library files or check out different versions of the library.

cd %HOMEPATH%\Documents\Arduino\libraries
git clone -b iron --depth 1 https://github.com/kaiaai/micro_ros_arduino_kaiaai micro_ros_kaia

Now you can include this library into your sketch using #include <micro_ros_kaia.h>.

Mod and rebuild Micro-ROS Arduino library for Kaia.ai

In some cases, tayloring 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 and rebuild the Kaia.ai Arduino library on Windows for your particular robot design.

cd %HOMEPATH%\Documents\Arduino\libraries
git clone -b iron --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:iron

Hints

docker run -it --rm -v .\micro_ros_kaia:/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:iron -p esp32

Acknowledgements and modifications

This is a fork of Micro-ROS Arduino library adapted to Kaia.ai-based robots. Specifically, this adapted fork

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);
  Serial.print("Connecting to WiFi ");

  unsigned long startMillis = millis();
  while (WiFi.status() != WL_CONNECTED) {
    if (millis() - startMillis >= 10000) {
      Serial.println(" timed out");
      return;
    }
    Serial.print('.'); // Don't use F('.'), it crashes ESP32
    delay(500);
  }

  Serial.println(F(" connected"));
  Serial.print(F("IP "));
  Serial.println(WiFi.localIP());

  set_microros_wifi_transports("192.168.1.57", 8888); // Micro-ROS setup

Change Log

v2.0.7-iron.4

v2.0.7-iron.4

v2.0.7-iron.3

v2.0.7-iron.2

v2.0.7-iron.1