Talk:ROS

From ArchWiki
Latest comment: 22 August by Enf in topic Restructure

Boost Update Script

The provided script didn't work for me :(. I think some things have unlisted dependencies. Instead I had to do this:

   find /opt/ros/indigo/lib -name '*.so*' | while read line; do out=`ldd $line 2>&1 | grep boost | grep -v warning`;  if "$out" != "" ; then new=`pacman -Qo -q $line`; echo $new;  fi; done;

—This unsigned comment is by Yiuin (talk) 01:16, 16 January 2017 (UTC). Please sign your posts with ~~~~!Reply

ROS2 Crystal

I managed to compile enough of ROS to be able to create my own package. I just gave up waiting for ros2/rviz to finish to compile.

Here are the notes I took while trying…

sudo pip install colcon-common-extensions lark-parser rosdep vcstool
sudo pacman --needed -S asio tinyxml2

Then I used rosdep to create a list of dependencies.

$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list

$ rosdep install \
  --simulate \
  --from-paths src --ignore-src \
  --rosdistro crystal \
  -y --skip-keys \
  "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 \
  rti-connext-dds-5.3.1 urdfdom_headers"

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
test_launch_ros: No definition of [python3-yaml] for OS [arch]
ament_xmllint: No definition of [libxml2-utils] for OS [arch]
ros1_bridge: No definition of [python3-yaml] for OS [arch]
rosidl_parser: No definition of [python3-lark-parser] for OS [arch]
uncrustify_vendor: No definition of [uncrustify] for OS [arch]
ros2topic: No definition of [python3-yaml] for OS [arch]
ament_pep257: No definition of [pydocstyle] for OS [arch]
ament_flake8: No definition of [python3-flake8] for OS [arch]
rqt_publisher: No definition of [python3-catkin-pkg-modules] for OS [arch]
ros2service: No definition of [python3-yaml] for OS [arch]
rosidl_adapter: No definition of [python3-empy] for OS [arch]
rcl_logging_log4cxx: No definition of [python3-empy] for OS [arch]
rcl_logging_noop: No definition of [python3-empy] for OS [arch]
ament_package: No definition of [python3-flake8] for OS [arch]
rqt_msg: No definition of [python3-catkin-pkg-modules] for OS [arch]
ros2cli: No definition of [python3-pkg-resources] for OS [arch]
rqt_gui: No definition of [python3-catkin-pkg-modules] for OS [arch]
rqt_shell: No definition of [python3-catkin-pkg-modules] for OS [arch]
ros2pkg: No definition of [python3-pkg-resources] for OS [arch]
launch_ros: No definition of [python3-yaml] for OS [arch]
ament_pep8: No definition of [python3-pep8] for OS [arch]
rcutils: No definition of [python3-empy] for OS [arch]
ament_pyflakes: No definition of [pyflakes3] for OS [arch]
ament_cmake_core: No definition of [python3-catkin-pkg-modules] for OS [arch]
rviz_ogre_vendor: No definition of [libfreetype6-dev] for OS [arch]
qt_gui: No definition of [python3-catkin-pkg-modules] for OS [arch]
rqt_plot: No definition of [python3-catkin-pkg-modules] for OS [arch]
ament_clang_format: No definition of [clang-format] for OS [arch]
sros2: No definition of [python3-lxml] for OS [arch]

From that, I extracted the following dependencies:

clang-format
libfreetype6-dev
libxml2-utils
pydocstyle
pyflakes3
python3-catkin-pkg-modules
python3-empy
python3-flake8
python3-lark-parser
python3-lxml
python3-pep8
python3-pkg-resources
python3-yaml
uncrustify

Which I translated into

sudo pacman --needed -S uncrustify
sudo pip install pydocstyle pyflakes catkin-pkg-modules empy flake8 lark-parser lxml pep8 PyYAML

After running colcon for a first try, I installed log4cxx from AUR. And my final command is:

touch ./src/ros2/rviz/COLCON_IGNORE
colcon build --symlink-install --continue-on-error

with the summarized result:

Failed   <<< qt_gui_cpp [ Exited with code 1 ]
Failed   <<< image_tools        [ Exited with code 1 ]
Failed   <<< intra_process_demo [ Exited with code 1 ]

  Could not find PrismTech OpenSplice - skipping 'rmw_opensplice_cpp'
  Could not find PrismTech OpenSplice - skipping 'rosidl_typesupport_opensplice_c'
  Could not find PrismTech OpenSplice - skipping 'rosidl_typesupport_opensplice_cpp'
  Could not find RTI Connext - skipping 'rmw_connext_cpp'
  Could not find RTI Connext - skipping 'rmw_connext_shared_cpp'
  Could not find RTI Connext - skipping 'rosidl_typesupport_connext_c'
  Could not find RTI Connext - skipping 'rosidl_typesupport_connext_cpp'

  Failed to find ROS 1 roscpp, skipping...

Summary: 218 packages finished [1min 4s]
  3 packages failed: image_tools intra_process_demo qt_gui_cpp
  3 packages had stderr output: image_tools intra_process_demo qt_gui_cpp
  3 packages not processed

—This unsigned comment is by Mdhooge (talk) 14:18, 19 April 2019 (UTC). Please sign your posts with ~~~~!Reply

Is ROS2 Crystal still relevant? I managed to compile ROS2 Foxy with the help of `ros2-arch-deps`. I would like to create a package, but have never done this. The install dir contains 316 directories. Should I pack everything in one package or should I take the ros-noetic-* packages as an example? Leuko (talk) 11:10, 26 July 2020 (UTC)Reply

racko fixes

I didn't apply the 3 fixes described on the main page.

—This unsigned comment is by Mdhooge (talk) 14:22, 19 April 2019 (UTC). Please sign your posts with ~~~~!Reply

Placing racko fix text here. Removing from main article since I built and ran RViz 2 without them on 30 June 2019 -calvertdw

Apply racko fixes:

$ cd ~/ros2_ws/src/ros2/rviz/
$ git remote add racko https://github.com/racko/rviz.git
$ git fetch racko added_cmake_project_type fix_wrong_yaml_cpp
$ git cherry-pick racko/added_cmake_project_type racko/fix_wrong_yaml_cpp

—This unsigned comment is by Calvertdw (talk) 06:17, 30 June 2019 (UTC). Please sign your posts with ~~~~!Reply

Restructure

I think this page should be structured into ROS 1 and ROS 2 sections, with Troubleshooting at the end.

Installation sections for most popular ROS releases as well as master.

—This unsigned comment is by Calvertdw (talk) 04:11, 30 June 2019 (UTC). Please sign your posts with ~~~~!Reply

I entirely agree with you, and if the sections became too long, maybe it will become a better idea to create two separate articles respectively for ROS1 and ROS2 Enf (talk) 09:04, 22 August 2024 (UTC)Reply

Rebuild

When the python version changes, python will try to find the packages in /usr/lib/python<new version>/ instead of /usr/lib/python<old version/, which will make ros fail to run properly and the only solution is to fully reinstall ROS. This warning should be added.

—This unsigned comment is by Zuntik (talk) 13:52, 20 May 2021‎ (UTC). Please sign your posts with ~~~~!Reply

Alternative installation via Distrobox

Hello, I managed to get ROS2 to run fairly simply by using Distrobox (and on a Wayland session!). I believe this alternative way of installing should be mentioned in the wiki.

The installation is pretty straight forward:

pacman -S distrobox

I also installed boxbuddyAUR for a GUI application. Once I got Ubuntu to run, I simply followed the ROS wiki to install it.

To run graphical applications such as rviz2 on Wayland too, I had to set the environment variable QT_QPA_PLATFORM to xcb.

export QT_QPA_PLATFORM="xcb;wayland"

One could think of mentioning the use of Docker as well, but unluckly for me, it has never worked. Enf (talk) 21:21, 19 August 2024 (UTC)Reply