Setting Up ROS Robots: Environment Configuration Guide

Ubuntu 18.04 Installation

Creating a Linux Bootable USB Drive

  1. Download the Ubuntu 18.04 ISO image from the official Ubuntu website.
  2. Use a tool like Rufus or Etcher to create a bootable USB drive.
  3. Select the ISO file and target USB drive, then write the image.

Installation Process

  1. Insert the bootable USB drive and restart the computer.
  2. Enter BIOS/UEFI setup (typically by pressing F1, F2, F12, or Delete during boot).
  3. Select the USB drive as the primary boot device.
  4. Choose "Install Ubuntu" from the boot menu.
  5. Select your language and click "Continue".
  6. Choose "Install Ubuntu" alongside Windows or "Erase disk and install Ubuntu" based on your preference.
  7. Create your user account and wait for installation to complete.
  8. Restart the computer and remove the USB drive.

If the system reports low performance during initialization, try creating separate disk partitions.


ROS Melodic Installation

Official Installation Method

Configure your repositories:

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 install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update

Install ROS Melodic:

sudo apt install ros-melodic-desktop-full

Initialize rosdep:

sudo rosdep init
rosdep update

Environment Setup

Add ROS environment variables to your shell configuration:

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Testing the Installation

After installation, verify by running the turtlesim demo:

roscore

In a new terminal:

rosrun turtlesim turtlesim_node

In another terminal:

rosrun turtlesim turtle_teleop_key

Use arrow keys (↑, ↓, ←, →) to control the turtle. The arrow keys control rotation (←, →) and forward/backward movement (↑, ↓).

To visualize the node graph:

rqt_graph

This displays the communication between the teleop_turtle node and the turtlesim node via cmd_vel messages.


Niryo NED Robot ROS Package Installation

Prerequisites

Ensure your system is up to date:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Required System Packages

sudo apt install build-essential sqlite3 ffmpeg

Python Environment Setup

Navigate to your catkin workspace and install Python dependencies:

cd ~/catkin_ws/src
pip install -r requirements_ned.txt
pip install pyyaml rospkg PySide2 jsonpickle

ROS Workspace Configuration

Create the catkin workspace:

mkdir -p catkin_ws_niryo_ned/src
cd catkin_ws_niryo_ned
git clone https://github.com/NiryoRobotics/ned_ros src

Installing ROS Dependencies

Install core ROS packages:

sudo apt install ros-melodic-catkin
sudo apt install python-catkin-pkg python-pymodbus python-rosdistro python-rospkg python-rosdep-modules python-rosinstall python-rosinstall-generator python-wstool

Install Melodic-specific packages:

sudo apt install ros-melodic-moveit ros-melodic-ros-control ros-melodic-ros-controllers ros-melodic-tf2-web-republisher ros-melodic-rosbridge-server ros-melodic-joint-state-publisher-gui
sudo apt install ros-melodic-robot-state-publisher ros-melodic-moveit ros-melodic-rosbridge-suite ros-melodic-joy ros-melodic-ros-control ros-melodic-ros-controllers ros-melodic-tf2-web-republisher

Building the Workspace

cd ~/catkin_ws
catkin_make

Source the environment files:

source /opt/ros/melodic/setup.bash
source ~/catkin_ws/devel/setup.bash

Add these to your ~/.bashrc for persistent configuration:

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

Launching the Robot Visualization

cd ~/catkin_ws/src/ned_ros/niryo_robot_description/launch
roslaunch display.launch

Development Tools Installation

Anaconda Setup

Download Anaconda from the official website and run the installer:

bash ~/Downloads/Anaconda3-*.sh

Configure the PATH in your shell:

vim ~/.bashrc

Add the following line at the end of the file:

export PATH=~/anaconda3/bin:$PATH

Save and exit (ESC, then :wq), then source the configuration:

source ~/.bashrc

Verify the installation:

conda --version

Managing Conda Environments

Activate the base environment:

source activate base

Create a new environment:

conda create -n myenv python=3.8

Activate a specific environment:

source activate myenv

Deactivate the current enviroment:

conda deactivate

PyCharm Installation

Download PyCharm Community from the official JetBrains website:

cd ~/Downloads
tar -xzf pycharm-community-*.tar.gz
sudo mv pycharm-community-* /opt/pycharm
sudo ln -s /opt/pycharm/bin/pycharm.sh /usr/local/bin/pycharm

Launch PyCharm:

pycharm

VSCode Installation

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install code

Launch VSCode:

code

If you encounter dependency issues:

sudo apt-get install -f

Robot Connection

Connect to the Niryo NED robot using SSH:

  • Default username: niryo
  • Default password: robotics
ssh niryo@robot_ip_address

Tags: ROS Robotics Ubuntu Melodic Niryo Ned

Posted on Sat, 09 May 2026 01:27:02 +0000 by jaimec