Command to put ROS (melodic) in Ubuntu (18.04). Actually I wanted to put kinetic, but it seems that kinetic cannot be put if Ubuntu version is 18.04.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install ros-melodic-desktop-full
apt-cache search ros-melodic
sudo apt-get install python-rosdep
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
source /opt/ros/kinetic/setup.bash
sudo apt-get -y install python-rosinstall
You can check the ROS version by creating a workspace and running roscore. If this can be done, the ROS installation is successful.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
roscore
Recommended Posts