last update 2022 7.25 by Minjae Lee.
last update 2022 7.22 by Minjae Lee.
This manual explain how to install ros melodic in ubuntu.
reference link <- how ti install ros melodic in ubuntu.
- setting sources.list (not 2 line, only 1 command line)
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- setting keys
$ sudo apt install curl # if you haven't already installed curl
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
- before install, update apt
$ sudo apt update
- Install Desktop full (recommand) -> ROS, rqt,rviz,robot-generic libraries, 2D/3D simulators and 2D/3D perception.
-> this command line install main ros library.
$ sudo apt install ros-melodic-desktop-full
- enviroment setting
- Setting to automatically add loss environment variables (Every time a new shell runs)
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
- If you want to modify environmental variables at the current shell.
$ source /opt/ros/melodic/setup.bash
- If you want to use zsh instead of bash,
$ echo "source /opt/ros/melodic/setup.zsh" >> ~/.zshrc
$ source ~/.zshrc
- Dependencies for building packages
- To install too or other loss package building dependencies
$ sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
- Initialize rosdep
$ sudo apt install python-rosdep (Need to initialize before using ROS)
$ sudo rosdep init
$ rosdep update
-
implement roscore
Open the terminal and execute the roscore command. Then the roscore governing the system is implemented.$ roscore
-
Run turtlesim_node in turtlesim package.
Open a new terminal and execute the following command: Then the info is printed on the terminal, and there is a turtle on the blue background.$ rosrun turtlesim turtlesim_node
-
Running turtleneck_teleop_key in turtleneck package.
Open a new terminal and execute the following command: And if you move the direction key at the terminal, the turtle moves.$ rosrun turtlesim turtle_teleop_key
If the above 1-3 works well, the installation is completed well.