ROS and Gazebo

Ros and Gazebo Installation for Ubuntu 18.04LTS

Installing Ros Melodic

Setup your computer to accept software from packages.ros.org.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

Setup your keys

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Making sure your Debian package is upto-date

sudo apt update
sudo apt upgrade

Install ROS Melodic

sudo apt install ros-melodic-desktop-full

Setting up your Environment

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Installing Dependencies for the packages

sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

Install pip, toml, git, jupyter-lab.

sudo apt install git
sudo apt-get install python3-pip
pip install toml
pip3 install jupyterlab

Rosdep

PX4 and Mavros

Download this File in your Home Folder

Downloading Firmware

Go to Home Folder to create src.

Sourcing Gazebo through Bashrc

add the following lines at the end of the bashrc

Open new Terminal then

Simulation Example

409B
Open
CMakeLists.txt

Download the top file and paste it in ~/sim_ws/src/takeoff/(there will be a CMakeLists.txt delete and paste this.

offb_node.cpp

Download the above file and paste it in ~/sim_ws/src/takeoff/src/

Now open a new terminal

In a new Terminal

go back to previous terminal and

Tutorials for ROS , PX4 Dev Guide.

Last updated

Was this helpful?