Video Tutorial at https://youtu.be/EmIjedzHwzI
In this tutorial we are using Ubuntu 18.04 and ROS Melodic
Code blocks are meant to be typed in Terminal windows. "Control+Alt+T" opens a new Terminal window.
- Do Desktop-full Install
- Follow until Step 1.7 at the end of the page
First, install ROS Melodic using the following instructions: http://wiki.ros.org/melodic/Installation/Ubuntu
We use catkin build
instead of catkin_make
. Please install the following:
sudo apt-get install python-wstool python-rosinstall-generator python-catkin-tools
Then, initialize the catkin workspace:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
Install mavros
and mavlink
from source:
cd ~/catkin_ws
wstool init ~/catkin_ws/src
rosinstall_generator --upstream mavros | tee /tmp/mavros.rosinstall
rosinstall_generator mavlink | tee -a /tmp/mavros.rosinstall
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro `echo $ROS_DISTRO` -y
catkin build
Add a line to end of ~/.bashrc
by running the following command:
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
update global variables
source ~/.bashrc
install geographiclib dependancy
sudo ~/catkin_ws/src/mavros/mavros/scripts/install_geographiclib_datasets.sh
cd ~/catkin_ws/src
git clone https://github.com/Intelligent-Quads/iq_sim.git
Our repository should now be copied to ~/catkin_ws/src/iq_sim/
(don't run this line. This is just saying that if you browse in the file manager, you will see those folders).
Inside catkin_ws
, run catkin build
:
cd ~/catkin_ws
catkin build
update global variables
source ~/.bashrc