Getting Started with ROS on Embedded Systems - Getting Started
Getting Started with ROS on Embedded Systems RidgeRun documentation is currently under development. |
Getting Started with ROS on Embedded Systems |
---|
ROS on Embedded Systems Basics |
Getting Started |
C++ User Guide |
Examples |
Basic pipelines |
Performance |
Xavier |
Contact Us |
Introduction
The Robot Operating System (ROS) is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.
Why? Because creating truly robust, general-purpose robot software is hard. From the robot's perspective, problems that seem trivial to humans often vary wildly between instances of tasks and environments. Dealing with these variations is so hard that no single individual, laboratory, or institution can hope to do it on their own.
As a result, ROS was built from the ground up to encourage collaborative robotics software development. For example, one laboratory might have experts in mapping indoor environments, and could contribute a world-class system for producing maps. Another group might have experts at using maps to navigate, and yet another group might have discovered a computer vision approach that works well for recognizing small objects in clutter. ROS was designed specifically for groups like these to collaborate and build upon each other's work, as is described throughout this site.
Installation
The following installation steps were tested on a Jetson TX2, but should apply to any Jetson Platform or Desktop Computer with Ubuntu.
Configure packages sources
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-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt update
Install ROS from packages
You can choose from one of the following options:
1.Desktop-Full Install (Recommended): ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators and 2D/3D perception
sudo apt install ros-melodic-desktop-full
2.Desktop Install: ROS, rqt, rviz, and robot-generic libraries
sudo apt install ros-melodic-desktop
3.ROS-Base: (Bare Bones): ROS package, build, and communication libraries. No GUI tools.
sudo apt install ros-melodic-ros-base
To find available packages, use:
apt search ros-melodic
Configure ROS
Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
To install ROS initializer:
sudo apt-get install python-rosdep -y sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential -y sudo c_rehash /etc/ssl/certs
Then execute:
sudo rosdep init rosdep update
Environment Setup
It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc
Execute ROS
You will need to launch ROS process from a terminal:
roscore
Which will generate an output similar to the following:
nvidia@nvidia-desktop:~$ roscore ... logging to /home/nvidia/.ros/log/5ee9868e-6a1f-11ea-b91d-00044bf25e44/roslaunch-nvidia-desktop-20965.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://nvidia-desktop:39719/ ros_comm version 1.14.4 SUMMARY ======== PARAMETERS * /rosdistro: melodic * /rosversion: 1.14.4 NODES auto-starting new master process[master]: started with pid [20976] ROS_MASTER_URI=http://nvidia-desktop:11311/ setting /run_id to 5ee9868e-6a1f-11ea-b91d-00044bf25e44 process[rosout-1]: started with pid [20987] started core service [/rosout]
To verify ros was correctly launched, from another terminal, while keeping the last one opened, you can run rosnode list
nvidia@nvidia-desktop:~$ rosnode list /rosout