The Dancebots Editor allows creating choreographies for Dancebots, which are small and inexpensive differential drive robots that can move and blink their eight LEDs. They are designed to be built from scratch by children, see here for more information.
The editor works as follows:
Install CMake 3.15 or above.
cmake
's bin
folder to the PATH
environment variableInstall Visual Studio Community
Desktop development with C++
workload, see here for instructionsInstall Qt 5.12.11 LTS. The easiest is to use the online installer. Take note of the installation directory as you will need it later on.
MSVC 2017 64-bit
versionInstall Git. The commands in the following steps are run in the Git Bash
.
Clone the repository and update submodules:
git submodule update --init --recursive
Navigate to the DanceBotsEditor
directory and create a build
directory:
cd DanceBotsEditor\
mkdir build
Navigate to the build
directory, configure for release:
cd build\
cmake -DCMAKE_PREFIX_PATH=C:\path\to\Qt\5.12.11\msvc2017_64\ -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" ..
You may need to update the generator flag (-G) depending on the Visual Studio version that you are using. To check what generators are available, run cmake -G
.
The build
folder should now contain a Visual Studio solution (.sln) and project files. You can build the project using the Visual Studio IDE or command line.
a. Using the Visual Studio IDE, open the dancebotsEditor.sln
file and build the dancebotsEditor
project in Release
and 64-bit (x64).
b. To build on the command line using x64 Native Tools Command Prompt for VS 2019
(or whatever Visual Studio version you are using), navigate to DanceBotsEditor\build\gui\
and run:
msbuild dancebotsEditor.vcxproj /p:Configuration=Release /p:Platform=x64 /m
c. To build on the command line using PowerShell
, run:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe .\dancebots_gui.sln /p:Configuration=Release /p:Platform=x64 /m
You may need to edit the path depending on the Visual Studio version that you are using.
Navigate to the deployment folder:
cd DanceBotsEditor\build\gui\Release\
Run the Qt deployment tool on the executable, pointing it to the QML folder, and adding some flags:
C:\path\to\Qt\5.12.11\msvc2017_64\bin\windeployqt.exe .\dancebotsEditor.exe --qmldir ..\..\..\gui --no-translations --release
This adds all necessary Qt .dll
and QML
files to the deployment folder.
Copy the following x64 .dll
files from the Visual Studio redistributable subfolder to the deployment folder so that the users do not need to install the redistributable package:
cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.24.28127\x64\Microsoft.VC142.CRT\msvcp140.dll' .
cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.24.28127\x64\Microsoft.VC142.CRT\vcruntime140.dll' .
cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.24.28127\x64\Microsoft.VC142.CRT\vcruntime140_1.dll' .
Your deployment folder can now be shared with other users.
Expert If you want to generate an MSI installer, this can be done using a Python script that is copied to the gui
folder in the build folder. Install the WIX Toolset, and then generate the installer with the following steps from the gui
folder:
python .\generateWix.py
candle.exe .\dancebots.wxs
light.exe -ext WixUIExtension .\dancebots.wixobj
The script will just create an installer with the exact same folder structure that you have in the Release
folder of the gui
folder. So you may add additional files there that will be packaged with the installer, too.
Install Xcode:
xcode-select --install
If that fails, follow the instructions here.
Install CMake 3.15 or above. The easiest is to use Homebrew:
brew install cmake
Install Qt 5.12.11 LTS. The easiest is to use the online installer. Take note of the installation directory as you will need it later on.
Clone the repository and update submodules:
git submodule update --init --recursive
Navigate to the DanceBotsEditor
directory and create a build
directory:
cd DanceBotsEditor/
mkdir build
Navigate to the build
directory, configure for release, and build the project:
cd build/
cmake -DCMAKE_PREFIX_PATH=/path/to/Qt/5.12.11/clang_64/ -DCMAKE_BUILD_TYPE=Release ../
make -j2
To generate a macOS app and DMG file, go to the gui/mac_os_rc
directory and run the deploy.sh
script.
usage: deploy.sh <build-dir> <qt-bin-dir> <qml-dir>
Deploy app for macOS
positional arguments:
build-dir cmake build directory
qt-bin-dir QT bin directory
qml-dir QML directory
For example:
cd gui/mac_os_rc/
./deploy.sh ../../build/ ~/Qt/5.12.11/clang_64/bin/ ../
The script will create Dancebots Editor.app
and Dancebots Editor.dmg
in your build
directory.
Install build dependencies:
sudo apt-get install build-essential libpulse-dev libgl1-mesa-dev
Install CMake 3.15 or above. The easiest is to use the package manager:
sudo apt-get install cmake
Install the Qt 5.12.11 LTS Desktop gcc 64-bit component. The easiest is to use the online installer. Take note of the installation directory as you will need it in the Build step.
Clone the repository and update submodules:
git submodule update --init --recursive
Navigate to the DanceBotsEditor
directory and create a build
directory:
cd DanceBotsEditor/
mkdir build
Navigate to the build
directory, configure for release, and build the project:
cd build/
cmake -DCMAKE_PREFIX_PATH=/path/to/Qt/5.12.11/gcc_64 -DCMAKE_BUILD_TYPE=Release ../
make -j2
The dancebotsEditor
binary will be located in the build/gui
directory.
By default, the left-channel plays audio and the right-channels plays data. However, in some cases it may be necessary to swap audio and data channels, e.g. #62. To do this, create a config.ini
file alongside the executable. In the .ini
file, write:
[audio]
swapChannels=True
If there is no config.ini
file, the default channel order will be used.
We are using cpplint
for static code analysis, and therefore (roughly) follow the Google C++ Style Guide.
We cannot follow the Google naming style to the letter due to naming restrictions by Qt (lower-case starting signals, upper-case enums). Therefore, we use the following naming convention
Element | Example | Comment |
---|---|---|
Variable | fileName |
camelCase |
Member Variable | mFileName |
m + CamelCase |
Constant | fileName |
like variable |
Enum | WriteOnly |
CamelCase |
Class | FileHandler |
CamelCase |
Files | file_handler.[h\|cc] |
lower_case + file ending |
are two spaces.
Use following template:
/**
\brief Calculate convolution of two signals.
Some more detailed description or an example goes here.
\param[in] Signal A
\param[in] Signal B
\param[out] Convolution A * B
\return Whether the operation was successful (0) or not (1).
*/
Use define guards following Google Style minus the project name, i.e. for the header file audio_file.h
in folder DanceBotsEditor/src
, use
#ifndef SRC_AUDIO_FILE_H_
#define SRC_AUDIO_FILE_H_
#endif // SRC_AUDIO_FILE_H_
The GUI source code is distributed under the terms of the GNU General Public License 3.0. See the LICENSE file for more information.
The Dancebots hard- and software was originally developed by Raymond Oung and Philipp Reist during their PhD at the Institute for Dynamic Systems and Control for use in the Sportferienlager Fiesch of the City of Zürich.
You can find more hardware information in the electronics and firmware repository, and more general info on the Dancebots website.
The workshop's continued existence is due to the educational outreach program mint & pepper at the Wyss Zurich.
The Dancebots GUI was developed by Philipp Reist, Robin Hanhart, and Raymond Oung.
We are grateful to the developers of the following open-source libraries. For the libraries' licenses refer to the file LICENSE_3RD_PARTY, or the submodule repositories in the lib folder and the Qt open-source licensing info.
Refer to the links below or contact us if you wish to obtain any of the libraries' source code.
Library | Authors | License |
---|---|---|
Qt Toolkit | The Qt Company Ltd. and other contributors | GNU LGPL 3.0 |
QM Vamp Plugins | Queen Mary, University of London | GNU LGPL 2.0 |
TagLib | Scott Wheeler et al. | GNU LGPL 2.1 and MPL 1.1 |
libsndfile | Erik de Castro Lopo et al. | GNU LGPL 2.1 |
kissfft | Mark Borgerding | BSD 3-Clause |
LAME | List of Developers | GNU LGPL 2.0 |
Google Test | Google Inc. | BSD 3-Clause |