High-level Matlab API for the crazyswarm project. Wherever possible the naming of classes and methods follows the crazyswarm Python API.
Clone the toolbox to a folder of your choice:
git clone --recursive https://github.com/lis-epfl/crazyswarm-matlab
Open Matlab and follow the steps below.
Add the toolbox to the Matlab path:
addpath(genpath("."))
Generate ROS custom messages in Matlab:
rosgenmsg("custom_msgs")
Depending on your Matlab version this command will display two additional steps you need to take before the custom messages are available in Matlab.
The crazyswarm-matlab toolbox only works in conjunction with the crazyswarm_server
ROS node
of the crazyswarm project. This node is responsible for the communication with the crazyflies.
Visit the crazyswarm documentation
for more details and an instruction on how to launch this node.
The crazyswarm project stores all the information needed to initialize a swarm in a crazyflies.yaml
file. The same approach is used in crazyswarm-matlab to create a Crazyswarm
object. To ensure that
both crazyswarm and crazyswarm-matlab use the same configuration file, we suggest creating a symbolic
link from the crazyswarm-matlab directory to the crazyflies.yaml
in the crazyswarm directory.
Use the following command from the directory of crazyswarm-matlab to do so:
ln -s PATH_TO_CRAZYSWARM/ros_ws/src/crazyswarm/launch/crazyflies.yaml .
- Matlab R2019a or later
- Working installation of crazyswarm