Skip to content

Latest commit

 

History

History
116 lines (80 loc) · 2.65 KB

How_to_install_ros.md

File metadata and controls

116 lines (80 loc) · 2.65 KB

How to install ros

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.

  1. 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'

  1. 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 -

  1. before install, update apt
$ sudo apt update

  1. 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

  1. 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

  1. 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

Test after installing ros (turtleim)


  1. implement roscore
    Open the terminal and execute the roscore command. Then the roscore governing the system is implemented.

    $ roscore
    
  2. 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
    
  3. 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.