Installation of ROS distro Melodic in Ubuntu 18.04

Mayank SharmaMayank Sharma
3 min read

ROS (Robot Operating System) Distro, short for "Distribution," refers to a specific release version of ROS. ROS is not a single software package but a collection of tools, libraries, and conventions for developing robotic software. These releases are named after animals in alphabetical order and are typically used to ensure compatibility and consistency across the ROS ecosystem.

Each distro introduces new features, improvements, and updates to existing packages. When working with ROS, it's essential to use the distro that is best suited for your project and ensures compatibility with the packages and libraries you intend to use.

To add public key for the ROS repository , you can add the ROS key to your system using the following commands:

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

This command fetches the missing key and adds it to your system. After that, you can try updating again:

sudo apt update

Now added the ROS repository to your system and make sure your Debian package index is up-to-date:

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

Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators and 2D/3D perception

install ros melodic using command:

sudo apt install ros-melodic-desktop-full

Desktop Install: ROS, rqt, rviz, and robot-generic libraries using command:

sudo apt install ros-melodic-desktop

To find that whether the ros melodic packages are installed or not:

apt search ros-melodic

Environment setup

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched for this we have to add the source file in the hidden file of linux which is executed for every interval of time. This file is .bashrc.

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

If you just want to change the environment of your current shell and instead if you don't want to permanent then you have to execute the command manually

source /opt/ros/melodic/setup.bash

Dependencies for building packages

Up to now you have installed what you need to run the core ROS packages. To create and manage your own ROS workspaces, there are various tools and requirements that are distributed separately. For example, ros install is frequently used command-line tool that enables you to easily download many source trees for ROS packages with one command.

To install this tool and other dependencies for building ROS packages, run:

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

Initialize rosdep

Before you can use many ROS tools, you will need to initialize rosdep. Rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS. If you have not yet installed rosdep, do so as follows.

sudo apt install python-rosdep

With the following, you can initialize rosdep.

sudo rosdep init
rosdep update

I hope you guys enjoys the blog do share and like it

want to connect with me ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

My Contact Info:

๐Ÿ“ฉEmail:- mayank07082001@gmail.com

LinkedIn:- linkedin.com/in/mayank-sharma-devops

10
Subscribe to my newsletter

Read articles from Mayank Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mayank Sharma
Mayank Sharma

๐Ÿ”น๐Ÿ”น Enter the world of Maya Hey everyone This is Mayank Sharma , a disciplined ,openminded ,enthusiastic & highly dedicated guy for achieving the excellence in life. For me learning is a never ending process, I believe in ๐‚๐จ๐ง๐ญ๐ข๐ง๐ฎ๐จ๐ฎ๐ฌ ๐‹๐ž๐š๐ซ๐ง๐ข๐ง๐  & ๐‚๐จ๐ง๐ญ๐ข๐ง๐ฎ๐จ๐ฎ๐ฌ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ . My goal is to be a successful Professional Engineer by hard work through my knowledge, skills & commitment which will help me grow, explore and excel along with a great team . With a natural curiosity and a talent for problem-solving, I am constantly exploring new ways to innovate the things and improve processes. Mail me ๐Ÿ‘‰ mayank07082001@gmail.com ๐Ÿ”น๐Ÿ”น I am persuing B.Tech in information technology with the specialisation of Artificial Intelligence and robotic from M.I.T.S Gwalior (M.P) . I'm passionate about learning cutting edge technologies & implement them to solve real world problems. I have devoted my time for them & gained experience in the following tools & technologies . ๐Ÿ“Œ ๐Ž๐ฉ๐ž๐ซ๐š๐ญ๐ข๐ง๐  ๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ : Wษชษดแด…แดแดกs, Cแด‡ษดแด›OS, Rแด‡แด…Hแด€แด›,Fedora,Ubuntu ๐Ÿ“Œ ๐‹๐š๐ง๐ ๐ฎ๐š๐ ๐ž๐ฌ : Pสแด›สœแดษด, Sสœแด‡สŸสŸ Sแด„ส€ษชแด˜แด›ษชษดษข, c++, java ๐Ÿ“Œ ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ ๐„๐ง๐ ๐ข๐ง๐ž : Dแดแด„แด‹แด‡ส€, CRI-O, openshift ๐Ÿ“Œ ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ ๐Œ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐“๐จ๐จ๐ฅ๐ฌ : Kแดœส™แด‡ส€ษดแด‡แด›แด‡s ๐Ÿ“Œ ๐€๐ฎ๐ญ๐จ๐ฆ๐š๐ญ๐ข๐จ๐ง ๐“๐จ๐จ๐ฅ๐ฌ : Aษดsษชส™สŸแด‡, Gษชแด›/Gษชแด›Hแดœส™ ๐Ÿ“Œ ๐‚๐ฅ๐จ๐ฎ๐ ๐‚๐จ๐ฆ๐ฉ๐ฎ๐ญ๐ข๐ง๐  ๐๐ฅ๐š๐ญ๐Ÿ๐จ๐ซ๐ฆ : AWS(EC2,s3,EBs,vpc,loadbalancers,Autosg,rds,cloudwatch,route53, lamda , EFS, snapshot, serverless, EKS) ๐Ÿ“ŒDATABASE : MongoDB, Mysql Also I have worked on Wแด‡ส™ Dแด‡แด แด‡สŸแดแด˜แดแด‡ษดแด›. I enjoy working on new ideas and helping others in these areas. ๐Ÿ”น๐Ÿ”น Apart from being a technology enthusiast, travelling & photography has remained my constant passion. I always keep a right attitude & try to maintain positive vibe in every situation. I also spend time in playing Cricket & Football. Hence I understand the importance of team play & responsibility of a team player very well. Hobbies: โœจI am very interested in cyber security . whatever I see I try to find out the loopholes in it and then try to hack it or trying that how can i breach / break the security โœจ I love to see cricket (IPL) also very much interested in playing cricket . โœจI also love watching various tv and movie series, Top3 is Money heist, Gangs of wasseypur and comedy movies(like hera pheri) and college related webseries etc.