This is a Kotlin Multiplatform app for controlling and experimenting with Neato Botvac D85 robot vacuums. It is loosely based on btvccntrl-ng and focuses on making everyday tasks easier (like setting the clock or starting the robot) as well as exploring SLAM (Simultaneous Localization And Mapping).
Prebuilt packages for Linux (.deb) and Android (.apk) can be found under Releases.
Also take a look at the project video on YouTube:
I generally try to minimize dependencies, but I'm a one man crew and can therefore only support Debian-based Linux distributions as I'm running one myself. Anyway, you need to have the following packages installed for everything to work properly:
- SDKMAN! for managing all the JVM dependencies. Install it via the installation guide.
- JDK for running the bytecode. Install it with
sdk install java
. - Kotlin for developing the program. Install it with
sdk install kotlin
. - Gradle for building the whole thing. Install it with
sdk install gradle
. - Android Studio as the necessary IDE for Android development. Install it via the installation guide.
- Kotlin Multiplatform plugin for Android Studio. Install it from here.
- Start and stop house or spot cleanings remotely.
- Access crucial statistics (battery charge and total runtime) at a moments glance.
- Manually drive the robot like a RC car from one location to another.
- Check, modify and enable/disable the cleaning schedule.
- Quickly set the current date and time with a single button press.
- Get extensive diagnostics data for troubleshooting.
- Easily experiment with SLAM via inbuilt sensors (LIDAR and wheel odometry).
- Initial scan of the environment.
- If the target position isn't equal to the current position:
- Calculate the path from current to target via a modified A* path finding algorithm including a cost map (prefer routes far away from obstacles).
- Follow the first 50 cm (or whatever distance between scans proves to be reliable) of the path.
- Perform another scan.
- If needed, perform some post-processing to clean the scan.
- Match the new scan to the last scan with the ICP (Iterative Closest Point) algorithm to get a LIDAR transformation estimate.
- Combine the LIDAR and wheel odometry transformation estimates to update the robot's absolute position.
- Add the current scan to the map based on the determined robot position.
- If needed, perform some post-processing to clean the map.
- Wait for the user to either set a new target position and then go the step 2 or stop the mapping process.
mapping-early.mp4
mapping-later.mp4
- Really good introduction to SLAM: https://www.youtube.com/watch?v=xqjVTE7QvOg
- https://en.wikipedia.org/wiki/A*_search_algorithm
- https://en.wikipedia.org/wiki/Iterative_closest_point
- https://andrewjkramer.net/intro-to-lidar-slam/
- https://andrewjkramer.net/lidar-odometry-with-icp/
- https://github.com/1988kramer/intel_dataset
- https://github.com/tomhsu1990/Iterative-Closest-Point-ICP
- https://www.land-of-kain.de/docs/icp/
- https://www.cs.columbia.edu/~allen/F19/NOTES/slam_pka.pdf
- https://dspace.mit.edu/bitstream/handle/1721.1/119149/16-412j-spring-2005/contents/projects/1aslam_blas_repo.pdf
- https://www.sciencedirect.com/science/article/pii/S0924271621002586?fr=RR-2&rr=8abb9c92c8c82681
After modding your Neato Botvac D85 with btvcbrdg and writing down its IP address as well as login credentials (username and password), you can immediately run the desktop version via gradle desktopRun -DmainClass=MainKt --quiet
and enter your specific information in the Settings
to get started. Alternatively you can create a packaged version of the app via gradle packageDistributionForCurrentOS
and install that - the final binary will be placed under composeApp/build/compose/binaries/main/deb
. To run it as an Android app you can either just run a debug
build in Android Studio's inbuilt emulator, create an Android package by selecting debug
under Build/Select Build Variant
and then running Build App Bundle(s) / APK(s)/Build APK(s)
or build a fully-secure release
build with your own signing keys via Build/Generate Signed App Bundle / APK
.
- Convert
.png
to.ico
viaconvert file.png -define icon:auto-resize=256,64,48,32,16 file.ico
. - Convert
.png
to.icns
viaconvert file.png file.icns
. - If the app throws a
ClassNotFoundException
, see this section in the native distributions tutorial.