InstallationΒΆ
Crazyswarm runs on Ubuntu Linux in one of the following configurations:
Ubuntu |
Python |
ROS |
20.04 |
3.7 |
Noetic |
18.04 |
2.7 |
Melodic |
For simulation-only operation, Mac OS is also supported. Click the appropriate tab(s) below to see the installation instructions for your desired configuration.
Note
You must set the environment variable $CSW_PYTHON to the name of your Python interpreter
(e.g. python2 or python3)
before building.
Warning
The Windows Subsystem for Linux (WSL) is not supported. You must install Ubuntu either directly on the computer (recommended) or in a VM.
You can write/debug pycrazyswarm scripts on a machine that does not have ROS installed.
On Mac OS, Crazyswarm must run within an Anaconda environment.
On Linux, using Anaconda is optional.
Select your platform from the tabs below:
Set the
$CSW_PYTHONenvironment variable:$ export CSW_PYTHON=[python2 or python3]
Install Anaconda Python 2.7 / 3.7 version (We have tested on version
2019.10).Clone the Crazyswarm git repository:
$ git clone https://github.com/USC-ACTLab/crazyswarm.git
Create the Anaconda environment with your desired Python version:
$ cd crazyswarm $ conda create --name crazyswarm python=[2.7 or 3.7] $ conda env update -f conda_env.yaml
Activate the Anaconda environment:
$ conda activate crazyswarm
Run the build script:
$ ./buildSimOnly.sh
Verify the installation by running the unit tests:
$ cd ros_ws/src/crazyswarm/scripts $ source ../../../devel/setup.bash $ $CSW_PYTHON -m pytest
Set the
$CSW_PYTHONenvironment variable:$ export CSW_PYTHON=[python2 or python3]
Install the dependencies
sudo apt install -y swig lib${CSW_PYTHON}-dev ${CSW_PYTHON}-pip ${CSW_PYTHON} -m pip install pytest numpy PyYAML scipyInstall one or more visualizers for simulation:
(Recommended) $ ${CSW_PYTHON} -m pip install vispy (Alternative) $ ${CSW_PYTHON} -m pip install matplotlib[OPTIONAL] Install ffmpeg if you want to record high-quality videos from the simulator:
$ sudo apt install -y ffmpeg $ ${CSW_PYTHON} -m pip install ffmpeg-pythonClone the Crazyswarm git repository:
$ git clone https://github.com/USC-ACTLab/crazyswarm.git
Run the build script:
$ cd crazyswarm $ ./buildSimOnly.sh
Verify the installation by running the unit tests:
$ cd ros_ws/src/crazyswarm/scripts $ source ../../../devel/setup.bash $ $CSW_PYTHON -m pytest
For real hardware operation, ensure that your platform matches one of the configurations in the table above. Avoid using a virtual machine if possible: they add additional latency and might cause issues with the visualization tools.
If needed, install ROS using the instructions at http://wiki.ros.org/ROS/Installation.
Set the
$CSW_PYTHONenvironment variable:$ export CSW_PYTHON=[python2 or python3]
Install the dependencies
sudo apt install -y ros-[ROS version]-tf ros-[ROS version]-tf-conversions ros-[ROS version]-joy sudo apt install -y libpcl-dev libusb-1.0-0-dev sudo apt install -y swig lib${CSW_PYTHON}-dev ${CSW_PYTHON}-pip ${CSW_PYTHON} -m pip install pytest numpy PyYAML scipyInstall one or more visualizers for simulation:
(Recommended) $ ${CSW_PYTHON} -m pip install vispy (Alternative) $ ${CSW_PYTHON} -m pip install matplotlib[OPTIONAL] Install ffmpeg if you want to record high-quality videos from the simulator:
$ sudo apt install -y ffmpeg $ ${CSW_PYTHON} -m pip install ffmpeg-pythonClone the Crazyswarm git repository:
$ git clone https://github.com/USC-ACTLab/crazyswarm.git
Run the build script:
$ cd crazyswarm $ ./build.sh
Verify the installation by running the unit tests:
$ cd ros_ws/src/crazyswarm/scripts $ source ../../../devel/setup.bash $ $CSW_PYTHON -m pytest
Once you have completed installation, move on to the Configuration section and configure Crazyswarm for your hardware.