How to install ROS on Ubuntu?

To install ROS on Ubuntu, you can follow these steps:

  1. Add ROS software source: Open the terminal and enter the following command to add the ROS software source to the apt sources.list.
  2. Elevate your privileges to run the command that adds the ROS repository to your sources list.
  3. Set ROS key: Enter the following command in the terminal to set the ROS key:
  4. Add the ROS repository key from the raw GitHub content using curl command.
  5. Update the software package index: Enter the following command in the terminal to update the software package index:
  6. Please run the command “sudo apt update”
  7. Install ROS: Enter the following commands in the terminal to install ROS:
  8. Install the complete version of ROS (including ROS core, common libraries, and tools): $ sudo apt install ros-melodic-desktop-full.
  9. Install the minimal version of ROS (containing only the ROS core, suitable for custom installations): $ sudo apt install ros-melodic-ros-base
  10. Initialize rosdep by entering the following command in the terminal:
  11. Initialize rosdep
    Update rosdep
  12. To set environment variables: Enter the following command in the terminal to configure ROS environment variables:
  13. Add “source /opt/ros/melodic/setup.bash” to the ~/.bashrc file and then run “source ~/.bashrc”.

Now, ROS has been successfully installed on Ubuntu. You can start using ROS by entering the roscore command to launch the ROS core.

bannerAds