0
$\begingroup$

I want to install ROS2 from source on Debian Bullseye, since installation of a .deb package does not seem to be possible for that Debian version. For that reason, I added Ubuntu Focal repository of ROS 2, which broke the .zst compression support of dpkg and prevented me from installing python3-colcon-notification, which is also necessary for the installation of ROS 2. I can comment out the focal repository in sources.list.d/ros2.list and then run sudo apt update and sudo apt upgrade, which will restore .zst compression support for dpkg, but I need this repository, according to official installation from source ROS2 Foxy instructions.

How do I go? Is it somehow possible to build ROS 2 with "traditional" CMake, without Colcon

$\endgroup$

1 Answer 1

0
$\begingroup$

Using a package repository from Ubuntu Focal on Debian Bullseye not a supported configuration. There's no testing or expectation that anything will work.

You don't link to which instructions you're following. However, since you are going into unsupported configuration the documentation will not necessarily be right. For example you assert "I need this repository, according to official installation from source ROS2 Foxy instructions." Whatever it says in the instructions you are going to have to interpret and adapt for attempting to build on you alternative platform taking into account the difference between your platform and the one that you're reading documentation for.

In this case since you're working on a platform for which you aren't finding debian packages the better approach to running into repositories that don't exist is to understand what the documentation needed from that repository and attempt to find ways to install it from other mechanisms. Often that will require installation from source. The primary user documentation generally doesn't go into that for things like underlying dependencies, and you're likely going to need to dig into the developer documentation of those types for those things.

For example you can find more about installing colcon on your system by searching "colcon install from source" for which will get your to https://colcon.readthedocs.io/en/released/user/installation.html which is a much better path then trying to shoehorn binaries from one platform into another.

It's also harder to necessary understand as your coming to a new project, but depending on you use case some components are required and some are recommended. It could help reduce your effort to try to understand that distinction and not spend extra time and energy adapting the unnecessary components. I say this to point out that it's unlikely that colcon-notifications specifically is necessary but more core colcon packages will be necessary. In the basic documentation we seek to provide the simplest experience for new users on the supported platforms. But as you're diverging it might be worth understanding more about what you're attempting to do before you try to do the adaptation.

I want to make it clear that this is going to potentially be a lot to adapt. And if you're just learning how to work with ROS I strongly suggest that you learn how to interact with it and use it successfully on one of the supported platforms before you try to do the adaptation to an unsupported platform. Trying to do both at once will likely take much longer as you won't be able to diagnose if you're off track as easily and likely end up spending a lot of time trying to solve problems that don't need to be solved. These often manifest themselves as XY problems. Which is why I'm ending up writing such a long post that doesn't appear to directly answer your problem directly.

$\endgroup$
3
  • $\begingroup$ If you know any place where I can find simple source code for ROS that can be build with traditional cmake tools, I'd appreciate this. The thing is, official documentation does not seem to give installation from source instructions for other platforms, and the tools it suggests are slightly different from the ones that are traditionally used for building from source (CMake). Also, I already worked with ROS on supported platforms, both as a VM and Docker. The way it works after smooth installation gives little hint as to how to bypass installation difficulties on unsupported platforms. $\endgroup$
    – XXX
    May 13, 2023 at 21:18
  • $\begingroup$ As I thought your question is orthogonal to your goals. ROS does just use cmake under the hood. And all of the debian packages are built with direct invocations of cmake. There's also a lot of tooling from the debian pipeline and extended by us to make that work effectively. $\endgroup$
    – Tully
    May 15, 2023 at 0:31
  • $\begingroup$ If you want to install and use ROS packages without colcon, aka calling cmake directly, you can just go into each c++ package and in dependency order call cmake; make; make install if you have a python dependency you should use the setup.py to install it. Continue to iterate through all the packages in your workspace. It's a lot of work and there's a reason that we've put a lot of effort into making the supported paths work well as you've experienced. Colcon is a python tool and should be installable on your system without too much challenge. $\endgroup$
    – Tully
    May 15, 2023 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.