Installation of ROS distro Melodic in Ubuntu 18.04
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