Source Install
Previous dependencies
Make sure to have installed ROS 2 via Debian Packages for Humble or Galactic.
After that, make sure you have installed the following dependencies:
sudo apt install git python3-rosdep python3-pip python3-colcon-common-extensions -y
For simulation purposes, please install Gazebo in any of the supported versions to install the necessary dependencies.
Source Installation
For using and installing Aerostack2, your ROS 2 environment must be settled up. If ROS 2 is installed using debian packages you should source the ROS 2 environment before running these steps:
source /opt/ros/<ros2-distro>/setup.bash
A new workspace for Aerostack2 will be created in order to clone the source code and build it. Rosdep will be used to get the binary dependecies for Aerostack2 packages:
mkdir -p ~/aerostack2_ws/src/ && cd ~/aerostack2_ws/src/
git clone https://github.com/aerostack2/aerostack2.git
cd ~/aerostack2_ws
sudo rosdep init
rosdep update
rosdep install -y -r -q --from-paths src --ignore-src
Standard Build
cd ~/aerostack2_ws
colcon build --symlink-install
Build with AS2 CLI
Aditionally, Aerostack2 provides with a CLI that is able to perform Aerostack2 build operation from any directory:
echo 'export AEROSTACK2_PATH=$HOME/aerostack2_ws/src/aerostack2' >> $HOME/.bashrc
echo 'source $AEROSTACK2_PATH/as2_cli/setup_env.bash' >> $HOME/.bashrc && source $HOME/.bashrc
as2 build