Basic Tools & ROS Installation
Installation of ROS on Ubuntu
After setting up the ubuntu operating system on your pc, following commands has to be run on your command prompt to upgrade and download the requirements on your ubuntu os for the ROS.
To update your operating system to the better version, the following command has to be run in the command prompt.
sudo apt-get update && sudo apt-get upgrade
Clock time setting
After dual booting the pc, you will encounter the problems with your time and date configurations. Run the following command to rectify and overcome the issue.
timedatectl set-local-rtc 1 –adjust-system-clock
Now, the following commands have to be run to install the terminator on to the Ubuntu operating system. The terminator is used to open the multiple commands prompts to run the multiple nodes in the ROS programming.
sudo add-apt-repository ppa:gnome-terminator
sudo apt-get install terminator
Now, the following commands will help you to download the ide to run your codes on the ROS ecosystem. These commands will install the Sublime Text IDE.
wget -qO – https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add –
echo “deb https://download.sublimetext.com/ apt/stable/” | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
Now, with the following command, you can install the most necessary Linux packages like compilers to run your future codes.
sudo apt-get install libavcodec-dev libsdl1.2-dev xsltproc libbullet-dev libsdl1.2-dev libgoogle-glog-dev protobuf-compiler python-wstool
You need to install the Gazebo7 package. This package will provide the simulation required in the ROS ecosystem.
To, install Gazebo in Ubuntu 16.04 execute the following command
sudo apt-get install gazebo7 libgazebo7-*
To install the Arduino IDE in the ubuntu run the following command
Now, the last step to install is the git by running the following command
sudo apt-get install git
ROS Installation Requirements
Now, the installation of the ROS packages has to be done along with the ROS Kinetic.
Run the following command in the command prompt to install the setup sources required for ROS
sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’
Now run the following command to add the key
sudo apt-key adv –keyserver ‘hkp://keyserver.ubuntu.com:80’ –recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Now the following command has to be used to update the packages
sudo apt-get update
Now, install the ROS Kinetic full version by running the below command
sudo apt-get install ros-kinetic-desktop-full
Now the ROS dependencies has to be enabled with the following set of commands
sudo rosdep init
The ROS environment has to be setup with the following commands
printf “source /opt/ros/kinetic/setup.bash” >> ~/.bashrc
Now, the following set of commands has to be run to install Python and other ROS packages
sudo apt-get install python-rosinstall
sudo apt install python-catkin-tools
sudo apt-get install ros-kinetic-tf-*
sudo apt-get install ros-kinetic-pcl-msgs ros-kinetic-mav-msgs ros-kinetic-mavros ros-kinetic-octomap-* ros-kinetic-geographic-msgs libgeographic-dev
The final step of creating the Catkin Workspace
mkdir -p src
printf “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc
This completes the basic setup of the ROS packages and installations required to get started with the ROS Simulations.