It’s convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrcIf you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.
If you just want to change the environment of your current shell, instead of the above you can type:
source /opt/ros/kinetic/setup.bashIf you use zsh instead of bash you need to run the following commands to set up your shell:
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc source ~/.zshrcUp 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, rosinstall is a 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-essentialBefore 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-rosdepWith the following, you can initialize rosdep.
sudo rosdep init rosdep updateThe packages that you installed were built by the ROS build farm. You can check the status of individual packages here.
Now, to test your installation, please proceed to the ROS Tutorials.