Skip to content

Commit 119235b

Browse files
authored
Merge branch 'master' into eye_display
2 parents 5377c1d + 935b001 commit 119235b

33 files changed

+1416
-52
lines changed

.github/workflows/config.yml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -205,26 +205,19 @@ jobs:
205205
run: |
206206
rm -fr ${{ matrix.ROS_DISTRO }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.run_id }} || echo "OK"
207207
208+
208209
# ROS-O setup for v4hn https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
209210
# ROS-O setup for techfak https://ros.packages.techfak.net/
210211
# note that v4hn uses ROS_DISTRO=one and techfak uses ROS_DISTRO
211212
ros-o:
212-
runs-on: ubuntu-latest
213-
214213
strategy:
215214
fail-fast: false
216215
matrix:
217-
include:
218-
- DISTRO: ubuntu:22.04
219-
ROS_ONE_VARIANT: v4hn
220-
ROS_REPOSITORY_URL: "deb [trusted=yes] https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository ./"
221-
ROSDEP_PACKAGE_MAPPING: "yaml https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository/local.yaml debian"
222-
- DISTRO: ubuntu:24.04
223-
ROS_ONE_VARIANT: techfak
224-
ROS_REPOSITORY_URL: "deb [trusted=yes] https://ros.packages.techfak.net noble-testing main"
225-
ROSDEP_PACKAGE_MAPPING: "yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
216+
DEB_DISTRO: [22.04, 24.04]
217+
ARCH: [x64, arm64]
218+
ROS_ONE_VARIANT: [techfak]
226219

227-
container: ${{ matrix.DISTRO }}
220+
runs-on: ${{ matrix.ARCH == 'x64' && format('ubuntu-{0}', matrix.DEB_DISTRO) || (matrix.ARCH == 'arm64' && format('ubuntu-{0}-arm', matrix.DEB_DISTRO) || format('ubuntu-{0}', matrix.DEB_DISTRO)) }}
228221

229222
env:
230223
DEBIAN_FRONTEND : noninteractive
@@ -236,40 +229,48 @@ jobs:
236229
- name: Setup ROS-O deb repository
237230
run: |
238231
set -x
239-
apt update && apt install -qq -y ca-certificates git
240-
echo ${{ matrix.ROS_REPOSITORY_URL }} | tee /etc/apt/sources.list.d/ros-o-builder.list
232+
sudo apt update && sudo apt install -qq -y ca-certificates git
233+
if [[ "${{ matrix.DEB_DISTRO }}" == "22.04" ]]; then export CODE_NAME="jammy"; fi
234+
if [[ "${{ matrix.DEB_DISTRO }}" == "24.04" ]]; then export CODE_NAME="noble"; fi
235+
echo "deb [trusted=yes] https://ros.packages.techfak.net $CODE_NAME-testing main" | sudo tee /etc/apt/sources.list.d/ros-o-builder.list
241236
##
242237
# https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28
243238
# Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow.
244239
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" && "${{ matrix.DISTRO }}" == "ubuntu:24.04" ]]; then apt install -y software-properties-common retry && retry -d 50,10,30,300 -t 12 add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros; fi
245240
##
246-
apt update
241+
sudo apt update
247242
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
248-
apt install -qq -y python3-rosdep2
243+
sudo apt install -qq -y python3-rosdep2
249244
fi
250245
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
251246
# Do not install python3-rosdep2, which is an outdated version of rosdep shipped via the Ubuntu repositories (instead of ROS)!
252-
apt install -qq -y python3-rosdep
253-
rosdep init
247+
sudo apt install -qq -y python3-rosdep
248+
sudo rosdep init
249+
fi
250+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
251+
export ROSDEP_PACKAGE_MAPPING="yaml https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository/local.yaml debian"
252+
fi
253+
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
254+
export ROSDEP_PACKAGE_MAPPING="yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu"
254255
fi
255-
echo ${{ matrix.ROSDEP_PACKAGE_MAPPING }} | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
256+
echo $ROSDEP_PACKAGE_MAPPING | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
256257
rosdep update
257258
shell: bash
258259

259260
- name: Setup catkin-tools
260261
run: |
261262
set -x
262263
# setup catkin tools
263-
apt install -qq -y python3-pip
264+
sudo apt install -qq -y python3-pip
264265
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then
265266
pip3 install catkin-tools==0.9.4
266-
apt install -qq -y catkin
267+
sudo apt install -qq -y catkin
267268
fi
268269
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
269-
apt install -qq -y ros-one-catkin python3-catkin-tools
270+
sudo apt install -qq -y ros-one-catkin python3-catkin-tools
270271
fi
271272
# setup build tools
272-
apt install -qq -y cmake build-essential ros-one-rosbash
273+
sudo apt install -qq -y cmake build-essential ros-one-rosbash
273274
shell: bash
274275

275276
- name: Setup Workspace
@@ -279,10 +280,6 @@ jobs:
279280
# setup workspace
280281
mkdir -p ~/ws/src
281282
cd ~/ws/src
282-
if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then
283-
# TODO: remove these lines and uncomment https://github.com/ubi-agni/ros-builder-action/blob/191fab06004ad5784c28cf2ba2b18f6d163a860d/ros-one.repos#L1089
284-
git clone https://github.com/locusrobotics/catkin_virtualenv.git
285-
fi
286283
ln -sf $GITHUB_WORKSPACE .
287284
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
288285
# check all system packages are able to install, because ROS-O build deb files that needs all packages

.github/workflows/python2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Check Python2
1616
run: |
1717
apt update -q && apt install -y -q python2
18-
python2 -m compileall .
18+
python2 -m compileall -x 'voicevox/' .

3rdparty/aques_talk/CMakeLists.txt

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ find_package(catkin REQUIRED)
55

66
catkin_package()
77

8-
if(DEFINED ENV{GITHUB_ACTIONS})
9-
message(WARNING "skip downloading aques_talk within GithubAction")
10-
return()
11-
endif()
128
# Considering the use of docker in addition to the usual use,
139
# we use dpkg-architecture command instead of ${CMAKE_SYSTEM_PROCESSOR} to get the architecture.
1410
# https://stackoverflow.com/a/58222507
@@ -30,14 +26,32 @@ message(STATUS "AQTK2_LNX_LIB_DIR : ${AQTK2_LNX_LIB_DIR}")
3026

3127
#
3228
include(ExternalProject)
29+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/download/src/)
30+
set(LIBRARY_URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip)
31+
file(DOWNLOAD
32+
${LIBRARY_URL}
33+
${CMAKE_CURRENT_BINARY_DIR}/download/src/aqtk2-lnx-eva_230.zip
34+
STATUS DOWNLOAD_STATUS
35+
LOG DOWNLOAD_LOG
36+
SHOW_PROGRESS
37+
)
38+
list(GET DOWNLOAD_STATUS 0 DOWNLOAD_CODE)
39+
list(GET DOWNLOAD_STATUS 1 DOWNLOAD_MESSAGE)
40+
if(NOT DOWNLOAD_CODE EQUAL 0)
41+
message(WARNING "Download failed with status: ${DOWNLOAD_CODE}")
42+
message(WARNING "Error message: ${DOWNLOAD_MESSAGE}")
43+
message(WARNING "Log: ${DOWNLOAD_LOG}")
44+
else()
3345
externalproject_add(aqtk2-lnx-eva
3446
PREFIX download
35-
URL https://www.a-quest.com/archive/package/aqtk2-lnx-eva_230.zip
47+
URL ${LIBRARY_URL}
48+
URL_HASH MD5=4b0641066a826d0be7a016a162ab4043
3649
TIMEOUT 120
3750
CONFIGURE_COMMAND bash -c "echo configure"
3851
BUILD_COMMAND bash -c "(cd ${AQTK2_LNX_LIB_DIR} && ln -sf libAquesTalk2Eva.so.2.3 libAquesTalk2.so && ln -sf libAquesTalk2Eva.so.2.3 libAquesTalk2.so.2)"
3952
INSTALL_COMMAND bash -c "cp -P ${AQTK2_LNX_LIB_DIR}/libAquesTalk2* ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION} && mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/phont/ && cp phont/* ${CMAKE_CURRENT_SOURCE_DIR}/phont/"
4053
BUILD_IN_SOURCE 1
54+
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
4155
)
4256

4357
include_directories(${CMAKE_CURRENT_BINARY_DIR}/download/src/aqtk2-lnx-eva/${AQTK2_LNX_LIB_DIR})
@@ -48,16 +62,17 @@ target_link_libraries(SampleTalk AquesTalk2)
4862

4963
# Make compilation depend on our target:
5064
add_dependencies(SampleTalk aqtk2-lnx-eva)
65+
endif()
5166

5267
# install
53-
install(FILES text2wave
54-
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
68+
catkin_install_python(PROGRAMS text2wave
69+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
5570

5671
install(DIRECTORY launch
5772
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
5873
USE_SOURCE_PERMISSIONS)
5974

60-
if(CATKIN_ENABLE_TESTING)
75+
if(CATKIN_ENABLE_TESTING AND DOWNLOAD_CODE EQUAL 0)
6176
find_package(catkin REQUIRED COMPONENTS rostest)
6277
if("${ARCHITECTURE}" MATCHES x86_64* OR "${ARCHITECTURE}" MATCHES i[0-9]86*)
6378
add_rostest(test/test_aques_talk.test)

3rdparty/voicevox/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build
2+
dict
3+
lib
4+
node_scripts/voicevox_engine
5+
requirements.txt
6+
!.gitignore

3rdparty/voicevox/CMakeLists.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(voicevox)
3+
4+
find_package(catkin REQUIRED
5+
COMPONENTS
6+
catkin_virtualenv
7+
)
8+
9+
catkin_python_setup()
10+
11+
set(INSTALL_DIR ${PROJECT_SOURCE_DIR})
12+
13+
catkin_package()
14+
15+
find_package(Python3 QUIET COMPONENTS Interpreter)
16+
if(NOT Python3_FOUND)
17+
message(WARNING "voicevox requires python3")
18+
return()
19+
endif()
20+
# generate the virtualenv
21+
find_package(Python3 QUIET COMPONENTS Interpreter)
22+
if(Python3_FOUND)
23+
message(STATUS "Found Python: ${Python3_EXECUTABLE}")
24+
message(STATUS "Python Version: ${Python3_VERSION}")
25+
endif()
26+
27+
if("$ENV{ROS_DISTRO}" STREQUAL "melodic")
28+
set(REQUIREMENTS_TXT_FILE requirements_melodic.txt)
29+
elseif(Python3_VERSION VERSION_LESS "3.12")
30+
set(REQUIREMENTS_TXT_FILE requirements_noetic.txt)
31+
else()
32+
set(REQUIREMENTS_TXT_FILE requirements_python3.12.txt)
33+
endif()
34+
catkin_generate_virtualenv(
35+
INPUT_REQUIREMENTS ${REQUIREMENTS_TXT_FILE}
36+
PYTHON_INTERPRETER python3
37+
USE_SYSTEM_PACKAGES FALSE
38+
CHECK_VENV FALSE # Default TRUE
39+
)
40+
41+
add_custom_command(
42+
OUTPUT voicevox_model_installed
43+
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.model
44+
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
45+
INSTALL_DIR=${INSTALL_DIR}
46+
)
47+
48+
49+
add_custom_command(
50+
OUTPUT voicevox_core_installed
51+
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.core
52+
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
53+
INSTALL_DIR=${INSTALL_DIR}
54+
)
55+
56+
add_custom_command(
57+
OUTPUT voicevox_engine_installed
58+
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.engine
59+
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
60+
INSTALL_DIR=${INSTALL_DIR}
61+
)
62+
63+
add_custom_command(
64+
OUTPUT open_jtalk_dic_installed
65+
COMMAND make -f ${PROJECT_SOURCE_DIR}/Makefile.open_jtalk_dic
66+
MD5SUM_DIR=${PROJECT_SOURCE_DIR}/md5sum
67+
INSTALL_DIR=${INSTALL_DIR}
68+
)
69+
70+
add_custom_target(all_installed ALL DEPENDS
71+
voicevox_model_installed
72+
voicevox_core_installed
73+
voicevox_engine_installed
74+
open_jtalk_dic_installed)
75+
76+
file(GLOB NODE_SCRIPTS_FILES node_scripts/*.py)
77+
catkin_install_python(
78+
PROGRAMS ${NODE_SCRIPTS_FILES}
79+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}/node_scripts/
80+
)
81+
install(DIRECTORY node_scripts/voicevox_engine
82+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/catkin_virtualenv_scripts/
83+
USE_SOURCE_PERMISSIONS)
84+
install(DIRECTORY launch dict
85+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
86+
USE_SOURCE_PERMISSIONS)
87+
install(PROGRAMS bin/text2wave
88+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bin)
89+
90+
install(DIRECTORY
91+
${INSTALL_DIR}/lib
92+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
93+
USE_SOURCE_PERMISSIONS)

3rdparty/voicevox/LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2021 Hiroshiba Kazuyuki
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3rdparty/voicevox/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
all:
2+
make -f Makefile.core
3+
make -f Makefile.model
4+
make -f Makefile.engine
5+
make -f Makefile.open_jtalk_dic
6+
clean:
7+
make -f Makefile.core clean
8+
make -f Makefile.model clean
9+
make -f Makefile.engine clean
10+
make -f Makefile.open_jtalk_dic clean
11+
rm -rf build

3rdparty/voicevox/Makefile.core

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- makefile -*-
2+
3+
all: installed.viocevox_core
4+
5+
VERSION = 0.12.4
6+
MD5SUM_DIR = $(CURDIR)/md5sum
7+
ifeq ($(shell uname -m),x86_64)
8+
DIRNAME = voicevox_core-linux-x64-cpu-$(VERSION)
9+
FILENAME = voicevox_core-linux-x64-cpu-$(VERSION).zip
10+
SOURCE_DIR = build/voicevox_core-linux-x64-cpu-$(VERSION)
11+
MD5SUM_FILE = $(MD5SUM_DIR)/core-linux-x64-cpu.md5sum
12+
endif
13+
ifeq ($(shell uname -m),aarch64)
14+
DIRNAME = voicevox_core-linux-arm64-cpu-$(VERSION)
15+
FILENAME = voicevox_core-linux-arm64-cpu-$(VERSION).zip
16+
SOURCE_DIR = build/voicevox_core-linux-arm64-cpu-$(VERSION)
17+
MD5SUM_FILE = $(MD5SUM_DIR)/core-linux-arm64-cpu.md5sum
18+
endif
19+
20+
TARBALL_URL = "https://github.com/VOICEVOX/voicevox_core/releases/download/$(VERSION)/$(FILENAME)"
21+
TARBALL = build/$(FILENAME)
22+
UNPACK_CMD = unzip
23+
SCRIPT_DIR = $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
24+
include $(shell rospack find mk)/download_unpack_build.mk
25+
INSTALL_DIR = './'
26+
27+
28+
installed.viocevox_core: $(SOURCE_DIR)/unpacked
29+
mkdir -p $(INSTALL_DIR)/lib
30+
cp build/$(DIRNAME)/lib*.so $(INSTALL_DIR)/lib/
31+
32+
clean:
33+
rm -rf $(TARBALL)
34+
rm -rf $(SOURCE_DIR)
35+
rm -rf $(INSTALL_DIR)/lib
36+
rm -rf build

3rdparty/voicevox/Makefile.engine

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- makefile -*-
2+
3+
all: installed.voicevox_engine
4+
5+
VERSION = 0.12.4
6+
FILENAME = $(VERSION).tar.gz
7+
TARBALL = build/$(FILENAME)
8+
TARBALL_URL = "https://github.com/VOICEVOX/voicevox_engine/archive/refs/tags/$(FILENAME)"
9+
SOURCE_DIR = build/voicevox_engine-$(VERSION)
10+
UNPACK_CMD = tar xvzf
11+
MD5SUM_DIR = $(CURDIR)/md5sum
12+
MD5SUM_FILE = $(MD5SUM_DIR)/voicevox_engine.tar.gz.md5sum
13+
include $(shell rospack find mk)/download_unpack_build.mk
14+
INSTALL_DIR = './'
15+
16+
17+
installed.voicevox_engine: $(SOURCE_DIR)/unpacked
18+
cp -r build/voicevox_engine-$(VERSION) $(INSTALL_DIR)/node_scripts/voicevox_engine
19+
20+
clean:
21+
rm -rf $(TARBALL)
22+
rm -rf $(SOURCE_DIR)
23+
rm -rf $(INSTALL_DIR)/node_scripts/voicevox_engine
24+
rm -rf build

0 commit comments

Comments
 (0)