Tutorials - Chroma-CITI/DANCERS GitHub Wiki
Installation
DANCERS can either be installed in a Docker container or compiled from source. If you wish to use the virtualization variation, you must compile it from source.
Docker container
Compile from source
The easiest way to compile DANCERS is with the colcon
tool from ROS2.
- Install ROS2 (DANCERS was developed and tested with ROS2 Humble)
- Install dependencies
sudo apt update && apt install -y --no-install-recommends git cmake wget lsb-release gnupg libqt5gui5 ubuntu-gnome-desktop g++ python3 freeglut3-dev tmux nano gdb
- Install ns-3 (DANCERS was developed and tested with ns-3.37)
wget https://www.nsnam.org/release/ns-allinone-3.37.tar.bz2 && tar -jxvf ns-allinone-3.37.tar.bz2
cd ns-allinone-3.37/ns-3.37 && ./ns3 configure --prefix=/usr/ns3 && ./ns3 install
rm ns-allinone-3.37.tar.bz2
- If you wish to use Gazebo, install it (DANCERS was developed and tested with Gazebo Garden and Harmonic)
curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg &&\
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null &&\
apt update && apt install -y \
gz-harmonic
- If you wish to use the PX4 Autopilot, install it (DANCERS was developed and tested with PX4 1.14)
git clone https://github.com/PX4/PX4-Autopilot.git --recursive --branch release/1.14
# If you want to use Gazebo Harmonic with the PX4 Autopilot, you need this commit, but it is not needed for Gazebo Garden:
git fetch https://github.com/jmackay2/PX4-Autopilot.git fix_gazebo_harmonic:fix_gazebo_harmonic
git cherry-pick bf4408b772f2bc398a5398dabd4bfa67a96ec1b5
cd PX4-Autopilot
./Tools/setup/ubuntu.sh
make px4_sitl_default
# Install MicroXRCE-DDS Agent
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git && \
cd Micro-XRCE-DDS-Agent && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install && \
ldconfig /usr/local/lib/
- Setup your
LD_LIBRARY_PATH
and.bashrc
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/ns3/lib" >> ~/.bashrc && \
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc && \
echo "source /home/$USERNAME/sim_ws/install/setup.bash" >> ~/.bashrc
- Finally, install DANCERS
git clone https://github.com/Chroma-CITI/DANCERS sim_ws --recursive
cd sim_ws
colcon build --cmake-args -DCMAKE_CXX_FLAGS='-w'
export GZ_SIM_RESOURCE_PATH=/home/$USERNAME/PX4-Autopilot/Tools/simulation/gz/models
export ROS_WS=/home/$USERNAME/sim_ws