ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Installation of ROS/ROS2 on PYNQ

I would like to share a quick guide to install ROS/ROS2 on Pynq OS, which is based on Ubuntu, Python Jupiter-notebook, and has the functionality of handling the FPGA interface by Python on Xilinx Zynq.

I used Zybo-Z7-20 and PYNQ 2.3 to verify the following instruction.
Please check the latest information to create an SD-card image of PYNQ OS for your target board, for example:
https://pynq.readthedocs.io/en/v2.5.1/index.html

*** 1. Install ROS (melodic, desktop)
Follow the instruction on ROS.org with the following modification.
http://wiki.ros.org/melodic/Installation/Ubuntu

At “1.2 Setup your sources.list”, however, the (lsb_release -sc) will return "trinity" on Pynq. So please rewrite (lsb_release -sc) to “bionic” as follows:

$ sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu bionic main” > /etc/apt/sources.list.d/ros-latest.list’

#You can modify the part in the file “/etc/apt/sources.list.d/ros-latest.list” if you already did it with “trinity”. Please replace “trinity” with “bionic”.

The remaining commands work as it is.
Please install

Desktop Install: ROS, rqt, rviz, and robot-generic libraries
by
$ sudo apt install ros-melodic-desktop

Then the simplest talker/listener example works by the following:
http://wiki.ros.org/ROS/Tutorials/CreatingPackage

http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)
or
http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(python)

In this case, you need to run “roscore” for master node.

*** 2. Install ROS2 (eloquent, desktop)
Follow the instruction on ROS.org
https://index.ros.org/doc/ros2/Installation/Eloquent/Linux-Install-Debians/

Again, at “Setup Sources, And then add the repository to your sources list:”, the $(lsb_release -cs) should be replaced with “bionic” as follows:

sudo sh -c 'echo "deb [arch=(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $bionic main" > /etc/apt/sources.list.d/ros2-latest.list’

#You can modify the part in the file “/etc/apt/sources.list.d/ros2-latest.list” if you already did it with “trinity”. Please replace “trinity” with “bionic”.


To install ros-eloquent-desktop, the fast-rtps requires libssl1.1 (>=1.1.1) although the 18.04 bionic (armhf)'s version is libssl1.1.0g.

You need to add bionic-updates repository to /etc/apt/sources.list.d/multistrap-bionic.list

deb http://ports.ubuntu.com/ubuntu-ports bionic-updates main

So it looks like:

xilinx@pynq:~$ cat /etc/apt/sources.list.d/multistrap-bionic.list
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic universe main
deb-src http://ports.ubuntu.com/ubuntu-ports bionic universe main
deb http://ports.ubuntu.com/ubuntu-ports bionic-updates main


Then, please install

Desktop Install (Recommended): ROS, RViz, demos, tutorials.
by
$ sudo apt install ros-eloquent-desktop

Then, you can simply run the simplest talker/listener built-in example by:

ros2 run demo_nodes_cpp talker And in another terminal: ros2 run demo_nodes_py listener

In this case, you don’t need to run a master node like “roscore” because the master node is distributed in ROS2.