This software is for controlling the cable driven parallel robot I built for my house. It uses DARTT over UDP to communicate with the actuators, which are using ESP32 bridges to provide networked communication to each of the actuators.
The software uses UDP sockets to communicate with the actuators. This communication model should work well for distributed DARTT actuators - this software serves as a proof of concept for this architecture.
Clone with submodules:
git clone --recurse-submodules <repo-url>
cd spooler-controllerIf you already cloned without --recurse-submodules:
git submodule update --init --recursiveInstall dependencies:
sudo apt install build-essential cmake libsdl2-dev libgl-devBuild:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)Run:
./build/spooler_controllerUses the vendored SDL2 SDK in external/SDL/. Open in Visual Studio or build with CMake:
cmake -B build
cmake --build build --config Release
Building for Android requires some one-time setup. You don't need Android Studio installed, but you do need the SDK and NDK.
Download the "Command line tools only" package from https://developer.android.com/studio#command-line-tools-only
Create a directory for the Android SDK and unpack the tools into it:
mkdir -p ~/android-sdk/cmdline-tools
unzip commandlinetools-linux-*.zip -d ~/android-sdk/cmdline-tools
mv ~/android-sdk/cmdline-tools/cmdline-tools ~/android-sdk/cmdline-tools/latestAdd to your ~/.bashrc or ~/.zshrc:
export ANDROID_HOME=~/android-sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-toolsThen reload your shell (source ~/.bashrc).
sdkmanager --install "platform-tools" "platforms;android-34" "ndk;26.1.10909125" "build-tools;34.0.0" "cmake;3.22.1"Accept the licenses when prompted:
sdkmanager --licensesThe Gradle build needs to know where your SDK lives. Create android/local.properties:
echo "sdk.dir=$ANDROID_HOME" > android/local.propertiesThis file is gitignored since the path is machine-specific.
Create the gradlew script if not present using:
cd android
gradle wrapperThen from within the android directory, build using:
./gradlew assembleDebugThe first build will take a while because Gradle downloads its own dependencies and compiles SDL2 + the entire project from source for each target architecture (arm64, x86_64).
The APK will be at:
android/app/build/outputs/apk/debug/app-debug.apk
Connect your phone via USB with USB debugging enabled (Settings > Developer options > USB debugging), then:
adb install app/build/outputs/apk/debug/app-debug.apkTo see logs from the app:
adb logcat -s SDL/APP:V- "SDK location not found": You forgot step 3. Create
android/local.properties. - NDK not found: Make sure the NDK version installed by
sdkmanagermatches what Gradle expects. Runsdkmanager --list --installedto check. - Build fails with
linux/if_packet.herror: The CMake Android block should defineTCS_MISSING_AF_PACKETautomatically. If not, clean and rebuild:./gradlew clean assembleDebug - App crashes on launch: Check
adb logcatfor the backtrace. Make sure your device supports OpenGL ES 3.0 (virtually all devices from 2015+).