void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.51k stars 2.12k forks source link

Package request: ROS 2: Iron Irwini (Desktop Full Variant) #50093

Closed blacklightpy closed 4 months ago

blacklightpy commented 4 months ago

Package name

ros2-iron-desktop-full

Package homepage

https://github.com/ros2/variants/tree/master/desktop_full

Description

The Robot Operating System, is a meta operating system for robots (Desktop Full Variant)

Depends on #50090, #50091 and #50092

Guide: https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html Also see:

Does the requested package meet the package requirements?

Compiled

Is the requested package released?

Yes

blacklightpy commented 4 months ago

@classabbyamp This would be the top level ROS 2: Iron package. This is a separate request from the Gazebo framework.

blacklightpy commented 4 months ago

Notes on how ROS is packaged

The standard procedure for generating DEB/RPM files is by using git-buildpackage (GBP) on the build farm. bloom is the ROS infrastructure tool provided which generates the release files and makes a PR to the Build Farm repo, and when merged, it invokes the Jenkins CI job.

To do this without deploying to the ROS APT/DNF repo, we'll need to self-host ros_buildfarm and set a local APT repo to deploy to.

How it is locally built: ~- First we obtain the ROS 2 variant sources, using vcs import the ros2.repos file from the appropriate branch from https://github.com/ros2/ros2 into the src path of the working directory.~ ~- Then we also clone the appropriate branch of the variants repo into src~

EDIT: Apparently, the ros2.repos file does not have all the files in ROS 2. That file was historically only used for CI jobs, and it did not include all files because building nightlies would often time out. It got repurposed for general users only recently. That should be why the docs require you to add ROS 2 repo to APT/DNF for rosdep install.

To get all the sources, we have the older method of rosinstall_generator. It generates .rosinstall files, which is an older format used with previous import tools like rosinstall, rosws and wstools, but it is still supported by vcstool (which by the way, is not vcstools, which is what all these tools are based on). It can also generate .repos files by using --format=repos.

To use it:

Next steps:

And I think once the binary is generated, we can package it normally.

Possible Issues: I don't know how rosdep handles system packages (including Python packages, since PEP 668). I know that rosdep keys should list all the dependencies from a workspace source.. so that should help find out what all the dependencies are, and we should be able to add them in makedepends. The ROS specific packages, we should be able to build from sources.

EDIT: To make rosdep support XBPS, we'll need to add a support script, referring other packages. But for getting the dependency names itself, we can refer https://github.com/ros/rosdistro/blob/master/rosdep/base.yaml with the list of dependency keys.

[!NOTE] colcon (Collective Construction) is the latest and universal build system in ROS, that handles CMake, setuptools, cargo, gradle and many other build systems to allow diversity in ROS packages. It also allows building with other more systems using extensions, like colcon-blaze for Blaze.

Prior to colcon, ROS used to use ament_tools/ament in ROS 2 and catkin_tools/catkin, catkin_make_isolated, catkin_make and rosbuild/rosmake in ROS 1, in that reverse-chronological order. So many tutorials may list building with catkin build or catkin_make_isolated and that can get confusing.

colcon handles ament and catkin repositories by using catkin_pkg to parse package.xml files and skipping directly to the underlying build systems.

blacklightpy commented 4 months ago

python3-vcstool should come as a dependency of ros-dev-tools (#50087).

python3-rosinstall-generator is needed to build variants, since we can't use the ROS APT/DNF repos, so perhaps that too should be added to ros-dev-tools. Or it could go in makedepends. Still, it's a very common development tool used in ROS.