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

Some tips for ROS2 on Archlinux

Hello there,

I just would like to share with the ROS2xArchlinux community, some problem I have met during the installation of ROS2 on Arch and how I solved them.
Note that I don’t claim that this is the correct way to install it, if you have any suggestion to do it better please let me know.
Let’s get started:

ROS2 installation repository
Before discussing about the installation itself please not that the installation requires you to build ROS2 from source, this process takes exactly 2h on my laptop.
If you build ROS using the command colcon build --symlink-install, you will not be able move the repository because all the symbolic link built inside will be broken.
So think twice about the place where you want to install your ROS installation if you don’t want to replace all the link (or rebuild the whole thing).
What I tried:
-Install in home/Document/ros2-foxy => Was able to compile the tutorial inside or below this repository but nothing above.
-Install in /opt/ros2/foxy => Was not able to compile the tutorial
-Install in home/ros2-foxy => Was able to compile everywhere in home. (Success !)

Installation
First go on the ROS archwiki page:
https://wiki.archlinux.org/index.php/ROS#ROS_2

The arch tutorial recommend you to follow the build instruction on the ros website.
Honestly I don’t get why since I managed to get the installation working only using the archlinux instruction, + I never managed to get the rosdep command working as instructed in the ros tutorial:
rosdep install --from-paths src --ignore-src --rosdistro foxy -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers"
This command return a list of error like:

rcl_logging_noop: No definition of [python3-empy] for OS [arch]

Even if these package are already in my python installation:

pip list | grep empy
< empy 3.3.4

Anyway, I would suggest to just follow arch instruction.

From this point I had a functionnal ROS2 installation.
I have my ~/ros2-foxy with everything built inside, I can compile the tutorial packages
from everywhere in home.

RQT error
The last problem I have met so far is rqt refused to work properly.

rqt
rqt window appears but you can’t do anything inside + a lot of red messages in my terminal, 3 times the same. (See the full error message here )

The trace conclude that:
AttributeError: ‘xml.etree.ElementTree.Element’ object has no attribute ‘getiterator’
Therefore I went in the buggy python file

/home/userName/ros2-foxy/build/rqt_gui/src/rqt_gui/ros_plugin_provider.py
and replace the 3 getiterator command into iter.

Now everything is working so far.
I hope this may help some of you, if you have any idea to improve this, please let me know.

1 Like

Hey @vial, thanks for sharing your progress! On the below link is where we are discussing ROS2 and Arch Linux installation and building: Get ROS2 working on ArchLinux

You may find it useful.