Hood NUC Melih ROS2 Source Install
Contents
Context
January 16 and 17, 2020
This is a source install documented by Husnu Melih Erdogan while an intern in the Intel ROS Navigation 2 team. The TR3 computer architecture replaces the Raspberry Pi with a standard Linux 18.04 Intel NUC. It sits on the TB3 and can accommodate the entire computer navigation stack. A remote Linux 18.04 based ROS 2 may join the network as the human interface.
Reference
- Intel TB3 Tutorial: The Melih tutoria instructions.
See Melih's tutorial section "ROS2 Installation Step"
See Melih's tutorial section "Test ROS2"
Initial Conditions
The binary version of ROS2 has already been installed following the Raspberry Pi instructions. See Hood NUC ROS2.
Disable the Dashing setup in .bashrc for now. The sources are going to be installed in a local workspace and not at /opt/ros.
# after Dashing install export CHOOSE_ROS_DISTRO=dashing #source /opt/ros/dashing/setup.bash #source ~/turtlebot3_ws/install/setup.bash # my TB3 framework additions export TB3_MODEL=waffle export TURTLEBOT3_MODEL=${TB3_MODEL}
ROS2 Installation Steps: Tools and Dependencies
As a result of installing the ROS 2 binary version, many of Melih's steps have been done in this previous step and are skipped.
Skipped: Set Locale done
sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LANG=en_US.UTF-8
Skipped: Setup Sources and add the repository to your sources list
sudo apt update && sudo apt install curl gnupg2 lsb-release curl http://repo.ros2.org/repos.key | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
Update and upgrade: decided to bring everything up-to-date
- See Hood ROS2 Melih Update and Upgrade Log for the following steps. This is a lot of detail that is save it something real bad happened.
sudo apt update apt list --upgradable sudo apt upgrade
Action: Rebooted
Installed 2: Install Development Tools and ROS2 tools
sudo apt update && sudo apt install -y \ build-essential \ cmake \ git \ python3-colcon-common-extensions \ python3-lark-parser \ python3-pip \ python-rosdep \ python3-vcstool \ wget
The following needed to be installed
eepp@hood:~$ sudo apt install python3-pip eepp@hood:~$ sudo apt install python-rosdep
Installed: Pip packages for testing
python3 -m pip install -U \ argcomplete \ flake8 \ flake8-blind-except \ flake8-builtins \ flake8-class-newline \ flake8-comprehensions \ flake8-deprecated \ flake8-docstrings \ flake8-import-order \ flake8-quotes \ pytest-repeat \ pytest-rerunfailures \ pytest \ pytest-cov \ pytest-runner \ setuptools
Test ROS 2
Sanity test: I did a test from Hood_ROS2_Tutorials_on_Dashing. Passed.
Installed: Fast-RTPS dependencies
sudo apt install --no-install-recommends -y \ libasio-dev \ libtinyxml2-dev
ROS2 Installation Steps: Create ROS 2 Workspace
eepp@hood:~$ mkdir ros2_all_ws eepp@hood:~$ cd ros2_all_ws eepp@hood:ros2_all_ws$ mkdir ros2_ws eepp@hood:ros2_all_ws$ cd ros2_ws eepp@hood:ros2_ws$ mkdir src
ROS2 Installation Steps: Clone the ROS 2 source
- [ROS 2 software stack]: Will clone it now.
eepp@hood:ros2_ws$ wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos --2020-01-17 09:07:06-- https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.52.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.52.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 10755 (11K) [text/plain] Saving to: ‘ros2.repos’ ros2.repos 100%[===================>] 10.50K --.-KB/s in 0s 2020-01-17 09:07:06 (40.0 MB/s) - ‘ros2.repos’ saved [10755/10755] eepp@hood:ros2_ws$ ls ros2.repos src eepp@hood:ros2_ws$ vcs import src < ros2.repos
- See Hood ROS2 Melih Ros 2 Import Log for detail
eepp@hood:ros2_ws$ sudo rosdep init Wrote /etc/ros/rosdep/sources.list.d/20-default.list Recommended: please run rosdep update eepp@hood:ros2_ws$ rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml Skip end-of-life distro "ardent" Skip end-of-life distro "bouncy" Skip end-of-life distro "crystal" Add distro "dashing" Add distro "eloquent" Add distro "foxy" Skip end-of-life distro "groovy" Skip end-of-life distro "hydro" Skip end-of-life distro "indigo" Skip end-of-life distro "jade" Add distro "kinetic" Skip end-of-life distro "lunar" Add distro "melodic" Add distro "noetic" updated cache in /home/eepp/.ros/rosdep/sources.cache eepp@hood:ros2_ws$ rosdep install --from-paths src --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers"
- See Hood ROS2 Melih Ros 2 Import Log for detail
eepp@hood:~$ python3 -m pip install -U lark-parser Collecting lark-parser Downloading https://files.pythonhosted.org/packages/34/b8/aa7d6cf2d5efdd2fcd85cf39b33584fe12a0f7086ed451176ceb7fb510eb/lark-parser-0.7.8.tar.gz (276kB) 100% |████████████████████████████████| 276kB 2.9MB/s Building wheels for collected packages: lark-parser Running setup.py bdist_wheel for lark-parser ... done Stored in directory: /home/eepp/.cache/pip/wheels/01/a2/30/ebae6ffa73cf3aa1c972a24d4c78388afd910f91e43bf554aa Successfully built lark-parser Installing collected packages: lark-parser Successfully installed lark-parser-0.7.8
ROS2 Installation Steps: Build ROS 2
eepp@hood:ros2_ws$ colcon build --symlink-install --merge-install Starting >>> ament_package Starting >>> ament_lint Starting >>> fastcdr Starting >>> foonathan_memory_vendor Finished <<< ament_package [2.40s] Starting >>> ament_cmake_core .... [Processing: rviz_default_plugins] Finished <<< rviz_default_plugins [18min 24s] Starting >>> rviz2 Finished <<< rviz2 [11.6s] Summary: 299 packages finished [1h 17min 27s] 11 packages had stderr output: cyclonedds foonathan_memory_vendor qt_gui_cpp rmw_connext_cpp rmw_connext_shared_cpp rmw_opensplice_cpp ros1_bridge rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rosidl_typesupport_opensplice_c rosidl_typesupport_opensplice_cpp
- See Hood ROS2 Melih Ros 2 Build Log for complete detail
ROS2 Test
Passed
Terminal 1
eepp@hood:~$ source ~/ros2_all_ws/ros2_ws/install/local_setup.bash ROS_DISTRO was set to 'dashing' before. Please make sure that the environment does not mix paths from different distributions. eepp@hood:~$ ros2 run demo_nodes_cpp talker [INFO] [1579286888.639146656] [talker]: Publishing: 'Hello World: 1' [INFO] [1579286889.638646265] [talker]: Publishing: 'Hello World: 2' [INFO] [1579286890.638668014] [talker]: Publishing: 'Hello World: 3' ...
Terminal 2
eepp@hood:ros2_ws$ source ~/ros2_all_ws/ros2_ws/install/local_setup.bash ROS_DISTRO was set to 'dashing' before. Please make sure that the environment does not mix paths from different distributions. eepp@hood:ros2_ws$ ros2 run demo_nodes_py listener [INFO] [1579286915.669205110] [listener]: I heard: [Hello World: 28] [INFO] [1579286916.641119624] [listener]: I heard: [Hello World: 29] [INFO] [1579286917.641110903] [listener]: I heard: [Hello World: 30] [INFO] [1579286918.641013243] [listener]: I heard: [Hello World: 31] ...