Code Monkey home page Code Monkey logo

ros1-installation's Introduction

ROS1 Melodic Installation for Ubuntu 18.04/20.04

  • targets: ROS 1 (Melodic) Installation and Implementation.

Installation Options

ROS Kinetic Kame ROS Melodic Morenia ROS Noetic Ninjemys
Release Date May, 2016 May, 2018 May, 2020
Supported Date April, 2021 May, 2023 May, 2025
Ubuntu Version Minimum Required Not recommended to install Ubuntu 18.04 Ubuntu 20.04

Installation of ROS Melodic

  1. Setup your sources.list

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    
  2. Set up your 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 -
    
  3. Installation

    sudo apt update
    
  • Desktop-Full install: (Recommended)

    # Included ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators and 2D/3D perception.
    sudo apt install ros-melodic-desktop-full
    
  • Desktop install:

    # Included ROS, rqt, rviz, and robot-generic libraries.
    sudo apt install ros-melodic-desktop
    
  • ROS-Base: (Bare Bones):

    # Included ROS package, build, and communication libraries. No GUI tools.
    sudo apt install ros-melodic-ros-base
    
  1. Individual package

    sudo apt install ros-melodic-PACKAGE
    apt search ros-melodic # To find available packages, use this command.
    
  2. Environment setup

    echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  3. Install dependencies for building packages

    sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
    
  4. Initialize rosdep

    sudo apt install python-rosdep
    sudo rosdep init
    rosdep update
    
  5. Check the current ROS environment

    # melodic (ROS1)
    printenv | grep ROS
    

ROS 1 Architecture

  • Master

  • Node

  • Topic

ROS Test

  1. ROS Master

    # terminal 1
    roscore 
    
  2. ROS Subscriber

    # terminal 2
    rosrun turtlesim turtlesim_node
    
  3. ROS Publisher

    # terminal 3
    rosrun turtlesim turtle_teleop_key
    
  4. List every running Topics

    rostopic list
    
  5. Check detail information of single Topic

    rostopic info {topic_name}
    
  6. Display Nodes structure of ROS Master

    rqt_graph
    

Implementation of ROS Melodic

Implementation - ROS workspace create

  1. ROS 1 Melodic environment setup

    source /opt/ros/melodic/setup.bash
    
  2. Create a workspace

    cd
    mkdir -p ~/catkin_ws/src
    
  3. Make workspace

    cd catkin_ws
    catkin_make
    
  4. Source this folder as ROS workspace

    source devel/setup.bash
    

Implementation - ROS package create

  1. Create a package

    cd src
    
    # catkin_create_pkg {folder name} {depend}
    catkin_create_pkg test rospy
    
    cd ..
    catkin_make
    
  2. Open new terminal, check workspace & package

    . ~/catkin_ws/devel/setup.bash
    roscd test/
    

Implementation - ROS publisher & subscriber create

  1. Clone the example code

    git clone https://github.com/ycpranchu/ros1-installation.git
    
    cp ros1-installation/src/helloworld.py src/helloworld.py
    cp ros1-installation/src/helloworld_listener.py src/helloworld_listener.py
    
  2. ROS Master

    # terminal 1
    roscore 
    
  3. Create the publisher Node

    # terminal 2
    . ~/catkin_ws/devel/setup.bash
    roscd test/src
    chmod +x helloworld.py
    rosrun test helloworld.py
    

  4. Create the subscriber Node

    # terminal 3
    . ~/catkin_ws/devel/setup.bash
    roscd test/src
    chmod +x helloworld_listener.py
    rosrun test helloworld_listener.py
    

  5. List the current Topic

    rostopic list
    

  6. Display Nodes structure by GUI tool

    rqt_graph
    

Official Document

ros1-installation's People

Contributors

ycpranchu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.