Setting up the environment

Good! We have completed the ROS installation. The ROS scripts and executables are mostly installed to /opt/ros/<ros_version>.

To get access to these scripts and executables, the ROS environment variables need to be added to the bash session. We have to source the following bash file for ROS Kinetic:

$ source /opt/ros/kinetic/setup.bash

ROS Melodic requires the following:

$ source /opt/ros/melodic/setup.bash

It's convenient if the ROS environment variables are automatically added to the bash session every time a new shell is launched.

For ROS Kinetic, use the following:

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

For ROS Melodic, use the following: 

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

If we have more than one ROS distribution installed, ~/.bashrc must only source setup.bash for the version we are currently using:

$ source /opt/ros/<ros_version>/setup.bash
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.206