Installing ROS1 Melodic Morenia

Installing ROS1 Melodic Morenia (Ubuntu 18.04 / Mint 19.3)

Melodic Morenia (a.k.a. Melodic) is a ROS1 distro -- think a version of ROS1. You can see the full list of ROS1 distros here (http://wiki.ros.org/Distributions). A little bit of background, ROS1 Melodic was released on May 23rd, 2018 and will be supported until May 2023. For the latest version of ROS1, Noetic Ninjemys, look at the "Installing ROS1 Noetic Ninjemys" below.

In this section, we'll go through a step-by-step process of installing ROS1 Melodic on our R1mini. The official Wiki ROS instructions can be found here: http://wiki.ros.org/melodic/Installation/Ubuntu. The code shown below is also taken from the official instructions.

In terminal, run the below code. This will setup your computer to accept software from packages.ros.org.

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

Then, to make sure your Debian package index is up-to-date, run the below code in terminal.

$ sudo apt update

Now, we install Melodic. Enter the below code in terminal to download ROS1 Melodic.

$ sudo apt install ros-melodic-desktop-full

Next, we will setup our environment. For convenience, we will add some code to our bash script so that it will automatically add our ROS environment variables each time we launch a new shell.

It is recommended that you enter your bashrc file using an editor, the below guide will be using Sublime Text. To install Sublime Text on your SBC, go to "Other Helpful Software - Sublime Text"

Enter the below code to open the bashrc file in Sublime Text and add the next line at the bottom of the .bashrc file.

$ nano ~/.bashrc
source /opt/ros/melodic/setup.bash

Next, install dependencies for building ROS packages.

$ sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

Next, we initialize rosdep. This enables us to esaily install system dependencies.

$ sudo rosdep init
$ rosdep update

Installing R1mini package for ROS1 Melodic

Enter the below line in terminal to clone the source code for the R1mini. Remember to do this within your workspace.

$ git clone https://github.com/PinkWink/omo_r1mini

Next, we download our dependencies. Enter the below line in terminal to download all dependencies needed to run the R1mini. Note, despite how the command line input is shown below, all the below code should be entered in one line in the command line.

sudo apt-get install ros-melodic-tf ros-melodic-joy \ 
ros-melodic-teleop-twist-joy \
ros-melodic-teleop-twist-keyboard \
ros-melodic-laser-proc ros-melodic-rgbd-launch \
ros-melodic-depthimage-to-laserscan \
ros-melodic-rosserial-arduino ros-melodic-rosserial-python \
ros-melodic-rosserial-server ros-melodic-rosserial-client \
ros-melodic-rosserial-msgs ros-melodic-amcl \
ros-melodic-map-server ros-melodic-move-base \
ros-melodic-urdf ros-melodic-xacro ros-melodic-usb-cam \
ros-melodic-compressed-image-transport \
ros-melodic-rqt-image-view ros-melodic-gmapping \
ros-melodic-navigation ros-melodic-interactive-markers \
ros-melodic-ar-track-alvar ros-melodic-ar-track-alvar-msgs 

And we're done! Dive right in to "Running R1mini"!

Installing on Jetson Nano

The below instructions are for the R1mini ROS1 Melodic package with Jetpack 4.5 and OpenCV 3.4

Use the link below to download the image file for Jetson Nano-equipped R1mini: https://www.dropbox.com/s/apjublred8wzxyy/R1mini_JetsonNano.img?dl=0

It is recommended that you use an image flashing program to burn the image to the 32GB SD card. The brief below tutorial uses Balena Etcher (https://www.balena.io/etcher/).

If you would like to run YOLOv3, follow the below video tutorial to delete OpenCV 4 from Jetpack 4.5 and download OpenCV 3.4.

Installing on Raspberry Pi 4

Supplemetary Resources

Last updated