Skip to content

Latest commit

 

History

History
89 lines (64 loc) · 2.13 KB

installing_ros_20_04.md

File metadata and controls

89 lines (64 loc) · 2.13 KB

Install ROS and Setup Catkin

In this tutorial we are using Ubuntu 20.04 and ROS Noetic

Code blocks are meant to be typed in Terminal windows. "Control+Alt+T" opens a new Terminal window.

1. Install ROS

  • Do Desktop-full Install
  • Follow until Step 1.7 at the end of the page

First, install ROS Noetic using the following instructions: http://wiki.ros.org/noetic/Installation/Ubuntu

2. Set Up Catkin workspace

We use catkin build instead of catkin_make. Please install the following:

sudo apt-get install python3-wstool python3-rosinstall-generator python3-catkin-lint python3-pip python3-catkin-tools
pip3 install osrf-pycommon

Then, initialize the catkin workspace:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init

3. Dependencies installation

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

4. Clone IQ Simulation ROS package

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).

run the following to tell gazebo where to look for the iq models

echo "GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$HOME/catkin_ws/src/iq_sim/models" >> ~/.bashrc

5. Build instructions

Inside catkin_ws, run catkin build:

cd ~/catkin_ws
catkin build

update global variables

source ~/.bashrc