In this workshop, you'll gain a thorough understanding of ROS 2 as you develop a 2D controller from the ground up for a quadrotor, mastering fundamental concepts along the way.
Workshop Presentation: Workshop ROS 2 slideshow.pdf
Follow the steps on the links below (select the link which corresponds to your operating system):
Also install the colcon build tools:
sudo apt install ros-dev-tools
sudo apt install python3-colcon-common-extensions
- Open the .bashrc file. This file is read by the terminal every time it starts up, and tells your terminal where the programs and libraries are located.
gedit ~/.bashrc
- Tell the .bashrc file where ROS 2 is setup (replace humble by foxy if your are running Ubuntu 20.04LTS)
source /opt/ros/humble/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
source /usr/share/colcon_cd/function/colcon_cd.sh
export _colcon_cd_root=/opt/ros/humble
- To avoid Python warnings, also add the following line to the .bashrc
PYTHONWARNINGS="ignore:easy_install command is deprecated,ignore:setup.py install is deprecated"
export PYTHONWARNINGS
- To make your journey more enjoyable, also add the following line. This will be explained during the workshop
alias s="source ${HOME}/.bashrc"
- For handling how your ROS 2 data flows on the local network, also add these optional lines
export ROS_DOMAIN_ID=0
export ROS_LOCALHOST_ONLY=0
You can read more about this here Domain-ID.
In order to create a workspace/directory where your code will be stored, follow the steps:
- Create the workspace
mkdir drone_ws
- Create the src directory where the code will be placed
cd drone_ws
mkdir src
- Clone this repository inside the src directory
cd src
git clone https://github.com/PegasusResearch/Workshop-ROS2.git
- Compile/Index the code
cd ..
colcon build --symlink-install
- Add the following line to your .bashrc file
source ${HOME}/drone_ws/install/setup.bash
- Close this terminal. Open a new one and test it!
ros2 launch drone_launch simulation.launch.py
- Institute for Systems and Robotics (ISR), a research unit of the Laboratory of Robotics and Engineering Systems (LARSyS).
- Instituto Superior Técnico, Universidade de Lisboa
The work developed by Marcelo Jacinto was supported by Ph.D. grant funded by Fundação para a Ciência e Tecnologia (FCT).




