@@ -6682,6 +6682,7 @@ const pip3Packages = [
66826682 "colcon-recursive-crawl==0.2.1" ,
66836683 "colcon-ros==0.3.23" ,
66846684 "colcon-test-result==0.3.8" ,
6685+ "meson>=0.60.0,<0.64.0" ,
66856686 "coverage" ,
66866687 "cryptography" ,
66876688 "empy<4" ,
@@ -7144,7 +7145,13 @@ function configOs() {
71447145 yield utils . exec ( "sudo" , [ "bash" , "-c" , "echo 'Etc/UTC' > /etc/timezone" ] ) ;
71457146 yield utils . exec ( "sudo" , [ "apt-get" , "update" ] ) ;
71467147 // Install tools required to configure the worker system.
7147- yield apt . runAptGetInstall ( [ "curl" , "gnupg2" , "locales" , "lsb-release" ] ) ;
7148+ yield apt . runAptGetInstall ( [
7149+ "ca-certificates" ,
7150+ "curl" ,
7151+ "gnupg2" ,
7152+ "locales" ,
7153+ "lsb-release" ,
7154+ ] ) ;
71487155 // Select a locale supporting Unicode.
71497156 yield utils . exec ( "sudo" , [ "locale-gen" , "en_US" , "en_US.UTF-8" ] ) ;
71507157 core . exportVariable ( "LANG" , "en_US.UTF-8" ) ;
@@ -7172,24 +7179,44 @@ function addAptRepoKey() {
71727179 yield utils . exec ( "sudo" , [ "apt-key" , "add" , keyFilePath ] ) ;
71737180 } ) ;
71747181}
7182+ /**
7183+ * Add ROS-O (ROS One) APT repository key.
7184+ *
7185+ * Downloads and installs the GPG key for the ROS-O repository.
7186+ */
7187+ function addRosOneAptRepoKey ( ) {
7188+ return __awaiter ( this , void 0 , void 0 , function * ( ) {
7189+ // Ensure the keyrings directory exists and ca-certificates is up to date
7190+ yield utils . exec ( "sudo" , [ "mkdir" , "-p" , "/etc/apt/keyrings" ] ) ;
7191+ yield utils . exec ( "sudo" , [ "update-ca-certificates" ] ) ;
7192+ yield utils . exec ( "sudo" , [
7193+ "bash" ,
7194+ "-c" ,
7195+ "curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg" ,
7196+ ] ) ;
7197+ } ) ;
7198+ }
71757199// Ubuntu distribution for ROS 1
71767200const ros1UbuntuVersion = "focal" ;
71777201/**
71787202 * Add OSRF APT repository.
71797203 *
71807204 * @param ubuntuCodename the Ubuntu version codename
7205+ * @param needsRos1 whether ROS 1 packages are needed
7206+ * @param needsRos2 whether ROS 2 packages are needed
71817207 */
7182- function addAptRepo ( ubuntuCodename , use_ros2_testing ) {
7208+ function addAptRepo ( ubuntuCodename , use_ros2_testing , needsRos1 , needsRos2 ) {
71837209 return __awaiter ( this , void 0 , void 0 , function * ( ) {
7184- // There is now no Ubuntu version overlap between ROS 1 and ROS 2
7185- if ( ros1UbuntuVersion === ubuntuCodename ) {
7210+ // Add ROS 1 repository if needed
7211+ if ( needsRos1 ) {
71867212 yield utils . exec ( "sudo" , [
71877213 "bash" ,
71887214 "-c" ,
71897215 `echo "deb http://packages.ros.org/ros/ubuntu ${ ubuntuCodename } main" > /etc/apt/sources.list.d/ros-latest.list` ,
71907216 ] ) ;
71917217 }
7192- else {
7218+ // Add ROS 2 repository if needed
7219+ if ( needsRos2 ) {
71937220 yield utils . exec ( "sudo" , [
71947221 "bash" ,
71957222 "-c" ,
@@ -7199,6 +7226,24 @@ function addAptRepo(ubuntuCodename, use_ros2_testing) {
71997226 yield utils . exec ( "sudo" , [ "apt-get" , "update" ] ) ;
72007227 } ) ;
72017228}
7229+ /**
7230+ * Add ROS-O (ROS One) APT repository.
7231+ *
7232+ * @param ubuntuCodename the Ubuntu version codename
7233+ * @param use_testing whether to use the testing repository
7234+ */
7235+ function addRosOneAptRepo ( ubuntuCodename , use_testing ) {
7236+ return __awaiter ( this , void 0 , void 0 , function * ( ) {
7237+ const arch = yield utils . getArch ( ) ;
7238+ const repo = use_testing ? `${ ubuntuCodename } -testing` : ubuntuCodename ;
7239+ yield utils . exec ( "sudo" , [
7240+ "bash" ,
7241+ "-c" ,
7242+ `echo "deb [arch=${ arch } signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net ${ repo } main" > /etc/apt/sources.list.d/ros-one.list` ,
7243+ ] ) ;
7244+ yield utils . exec ( "sudo" , [ "apt-get" , "update" ] ) ;
7245+ } ) ;
7246+ }
72027247/**
72037248 * Initialize rosdep.
72047249 */
@@ -7216,6 +7261,20 @@ function rosdepInit() {
72167261 yield utils . exec ( "sudo" , [ "rosdep" , "init" ] ) ;
72177262 } ) ;
72187263}
7264+ /**
7265+ * Configure rosdep for ROS-O (ROS One).
7266+ *
7267+ * Adds custom rosdep source for ROS-O packages.
7268+ */
7269+ function configureRosOneRosdep ( ) {
7270+ return __awaiter ( this , void 0 , void 0 , function * ( ) {
7271+ yield utils . exec ( "sudo" , [
7272+ "bash" ,
7273+ "-c" ,
7274+ 'echo "yaml https://ros.packages.techfak.net/ros-one.yaml one" > /etc/ros/rosdep/sources.list.d/1-ros-one.list' ,
7275+ ] ) ;
7276+ } ) ;
7277+ }
72197278/**
72207279 * Install ROS 1 or 2 (development packages and/or ROS binaries) on a Linux worker.
72217280 */
@@ -7224,10 +7283,32 @@ function runLinux() {
72247283 // Get user input & validate
72257284 const use_ros2_testing = core . getInput ( "use-ros2-testing" ) === "true" ;
72267285 const installConnext = core . getInput ( "install-connext" ) === "true" ;
7286+ const requiredDistros = utils . getRequiredRosDistributions ( ) ;
7287+ const needsRosOne = requiredDistros . includes ( "one" ) ;
7288+ // Determine which ROS versions are needed
7289+ // ROS 1 distributions: noetic (from packages.ros.org/ros)
7290+ // ROS 2 distributions: rolling, humble, jazzy, iron, kilted, etc. (from packages.ros.org/ros2)
7291+ // ROS-O "one": separate repository (ros.packages.techfak.net)
7292+ const ros1Distros = [ "noetic" ] ;
7293+ const needsRos1 = requiredDistros . some ( ( distro ) => ros1Distros . includes ( distro ) ) ;
7294+ const needsRos2 = requiredDistros . some ( ( distro ) => ! ros1Distros . includes ( distro ) && distro !== "one" ) ;
72277295 yield configOs ( ) ;
72287296 yield addAptRepoKey ( ) ;
72297297 const ubuntuCodename = yield utils . determineDistribCodename ( ) ;
7230- yield addAptRepo ( ubuntuCodename , use_ros2_testing ) ;
7298+ // For backward compatibility when no ROS distributions are specified:
7299+ // - Focal (Ubuntu 20.04): add ROS 1 repository (for focal-specific dependencies)
7300+ // - Other versions: add ROS 2 repository (for jammy/noble-specific dependencies)
7301+ // For ROS-O (one): also add ROS 2 repository as it depends on ROS 2 packages
7302+ const addRos1Repo = needsRos1 || ubuntuCodename === ros1UbuntuVersion ;
7303+ const addRos2Repo = needsRos2 ||
7304+ needsRosOne ||
7305+ ( requiredDistros . length === 0 && ubuntuCodename !== ros1UbuntuVersion ) ;
7306+ yield addAptRepo ( ubuntuCodename , use_ros2_testing , addRos1Repo , addRos2Repo ) ;
7307+ // Add ROS-O repository if needed
7308+ if ( needsRosOne ) {
7309+ yield addRosOneAptRepoKey ( ) ;
7310+ yield addRosOneAptRepo ( ubuntuCodename , use_ros2_testing ) ;
7311+ }
72317312 if ( "noble" !== ubuntuCodename ) {
72327313 // Temporary fix to avoid error mount: /var/lib/grub/esp: special device (...) does not exist.
72337314 const arch = yield utils . getArch ( ) ;
@@ -7244,7 +7325,11 @@ function runLinux() {
72447325 yield pip . installPython3Dependencies ( ) ;
72457326 }
72467327 yield rosdepInit ( ) ;
7247- for ( const rosDistro of utils . getRequiredRosDistributions ( ) ) {
7328+ // Configure rosdep for ROS-O if needed
7329+ if ( needsRosOne ) {
7330+ yield configureRosOneRosdep ( ) ;
7331+ }
7332+ for ( const rosDistro of requiredDistros ) {
72487333 yield apt . runAptGetInstall ( [ `ros-${ rosDistro } -desktop` ] ) ;
72497334 }
72507335 } ) ;
@@ -7570,6 +7655,7 @@ function getRequiredRosDistributions() {
75707655//list of valid linux distributions
75717656const validDistro = [
75727657 "noetic" ,
7658+ "one" ,
75737659 "humble" ,
75747660 "iron" ,
75757661 "jazzy" ,
0 commit comments