Robot Operating System Software¶
ROS2 Overview¶
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.

ROS2 is the second generation of ROS system in which new technologies and implementations were adopted to better fit Software-defined industrial systems.
ROS2 is built on top of DDS/RTPS as its middleware (RMW), which provides discovery, serialization, and transportation. DDS is an end-to-end middleware that provides features relevant to the ROS systems, such as distributed discovery (not centralized like in ROS 1) and control over different “Quality of Service” options for the transportation.
DDS 1.4 is the industry OMG standard proposed by multiple of vendors as ROS2 implementations:
eProsima’s [Default ROS2 Humble] implementation Fast DDS ,
ADLINK’s implementation OpenSplice
Eclipse’s implementation Cyclone DDS
RTI’s implementation Connext.
RTPS 2.2 (also known as DDSI-RTPS) is the industry OMG interoperable wire-protocol standard used by DDS to communicate over the network.
Intel® Edge Controls for Industrial (Intel® ECI or ECI) provides several hardware-accelerated subsystems and plug & play extensions compatible with the latest ROS2 Humble Hawksbill rosdistro , including:
Motion Control Gateway for IEC-61131 and IEC-61158 (EtherCAT-only) interoperable wire-protocol standards
Grasp Planner with Intel oneAPI for GPU-acceleration
Point-Cloud Library (PCL) optimized oneAPI for GPU-acceleration
Fast Library for Approximate Nearest Neighbors (FLANN) optimized oneAPI for GPU-acceleration
For more information, refer to the official ROS2 Humble documentation
Install Robot Operating System Software¶
ROS is comprised of many elements, some of which require a graphical Desktop Environment to function. The installation of ROS is divided into “Core” components which do not require graphics, and “Desktop” components which require a Linux Desktop environment installation. Follow the sections below based on your application requirements.
Note
ROS2 Humble Hawksbill only redistributes full Deb packages for Canonical Ubuntu* 22.04 (Jammy Jellyfish) and Red Hat Enterprise Linux* 9.3 (Plow) (e.g. Tier1). Consequently, the ECI APT repository redistributes ROS2 Humble Hawksbill full Deb packages for Debian* 11 (Bullseye).
Install ROS2 Core Components¶
ROS2 Core elements do not require a graphical Desktop Environment. You can install the ROS2 Core components from the ECI APT repository. Perform the following steps to install ROS2 Core components:
Setup the ECI APT repository.
Enable Intel® Graphics Compute Runtime Level-Zero and OpenCL™ GPU.
Setup the ROS2 APT repository:
# download the key to system keyring $ sudo -E wget -O- https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo tee /usr/share/keyrings/ros-archive-keyring.gpg > /dev/null # add signed entry to apt sources and configure the APT client to use ROS repository: $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list
Attention
If you are located in the People’s Republic of China, modify the
/etc/hosts
file to directly connect to the raw.githubusercontent server:$ sudo bash -c "echo '185.199.108.133 raw.githubusercontent.com' >> /etc/hosts"
Update the APT sources lists:
$ sudo apt update
Install ROS2 Core components from the ECI meta-package:
$ sudo apt install eci-robotics
Optionally, setup the Intel RealSense2 APT repository as described in Intel® RealSense™ SDK 2.0 guidelines
Note
ECI APT repository redistributes
librealsense2-dkms
Deb packages compatible with the various ECI Linux Intel LTS Kernel.
Install ROS2 Desktop Components¶
If you plan on using any ROS2 “Desktop” components (ex: RViz
) then complete the following steps to setup ROS with graphics:
Install the ROS2 Core components
If your target system does not already have a graphical Desktop Environment, complete the following section to install a graphical Desktop Environment before proceeding further: Install a graphical Desktop Environment
Install ROS2 “Desktop” components of your choice. For example:
$ sudo apt install \ ros-humble-rviz2 \ ros-humble-gazebo-ros \ ros-humble-gazebo-ros-pkgs \ ros-humble-moveit \ ros-humble-moveit-servo \ ros-humble-cartographer-ros\ ros-humble-turtlebot3 \ ros-humble-navigation2 \ ros-humble-nav2-bringup \ ros-humble-desktop
Getting Started with ROS2¶
Setup the Robotic node¶

Install ROS2 Core or ROS2 Desktop components, if not already completed.
Initialize the ROS2 workspace:
$ source /opt/ros/humble/setup.bash
Expected Result:
The script is correctly executed without any “Error” or “Warning” messages being printed.
Run the following command in the same terminal:
$ ros2 --help
Expected Result:
The command executes without any “Error” or “Warning” messages being printed. The command also prints information similar to the following:
root@eci-intel-25d7:~# ros2 --help usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ... ros2 is an extensible command-line tool for ROS 2. optional arguments: -h, --help show this help message and exit Commands: action Various action related sub-commands component Various component related sub-commands daemon Various daemon related sub-commands interface Show information about ROS interfaces launch Run a launch file lifecycle Various lifecycle related sub-commands multicast Various multicast related sub-commands node Various node related sub-commands param Various param related sub-commands pkg Various package related sub-commands run Run a package specific executable security Various security related sub-commands service Various service related sub-commands test Run a ROS2 launch test topic Various topic related sub-commands Call `ros2 <command> -h` for more detailed usage.
Note: The output might differ based on the version of the integrated ROS.
Verify that the required ROS2 packages (such as
ros_core
,launch_ros
, andros2pkg
) exist.$ source /opt/ros/humble/setup.bash $ ros2 pkg list | egrep '(ros2|ros_core|launch_ros)'
The output should be a list similar to the following:
launch_ros ros2action ros2cli ros2component ros2doctor ros2interface ros2launch ros2lifecycle ros2multicast ros2node ros2param ros2pkg ros2run ros2service ros2topic ros_core sros2 sros2_cmake
Add the ROS2 setup script to the
.bashrc
file so that ROS2 is enabled in new terminal sessions:$ echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc $ echo 'export ROS_DOMAIN_ID=31' >> ~/.bashrc $ source ~/.bashrc
Note: If other ROS2 instances are using
ROS_DOMAIN_ID=31
, you may want to changeROS_DOMAIN_ID
to different number (lesser than 255) to avoid conflicts.
ROS2 DDS/RSTP Communication sanity-check¶
Open a terminal, run the following command in the same terminal:
$ ros2 topic pub /chatter std_msgs/String "data: Hello ECI"
Expected Result:
The command is correctly executed without any “Error” or “Warning” messages being printed. The command also prints information similar to the following:
sh-5.0# source /opt/ros/humble/setup.sh sh-5.0# ros2 topic pub /chatter std_msgs/String "data: Hello ECI" publisher: beginning loop publishing #1: std_msgs.msg.String(data='Hello ECI') publishing #2: std_msgs.msg.String(data='Hello ECI') publishing #3: std_msgs.msg.String(data='Hello ECI') publishing #4: std_msgs.msg.String(data='Hello ECI') publishing #5: std_msgs.msg.String(data='Hello ECI') publishing #6: std_msgs.msg.String(data='Hello ECI')
Open a new terminal, and run the following command:
$ ros2 topic echo /chatter
Tip
If you receive a message
WARNING: topic [/chatter] does not appear to be published yet
, verify that the environment variableROS_DOMAIN_ID
has been properly set to the same value in both terminal environments.Expected Result:
The command is correctly executed without any “Error” or “Warning” messages being printed. The command also prints information similar to the following:
sh-5.0# ros2 topic echo /chatter data: Hello ECI --- data: Hello ECI --- data: Hello ECI ---
Simultaneous Localization and Mapping (SLAM)¶
SLAM is a method used for autonomous vehicles that enables map building and localization of a vehicle in that map simultaneously. SLAM algorithms allow the vehicle to map out unknown environments. Engineers use the map information for tasks such as path planning and obstacle avoidance, the features of which are covered in ROS2 navigation stack.
Cartographer is an implementation of SLAM, which has already been integrated with the ROS2 system.

Launch SLAM Sanity Check¶
COMMENT:: May want to update to use: https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/
Install ROS2 Desktop components, if not already completed.
Run a simple ROS2
turtlebot3_cartographer
simulation example:$ ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True
Expected Result:
Cartographer starts correctly.
Note: Since Cartographer is currently in Idle status, it is normal to see warnings/errors. The following is a sample result:
[INFO] [launch]: All log files can be found below /home/root/.ros/log/2020-09-25-04-56-52-691691-intel-rt-corei7-64-14812 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [cartographer_node-1]: process started with pid [14821] [INFO] [occupancy_grid_node-2]: process started with pid [14822] [cartographer_node-1] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty [occupancy_grid_node-2] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
Robot Motion Planning Framework - MoveIt2¶
MoveIt, an easy-to-use open source robotics manipulation platform for developing commercial applications, prototyping designs, and benchmarking algorithms, is the most widely used software for manipulation. It is released under the terms of the BSD license, and thus free for industrial, commercial, and research use.

By incorporating the latest advances in motion planning, manipulation, 3D perception, kinematics, control, and navigation, MoveIt is state-of-the-art software for mobile manipulation.
Moveit also supports visual features such as out-of-the-box visual demonstration in RVIZ, simulation combining Gazebo and ROS Control, native step-by-step configuration wizard, and so on.
Advanced ROS2 developer ECI Robotics content¶
The following links provide useful tutorials on using ROS2 with ECI components:
How to monitor and control an AGV (Automated Guided Vehicle)
How to plan Robot grasp motion using 3-D Object Pose Detection (Automated Guided Vehicle)
How to produce Fast Library for Approximate Nearest Neighbors (FLANN) benchmarking data