A toolkit for developing applications using MAB Robotics MD motor controllers and actuators.
sudo apt install build-essential git cmake libusb-1.0-0-dev
Package requires w64devkit to build. It can be automatically downloaded and configured using:
launch/buildForWindows.bat
To use CANdle on Windows, one must manually change USB driver for CANdle, to WinUSB:
- Download and run Zadig 2.8
- Options -> List all devices
- Select
MD USB-TO-CAN
from drop down menu - Changed driver type to
libusb-win32
- Click
Replace Driver
- Wait for installation to finish.
Building for Linux system:
./launch/buildForLinux.sh
(See: Installing docker on Linux(ubuntu) )
Run:
./launch/runDockerForLinux86-64.sh
./launch/runDockerForWindows.sh
Using powershell run
./launch/buildForWindows.bat
Dependencies are listed inside pyproject.toml
To compile for the current system run build command inside repository using your preferred python binary, for eg. python -m build
.
To compile against multiple versions of libc and python use:
./launch/pythonBuildWheel.sh
To install use pip install on the desired wheel, for eg. python -m pip install ./dist/pycandlemab-1.7.0-cp310-cp310-linux_x86_64.whl
for CPython 3.10, glibc and x86-64 arch.
Best way to include CANdle-SDK in your code is to include it as a git submodule and include it in you CMakeLists.txt like this:
git submodule add [email protected]:mabrobotics/CANdle-SDK.git
git submodule update --init --recursive
You can than use candlelib as a library to link against your executables.
Below examplary CMakeLists.txt:
cmake_minimum_required(VERSION 3.15)
project(myCandleProject)
add_subdirectory(CANdle-SDK) # added as a submodule
add_executable(myCandleProject main.cpp)
target_link_libraries(myCandleProject candle)
For more information check out our documentation page here.