Skip to content

Commit a42aa93

Browse files
Rebase from 'upstream'
1 parent b51ae28 commit a42aa93

10 files changed

+171
-83
lines changed

.github/workflows/foxy_focal.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ros2-foxy-focal
2+
3+
on:
4+
push
5+
6+
jobs:
7+
ros2_foxy_focal_ci:
8+
name: foxy (focal)
9+
uses: ./.github/workflows/ros2.yml
10+
with:
11+
ROS_DISTRO: foxy
12+
ROS_REPO: testing
13+
OS_NAME: ubuntu
14+
OS_CODE_NAME: focal
15+
ALLOW_FAIL: false

.github/workflows/galactic_focal.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ros2-galactic-focal
2+
3+
on:
4+
push
5+
6+
jobs:
7+
ros2_galactic_focal_ci:
8+
name: galactic (focal)
9+
uses: ./.github/workflows/ros2.yml
10+
with:
11+
ROS_DISTRO: galactic
12+
ROS_REPO: testing
13+
OS_NAME: ubuntu
14+
OS_CODE_NAME: focal
15+
ALLOW_FAIL: false

.github/workflows/humble_jammy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ros2-humble-jammy
2+
3+
on:
4+
push
5+
6+
jobs:
7+
ros2_humble_jammy_ci:
8+
name: humble (jammy)
9+
uses: ./.github/workflows/ros2.yml
10+
with:
11+
ROS_DISTRO: humble
12+
ROS_REPO: testing
13+
OS_NAME: ubuntu
14+
OS_CODE_NAME: jammy
15+
ALLOW_FAIL: false

.github/workflows/iron_jammy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ros2-iron-jammy
2+
3+
on:
4+
push
5+
6+
jobs:
7+
ros2_iron_jammy_ci:
8+
name: iron (jammy)
9+
uses: ./.github/workflows/ros2.yml
10+
with:
11+
ROS_DISTRO: iron
12+
ROS_REPO: testing
13+
OS_NAME: ubuntu
14+
OS_CODE_NAME: jammy
15+
ALLOW_FAIL: false

.github/workflows/ros2.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: ros2
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ROS_DISTRO:
7+
required: true
8+
type: string
9+
ROS_REPO:
10+
required: true
11+
type: string
12+
OS_NAME:
13+
required: true
14+
type: string
15+
OS_CODE_NAME:
16+
required: true
17+
type: string
18+
ALLOW_FAIL:
19+
required: true
20+
type: boolean
21+
22+
jobs:
23+
ros2_ci:
24+
name: ROS2
25+
runs-on: ubuntu-latest
26+
continue-on-error: ${{ inputs.ALLOW_FAIL }}
27+
env:
28+
CCACHE_DIR: "${{ github.workspace }}/.ccache"
29+
steps:
30+
- name: Check out the naoqi_driver2 repo
31+
uses: actions/checkout@v2
32+
- name: Fetch/store directory used by ccache
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ env.CCACHE_DIR }}
36+
key: ccache-${{ inputs.ROS_DISTRO }}-${{ inputs.ROS_REPO }}-${{github.run_id}}
37+
restore-keys: |
38+
ccache-${{ inputs.ROS_DISTRO }}-${{ inputs.ROS_REPO }}-
39+
- name: Run industrial CI
40+
uses: 'ros-industrial/industrial_ci@master'
41+
env: ${{ inputs }}

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Changelog for package pepper_meshes
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
3.0.0 (2023-11-22)
6+
------------------
7+
* Update status badges
8+
* Add CI
9+
* Interactive agreement by default
10+
Explicit option in command line to agree to license.
11+
Improved interaction and messages.
12+
* Improved detection of the platform
13+
* Update maintainers
14+
* Contributors: Victor Paléologue
15+
516
2.0.1 (2022-09-13)
617
------------------
718
* Merge branch 'fix_binaries' into main

CMakeLists.txt

Lines changed: 26 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,101 +2,51 @@ cmake_minimum_required(VERSION 3.5)
22
project(pepper_meshes)
33

44
find_package(ament_cmake REQUIRED)
5-
ament_package()
65

76
# When getting a new binay, the MD5 might change, and the folder hierarchy too
87
# read comments below to adapt
98

10-
set(PACKAGE_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME})
11-
set(TMP_DIR ${PACKAGE_SHARE_DIR}/tmp)
9+
set(TMP_DIR ${CMAKE_CURRENT_BINARY_DIR})
1210
set(INSTALLER_PATH ${TMP_DIR}/installer.run)
1311

14-
# Try to figure out the architecture
15-
string(FIND ${CMAKE_INSTALL_PREFIX} "i686" IS_32)
16-
message(STATUS "Architecture is apparently 32 (-1 for no): ${IS_32}")
17-
if(${IS_32} STREQUAL "-1")
18-
# Trust CMAKE_SYSTEM_PROCESSOR which does not work on the farm
19-
if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
20-
set(IS_32 FALSE)
12+
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "$i.86$")
13+
message(STATUS "Downloading 32 bit installer")
14+
set(INSTALLER_URL "https://github.com/ros-naoqi/pepper_meshes_installer/raw/master/peppermeshes-0.2.0-linux-installer.run")
15+
set(INSTALLER_MD5 9e78f24b52838e704210881f92c0983d)
16+
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
17+
message(STATUS "Downloading 64 bit installer")
18+
set(INSTALLER_URL "https://github.com/ros-naoqi/pepper_meshes_installer/raw/master/peppermeshes-0.2.0-linux-x64-installer.run")
19+
set(INSTALLER_MD5 9e78f24b52838e704210881f92c0983d)
2120
else()
22-
set(IS_32 TRUE)
23-
endif()
21+
message(FATAL_ERROR "Mesh installer is not compatible with your host architecture '${CMAKE_HOST_SYSTEM_PROCESSOR}'")
2422
endif()
2523

26-
if (NOT ${IS_32})
27-
message(STATUS "Downloading 64 bit installer")
28-
file(DOWNLOAD
29-
"https://github.com/ros-naoqi/pepper_meshes_installer/raw/master/peppermeshes-0.2.0-linux-x64-installer.run"
30-
${INSTALLER_PATH} SHOW_PROGRESS
31-
INACTIVITY_TIMEOUT 60
32-
EXPECTED_MD5 9e78f24b52838e704210881f92c0983d
33-
)
34-
else()
35-
message(STATUS "Downloading 32 bit installer")
36-
file(DOWNLOAD
37-
"https://github.com/ros-naoqi/pepper_meshes_installer/raw/master/peppermeshes-0.2.0-linux-installer.run"
38-
${INSTALLER_PATH} SHOW_PROGRESS
24+
file(DOWNLOAD ${INSTALLER_URL} ${INSTALLER_PATH}
25+
SHOW_PROGRESS
3926
INACTIVITY_TIMEOUT 60
40-
EXPECTED_MD5 f48a610633d2db48bc84db16f4847b70
27+
EXPECTED_MD5 ${INSTALLER_MD5}
4128
)
42-
endif()
4329

4430
# specify the interesting folder in the archive. You might want to change
4531
# that for a new binary where the structure is different
4632
set(TMP_MESH_PATH ${TMP_DIR}/meshes)
4733

48-
# final path in devel/install space
49-
set(FINAL_MESH_PATH share/${PROJECT_NAME}/)
50-
51-
# make the file executable to install
52-
file(COPY ${INSTALLER_TMP_PATH}
53-
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
54-
DESTINATION ${TMP_DIR}
55-
)
34+
# Where to install the meshes and textures
35+
# relative to the share folder of the package.
36+
set(INSTALL_DESTINATION_IN_SHARE ${PROJECT_NAME})
5637

57-
# add a target for devel space
58-
add_custom_target(${PROJECT_NAME}_meshes
59-
COMMAND ${INSTALLER_PATH} --mode text --prefix ${TMP_DIR}
60-
COMMAND cp -fr ${TMP_MESH_PATH} ${PACKAGE_SHARE_DIR}
61-
COMMAND rm -fr ${TMP_DIR}/rollback*
62-
)
63-
64-
# uncompress the meshes during install
65-
install(CODE
66-
"
67-
# uncompress the archive
68-
message(STATUS \"using ${INSTALLER_PATH} to decompress to ${TMP_DIR}\")
69-
execute_process(COMMAND ${INSTALLER_PATH} --mode unattended --prefix ${TMP_DIR}
70-
OUTPUT_VARIABLE OUT
71-
ERROR_VARIABLE ERROR
72-
RESULT_VARIABLE RESULT
73-
)
74-
message(STATUS \"intall out: \${OUT}\")
75-
message(STATUS \"install error: \${ERROR}\")
76-
message(STATUS \"install result: \${RESULT}\")
77-
78-
execute_process(COMMAND ls
79-
WORKING_DIRECTORY ${TMP_DIR}
80-
OUTPUT_VARIABLE OUT_LS
81-
ERROR_VARIABLE ERROR_LS
82-
RESULT_VARIABLE RESULT_LS
83-
)
84-
message(STATUS \"ls out: \${OUT_LS}\")
85-
message(STATUS \"ls error: \${ERROR_LS}\")
86-
message(STATUS \"ls result: \${RESULT_LS}\")
87-
88-
execute_process(COMMAND file ${TMP_DIR}/installer.run
89-
OUTPUT_VARIABLE OUT_FILE
90-
ERROR_VARIABLE ERROR_FILE_CMD
91-
RESULT_VARIABLE RESULT_FILE
92-
)
93-
message(STATUS \"file out: \${OUT_FILE}\")
94-
message(STATUS \"file error: \${ERROR_FILE_CMD}\")
95-
message(STATUS \"file result: \${RESULT_FILE}\")
96-
"
38+
# install the meshes in the build directory when building
39+
message(STATUS "Will unpack meshes from the installer: \n${INSTALLER_PATH} --prefix ${TMP_DIR} ${INSTALL_MODE_FLAG}")
40+
add_custom_target(install_meshes ALL
41+
COMMAND chmod +x ${INSTALLER_PATH}
42+
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/install_with_auto_mode.sh ${INSTALLER_PATH} --prefix ${TMP_DIR}
43+
BYPRODUCTS ${TMP_MESH_PATH}
44+
TERMINAL
9745
)
9846

9947
# install the archive
10048
install(DIRECTORY ${TMP_MESH_PATH}
101-
DESTINATION ${FINAL_MESH_PATH}/
49+
DESTINATION share/${PROJECT_NAME}
10250
)
51+
52+
ament_package()

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ of the meshes as this could result in heavy cloning.
1616

1717
## Status
1818

19-
ROS Distro | Binary Status | Source status |
20-
|-------------------|-------------------|-------------------|
21-
Humble | |
22-
Galactic | [![Build Status](https://build.ros2.org/job/Gbin_uF64__pepper_meshes__ubuntu_focal_amd64__binary/badge/icon)](https://build.ros2.org/job/Gbin_uF64__pepper_meshes__ubuntu_focal_amd64__binary/) | [![Build Status](https://build.ros2.org/job/Gsrc_uF__pepper_meshes__ubuntu_focal__source/badge/icon)](https://build.ros2.org/job/Gsrc_uF__pepper_meshes__ubuntu_focal__source/)
23-
Foxy | [![Build Status](https://build.ros2.org/job/Fbin_uF64__pepper_meshes__ubuntu_focal_amd64__binary/badge/icon)](https://build.ros2.org/job/Fbin_uF64__pepper_meshes__ubuntu_focal_amd64__binary/) | [![Build Status](https://build.ros2.org/job/Fsrc_uF__pepper_meshes__ubuntu_focal__source/badge/icon)](https://build.ros2.org/job/Fsrc_uF__pepper_meshes__ubuntu_focal__source/)
19+
ROS Distro | Binary Status | Source status | GitHub Status |
20+
|-------------------|-------------------|-------------------|--------------------|
21+
Humble | [![ros2-humble-jammy-bin-status-badge](https://build.ros2.org/job/Hbin_uJ64__pepper_meshes__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__pepper_meshes__ubuntu_jammy_amd64__binary) | [![ros2-humble-jammy-src-status-badge](https://build.ros2.org/job/Hsrc_uJ__pepper_meshes__ubuntu_jammy__source/badge/icon)](https://build.ros2.org/job/Hsrc_uJ__pepper_meshes__ubuntu_jammy__source) | [![ros2-humble-jammy](https://github.com/ros-naoqi/pepper_meshes2/actions/workflows/humble_jammy.yml/badge.svg?branch=main)](https://github.com/ros-naoqi/pepper_meshes2/actions/workflows/humble_jammy.yml)
22+
Iron | [![ros2-iron-jammy-bin-status-badge](https://build.ros2.org/job/Ibin_uJ64__pepper_meshes__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Ibin_uJ64__pepper_meshes__ubuntu_jammy_amd64__binary) | [![ros2-iron-jammy-src-status-badge](https://build.ros2.org/job/Isrc_uJ__pepper_meshes__ubuntu_jammy__source/badge/icon)](https://build.ros2.org/job/Isrc_uJ__pepper_meshes__ubuntu_jammy__source) | [![ros2-iron-jammy](https://github.com/ros-naoqi/pepper_meshes2/actions/workflows/iron_jammy.yml/badge.svg?branch=main)](https://github.com/ros-naoqi/pepper_meshes2/actions/workflows/iron_jammy.yml)

install_with_auto_mode.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Installer should show up to the user if it is not an automated job.
5+
if [ -n "$DEBIAN_FRONTEND" ]; then
6+
if [ "$DEBIAN_FRONTEND" = "noninteractive" ]; then
7+
INSTALL_MODE_FLAG=("--mode" "unattended")
8+
elif [ "$DEBIAN_FRONTEND" = "readline" ]; then
9+
INSTALL_MODE_FLAG=("--mode" "text")
10+
fi
11+
fi
12+
# For GitHub Actions this works better
13+
if [ -n "$CI" ] && [ "$CI" = 1 ]; then
14+
INSTALL_MODE_FLAG=("--mode" "unattended")
15+
fi
16+
# For ROS 2 CI, we can check if we're in a Docker container.
17+
if [ -f /.dockerenv ]; then
18+
INSTALL_MODE_FLAG=("--mode" "unattended")
19+
fi
20+
21+
# Unless they specifically agree to the license.
22+
if [ -n "$I_AGREE_TO_PEPPER_MESHES_LICENSE" ] && [ "$I_AGREE_TO_PEPPER_MESHES_LICENSE" = 1 ]; then
23+
INSTALL_MODE_FLAG=("--mode" "unattended")
24+
fi
25+
26+
# Call the installer, pass our flag and all the remaining arguments
27+
$1 "${INSTALL_MODE_FLAG[@]}" "${@:2}"

package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>pepper_meshes</name>
4-
<version>2.0.1</version>
4+
<version>3.0.0</version>
55
<description>Meshes for the Pepper robot, for ROS2</description>
66
<author email="[email protected]">Maxime Busy</author>
77

8+
<maintainer email="[email protected]">Victor Paléologue</maintainer>
89
<maintainer email="[email protected]">Maxime Busy</maintainer>
910
<maintainer email="[email protected]">Surya Ambrose</maintainer>
1011
<maintainer email="[email protected]">Natalia Lyubova</maintainer>
@@ -13,7 +14,6 @@
1314
<url>http://github.com/ros-naoqi/pepper_meshes2/</url>
1415

1516
<buildtool_depend>ament_cmake</buildtool_depend>
16-
<build_depend>java</build_depend>
1717

1818
<export>
1919
<build_type>ament_cmake</build_type>

0 commit comments

Comments
 (0)