I am trying to build ROS2 Dashing from source on a Raspberry Pi with Raspbian Stretch. I followed this tutorial and everything went well until qt_gui_cpp failed because of an internal compiler error. The tutorial mentioned the following:
Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use COLCON_IGNORE in the same manner as CATKIN_IGNORE to ignore the subtree or remove the folder from the workspace. Take for instance: you would like to avoid installing the large OpenCV library. Well then simply $ touch COLCON_IGNORE in the cam2image demo directory to leave it out of the build process.
For my use case i only need the ROS2 Base
installation without any gui tools. I am unsure which of the directorys are needed for a base installation of ROS2. I would be very grateful if someone could help me out here.
When I ls
in the src
directory i get the following output:
ament eclipse-cyclonedds eProsima osrf ros ros2 ros-perception ros-planning ros-visualization
Edit: I installed ROS2 Dashing from source. Great thanks to @ruffsl and @marguedas. For anyone that might to do this as well down below is everything i did. It is very similar to the tutorial but i am only installing the ros_core packages with the help of the rosinstall_generator. I also excluded the sros2 packages because i could not build them.
sudo apt update && sudo apt install locales
sudo locale-gen en_GB en_GB.UTF-8
sudo update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8
export LANG=en_GB.UTF-8
locale
sudo apt update && sudo apt install curl gnupg2 lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update && sudo apt install -y \
build-essential \
cmake \
git \
python3-colcon-common-extensions \
python3-pip \
python-rosdep \
python3-vcstool \
wget
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
sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev
sudo apt install --no-install-recommends -y \
libcunit1-dev
sudo apt-get install python-rosinstall-generator
mkdir -p ~/ros2_dashing/src
cd ~/ros2_dashing/
rosinstall_generator ros_core --rosdistro dashing --deps --tar > dashing-ros-core.rosinstall
vcs import src < dashing-ros-core.rosinstall
sudo rosdep init
rosdep update
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"
colcon build --symlink-install --packages-skip sros2 sros2_cmake ros_core
Edit: I have written a simple IPC.srv custom service. Everything worked fine on my Ubuntu 18.04 VM that also has ROS2 Dashing installed with Debian Packages.
char[10] request_data
---
int8 response_code
When i am compiling the package that contains the IPC.srv i get some strange std_err output like:
/usr/bin/ld: /home/TKI/ros2_dashing/install/rcl_yaml_param_parser/lib/librcl_yaml_param_parser.so: invalid string offset 1759 >= 1389 for section `.strtab'
I also noticed this output while building ROS2 Dashing from source. Sould i be concerned about this? My nodes are running fine but i noticed that the time between a service request and service response is very high. I am running the service tutorial nodes. I am unsure if this is might be the cause. I also noticed that ROS2 is taking around 90% cpu load once i start a service request. Topics seem to work normal. I would be very grateful if somebody could help me out here.
Originally posted by mab0189 on ROS Answers with karma: 37 on 2021-06-04
Post score: 0
Original comments
Comment by Aj_boatlanding on 2022-06-20:
Thank you for this! Worked for me with Ubuntu 20.04 on an Odroid XU4 with Foxy. The only difference is that I needed to alter the number of threads used during the build by setting export MAKEFLAGS="-j 4"
as explained in this answer. Otherwise the build would fail due to using too many resources.