This repo contains:
- Arduino ESP32 robot firmware for the ESP32 breakout board
- Robot's lower body extension module firmware
- Robot's head extension module firmware
- all libraries necessary to build the sketch
- ESP32 sketch data upload tool
Please visit the Support Forum!
List of supported LiDAR/LDS sensors is here.
- download the latest code by Code -> Download ZIP on this page
- alternatively, download the latest or an older release by clicking Releases on this page; click on Assets -> Source code to download the firmware
- open the downloaded ZIP file
- navigate inside the "firmware-xxx" folder
- copy everything inside the "firmware-xxx" folder to your Arduino sketch folder. That includes both the Arduino sketch and the libraries folder.
- watch the video below to
- install the ESP32 tool chain version 2.0.17 (NOT 3.0.x)
- ignore Arduino IDE library installation in the video
- build, upload firmware
- upload sketch data
- follow the configuration instructions on this page
Once you have uploaded firmware and the sketch data) to your Kaia.ai-compatible robot:
- wait for your robot to enter the AP (WiFi access point) mode
- the robot enters the AP (WiFi access point) mode whenever the robot fails to connect to WiFi
- Alternatively, force your robot to enter the AP mode by performing a "factory reset":
- Press the "EN" (reset) button on your ESP32 board.
- Next, immediately after that (within 1 second) press the ESP32 "BOOT" button and hold it for 10+ seconds.
- The ESP32 board LED will blink fast.
- Release the "BOOT" button once the ESP32 board LED stops blinking.
- connect to your robot's WiFi (MAKERSPET)
- navigate your browser (PC or mobile handset) to 192.168.4.1
- configure your robot and its WiFi connection:
- input your WiFi name, password
- select your robot's model
- select your robot's laser sensor from the list of supported LiDAR/LDS
- select your robot's motor model
- press the "Configure and Connect" button
- disconnect from your robot's WiFi and reconnect back to your own WiFi
This blog post discusses the configuration in more detail.
- supports differential steering (2 motors with a coaster wheel)
- 4WD skid steering, mechanum, 3WD omniwheels on the TODO list
- supports motor drivers with two inputs (IN1/IN2)
- including L298N, TB6612FNG, DRV8871, DRV8833, DRV8835, etc.
- supports motors with two (quadrature) encoder outputs
- including N20, GA25-370, etc.
- supports ESC controller (PWM, CW and FG pins)
- BLDC motors with these specifications are recommended
- 9..24V voltage (higher voltage increases efficiency)
- models JGA25-2418, JGA25-2430; 24.4mm outer diameter
- ~190..450 no-load (max) RPM, ~140..350 rated RPM
- JST SH 1.0mm 5-pin connector on the back (PWM, CW/CCW, VMOT, GND, FG)
- built-in BLDC driver and encoder
- ~0.5..1.5 Kg*cm rated torque
- Examples
- CHR-GM25-BL2418 24V 200RPM 270PPR
- JGA25-BL2418 24V 245RPM 630PPR
- CHR-GM25-BL2418 24V 260RPM 204PPR
- JGA25-BL2418 24V 408RPM 127.8PPR
- CHR-GM25-BL2418 24V 450RPM 120PPR
- Maker's Pet online store
- AliExpress
- Ebay
- Amazon
- online robotics specialty stores
- robotshop.com
- in India
- robu.in, zbotic.in, robokits.co.in, robocraze.com, roboticsdna.in, probots.co.in, roboindia.com, flipkart.com, digikey.in, mouser.in, in.element14.com
- choose a motor with a minimum rated torque of ~0.5Kg*cm (a guess). Your motor must have enough torque
- to accelerate the weight of your robot reasonably quickly, let's say 2lbs or so
- to drive over thick carpet, floor mats, etc.
- for the given rated torque, choose a motor with the highest RPM
- the higher the motor RPM, the faster your robot can drive
- we recommend 24V BLDC ~400 RPM motors, e.g. JGA25-BL2418 24V 408RPM 127.8PPR
- these motors are fast, powerful and (generally) long-lasting
- 12V BLDC ~300 RPM is the second choice
- often 12V BLDC offer less torque at the same RPM compared to 24V BLDC motors
- if you cannot get a BLDC motor, get yourself a brushed GA25-370 motor with encoder
- this motor is (generally) less powerful compared to the recommended BLDC motors
- brushed motors (generally) do not last as long as BLDC motors
- if you cannot get a GA25-370 motor, you can use N20 motors as the last resort
- N20 motors have considerably less torque compared to the recommended motors
- However, some N20 motors with low RPM (e.g. <=100RPM) do offer sufficient torque
- set Maker's Pet mini as the default robot
- added more N20 motors
- set/get LDROBOT LD14P rotation speed- MAKERSPET_MINI works
- added YDLIDAR X4-PRO (not tested)
- MAKERSPET_MINI works
- tested with YDLIDAR SCL, LDROBOT LD14P
- motor driver
- brushed motor support: drivers TB6612FNG, LM298N, DRV8871 and others with same IN1, IN2 control input logic
- N20 motors supported
- quadrature encoders
- reverse motor direction, reverse motor encoder - for wiring convenience
- web configuration
- additional options including PID, motor drive type, motor encoder type
- LiDAR scan frequency option
- automatically loads values from previous configuration
- ROS properties
- motors: get max RPM, derated max RPM, target RPM, current RPM
- motor encoders: get current value, get/set PPR (pulses per revolution), get TPR (ticks per revolution)
- motor PID: get/set Kp, Ki, Kd, update period, PID mode on-error vs. on-measurement
- robot base: get model name, base diameter, tire diameter, wheel base
- LiDAR: get current scan rate, LiDAR model,
- code refactored into separate files for readability
- motor controller code moved into its own library
- added support for YDLIDAR SCL
- set micro-ROS client key using ESP32 MAC for smoother micro-ROS reconnect
- refactored code into separate files
- added Delta-2A 230400 baud version (vs old 115200 baud)
- added Delta-2B
- added motor voltage to configuration
- added Camsense X1
- moved from KaiaaiTelemetry to KaiaaiTelemetry2 message
- added battery voltage telemetry
- added WiFi RSSI telemetry
- added LDROBOT LD14P laser distance scan sensor
- included all library dependencies in library/ to make the code self-contained
- do not use Arduino IDE Library manager
- instead, just copy everything to your Arduino sketch folder
- included the ESP32 sketch data upload tool in tools/
- added 3irobotix Delta-2A, Delta-2G
- library version dependencies
- LDS v0.5.0
- ESPAsyncWebSrv v1.2.7 (including AsyncTCP, ESPAsyncTCP)
- micro_ros_kaia v2.0.7-rolling.3
- PID_Timed v1.1.2
- requires Kaia.ai ROS2 image
kaiaai/kaiaai-ros-dev:humble-02-11-2024
orkaiaai/kaiaai-ros-dev:iron-02-11-2024
- added LiDAR/LDS laser distance scan sensors support
- YDLIDAR X3, X3-PRO
- Neato XV11
- SLAMTEC RPLIDAR A1
- library version dependencies
- LDS v0.4.0
- ESPAsyncWebSrv v1.2.7 (including AsyncTCP, ESPAsyncTCP)
- micro_ros_kaia v2.0.7-rolling.3
- PID_Timed v1.1.2
- requires Kaia.ai ROS2 image
kaiaai/kaiaai-ros-dev:humble-02-05-2024
orkaiaai/kaiaai-ros-dev:iron-02-05-2024
- initial release
- supports sensors
- YDLIDAR X4, X2/X2L
- LDS02RR
- robot model configuration via web browser
- requires libraries
- LDS v0.3.1
- PID_Timed v1.1.2
- micro_ros_kaia 2.0.7-rolling.3
- ESPAsyncWebSrv v1.2.7
- requires Kaia.ai ROS2 image
kaiaai/kaiaai-ros-dev:humble-01-28-2024
orkaiaai/kaiaai-ros-dev:iron-01-28-2024
- updated to match PID_Timed v1.1.0 library
- PID_Timed v1.1.0 replaced constant
#define
with class constants to fix namespace collisions
- PID_Timed v1.1.0 replaced constant
- added LDS library as dependency
- refactoried and moved YDLIDAR X4 into LDS library
- added support for Xiaomi 1st gen LDS02RR laser distance scan sensor
- started moving
#define
constants into CONFIG class to clean up namespace - added motor choices
- miscellaneous cleanup
- BREAKING ESP32 pinout assignment change to support the newly ESP32 breakout board
- the new ESP32 breakout board works
- the motor pin change fixes the "motor kick" upon ESP32 hard reboot
- the LDS pin change fixes the LDS motor enabled by ESP32 upon hard reboot
- MOT_FG_RIGHT has changed from GPIO27 to GPIO35_IN
- LDS_MOT_EN has changed from GPIO12_OUT to GPIO19
- MOT_CW_LEFT has changed from GPIO32 to GPIO23
- requires micro_ros_kaia Arduino library version 2.0.7-any.3 minimum
- added ROS2 parameter server
- works successfully
- added lds.motor_speed parameter
- controls the laser distance sensor motor speed
- type double; set lds.motor=0 to stop LDS motor; set lds.motor=1.0 for maximum speed
- set lds.motor=-1.0 for LDS default motor speed
- added minimum micro_ros_kaia library version check
- Arduino build errors out at compile time if the library version is too old
- renamed some #define symbols from YDLidar-specific to generic LDS
- Arduino libraries:
- micro_ros_kaia
- LDS
- PID_Timed
- ESPAsyncWebSrv including AsyncTCP
- ESP32 sketch data upload tool