Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ros-o / Ubuntu 22.04 #512

Merged
merged 17 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,62 @@ jobs:
if: always()
run: |
rm -fr ${{ matrix.ROS_DISTRO }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.run_id }} || echo "OK"

# ROS-O setup https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions
ros-o:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- DISTRO: ubuntu:22.04
ROS_REPOSITORY_URL: https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository

container: ${{ matrix.DISTRO }}

env:
DEBIAN_FRONTEND : noninteractive

steps:
- name: Chcekout Source
uses: actions/[email protected]

- name: Setup ROS-O deb repository
run: |
set -x
apt update && apt install -qq -y ca-certificates
echo "deb [trusted=yes] ${{ matrix.ROS_REPOSITORY_URL }}/ ./" | tee /etc/apt/sources.list.d/ros-o-builder.list
apt update
apt install -qq -y python3-rosdep2
echo "yaml ${{ matrix.ROS_REPOSITORY_URL }}/local.yaml debian" | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list
rosdep update

- name: Setup catkin-tools
run: |
set -x
# setup catkin tools
apt install -qq -y python3-pip
pip3 install catkin-tools
# setup build tools
apt install -qq -y cmake build-essential catkin ros-one-rosbash

- name: Setup Workspace
run: |
source /opt/ros/one/setup.bash
set -x
# setup workspace
mkdir -p ~/ws/src
cd ~/ws/src
ln -sf $GITHUB_WORKSPACE .
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
shell: bash

- name: Compile Packages
run: |
source /opt/ros/one/setup.bash
set -x
cd ~/ws/
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
shell: bash

2 changes: 1 addition & 1 deletion 3rdparty/downward/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ externalproject_add(downward
URL http://cdn.rawgit.com/jsk-ros-pkg/archives/master/Fast-Downward-f33d3b65601f.tar.gz
TIMEOUT 120
CONFIGURE_COMMAND ""
BUILD_COMMAND cd src && sed -i "s@^CXXFLAGS =$@CXXFLAGS = ${CXXFLAGS_NOETIC} -Wno-maybe-uninitialized@" search/Makefile && ./build_all DOWNWARD_BITWIDTH=native && patch -p3 < ${PROJECT_SOURCE_DIR}/fix_time_clock.patch
BUILD_COMMAND cd src && sed -i "s@^CXXFLAGS =$@CXXFLAGS = ${CXXFLAGS_NOETIC} -Wno-deprecated-copy -Wno-maybe-uninitialized@" search/Makefile && patch -p3 < ${PROJECT_SOURCE_DIR}/fix_std_vector_namespace.patch && ./build_all DOWNWARD_BITWIDTH=native && patch -p3 < ${PROJECT_SOURCE_DIR}/fix_time_clock.patch
INSTALL_COMMAND bash -c "cp -rf --parents src/{validate,plan,preprocess/preprocess,search/downward*,search/unitcost,search/portfolio.py,translate} ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}"
BUILD_IN_SOURCE 1
)
Expand Down
10 changes: 10 additions & 0 deletions 3rdparty/downward/fix_std_vector_namespace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- src/downward/src/search/landmarks/landmark_factory_zhu_givan.h.bak 2024-11-13 13:20:10.508657847 +0900
+++ src/downward/src/search/landmarks/landmark_factory_zhu_givan.h 2024-11-13 13:20:12.591485789 +0900
@@ -7,6 +7,7 @@
#include "../globals.h"

using namespace __gnu_cxx;
+using std::vector;

class LandmarkFactoryZhuGivan : public LandmarkFactory {
private:
2 changes: 1 addition & 1 deletion 3rdparty/ff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MAKE_ARGS = ADDONS=-DYY_SKIP_YYWRAP

installed:$(SOURCE_DIR)/unpacked
rm -f $(SOURCE_DIR)/ff
(cd $(SOURCE_DIR) && $(MAKE) clean && $(MAKE) CFLAGS='-O6 -g -ansi -Wno-array-bounds -Wno-endif-labels -Wno-format-overflow -Wno-implicit-function-declaration -Wno-int-in-bool-context -Wno-unused-function -Wno-unused-variable -fno-builtin-strncpy -fno-builtin-strcpy -fno-builtin-strlen -fno-builtin-strcat -fno-builtin-memset ' $(MAKE_ARGS))
(cd $(SOURCE_DIR) && $(MAKE) clean && $(MAKE) CFLAGS='-O6 -g -ansi -Wno-array-bounds -Wno-endif-labels -Wno-format-overflow -Wno-implicit-function-declaration -Wno-int-in-bool-context -Wno-unused-function -Wno-unused-variable -fno-builtin-strncpy -fno-builtin-strcpy -fno-builtin-strlen -fno-builtin-strcat -fno-builtin-memset -fcommon ' $(MAKE_ARGS))
mkdir -p bin
cp $(SOURCE_DIR)/ff bin/
touch installed
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/ffha/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(SOURCE_DIR)/patched:$(SOURCE_DIR)/unpacked
touch $(SOURCE_DIR)/patched

installed:$(SOURCE_DIR)/patched
(cd $(SOURCE_DIR) && $(MAKE) clean && $(MAKE) CFLAGS='-O6 -g -ansi -Wno-array-bounds -Wno-endif-labels -Wno-format-overflow -Wno-implicit-function-declaration -Wno-int-in-bool-context -Wno-unused-function -Wno-unused-variable -fno-builtin-strncpy -fno-builtin-strcpy -fno-builtin-strlen -fno-builtin-strcat -fno-builtin-memset ' $(MAKE_ARGS))
(cd $(SOURCE_DIR) && $(MAKE) clean && $(MAKE) CFLAGS='-O6 -g -ansi -Wno-array-bounds -Wno-endif-labels -Wno-format-overflow -Wno-implicit-function-declaration -Wno-int-in-bool-context -Wno-unused-function -Wno-unused-variable -fno-builtin-strncpy -fno-builtin-strcpy -fno-builtin-strlen -fno-builtin-strcat -fno-builtin-memset -fcommon ' $(MAKE_ARGS))
mkdir -p bin
cp $(SOURCE_DIR)/ffha bin/
touch installed
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libsiftfast/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ clone: $(SVN_DIR)
patch: clone
cd $(SVN_DIR) && svn revert --recursive . && for patch in $(SOURCE_DIR)/patches/0*.patch; do patch -p0 -f -E < $$patch; done
# for python3
if [ "${ROS_DISTRO}" \> "melodic" ]; then cd $(SVN_DIR) && svn revert --recursive . && for patch in $(SOURCE_DIR)/patches/1*.patch; do patch -p0 -f -E < $$patch; done; fi
if [ "${ROS_DISTRO}" != "kinetic" -a "${ROS_DISTRO}" != "melodic" ]; then cd $(SVN_DIR) && svn revert --recursive . && for patch in $(SOURCE_DIR)/patches/1*.patch; do patch -p0 -f -E < $$patch; done; fi

libsiftfast: patch
cd $(SVN_DIR)/$(BUILDDIR) && BOOST_INCLUDEDIR=$(BOOST_INCLUDE_DIRS) BOOST_LIBRARYDIR=$(BOOST_LIBRARY_DIRS) cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) .. && make $(ROS_PARALLEL_JOBS) install
Expand Down
8 changes: 5 additions & 3 deletions 3rdparty/libsiftfast/patches/10.boost_python38.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 54)
+++ CMakeLists.txt (working copy)
@@ -155,7 +155,8 @@
@@ -155,7 +155,10 @@
if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
set(Boost_LIBRARY_DIRS $ENV{BOOST_LIBRARYDIR})
endif()
-find_package(Boost COMPONENTS python)
+find_package(Boost REQUIRED COMPONENTS system python38)
+set(Python3_FIND_STRATEGY VERSION)
+find_package(Python3 COMPONENTS Interpreter Development)
+find_package(Boost REQUIRED COMPONENTS system python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
+add_definitions("-Wno-narrowing")

if( Boost_FOUND )
Expand All @@ -17,7 +19,7 @@ Index: CMakeLists.txt
#
set(BUILD_SIFTFASTPY)
-if( Boost_PYTHON_FOUND )
+if( Boost_PYTHON38_FOUND )
+if( Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND )
find_package(PythonLibs)

if( PYTHONLIBS_FOUND OR PYTHON_LIBRARIES )
Expand Down
8 changes: 4 additions & 4 deletions 3rdparty/zdepth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ project(zdepth)

include(ExternalProject)

if("$ENV{ROS_DISTRO}" STRGREATER "kinetic")
if(("$ENV{ROS_DISTRO}" STREQUAL "indigo") OR ("$ENV{ROS_DISTRO}" STREQUAL "kinetic"))
install(CODE "message(WARNING \"Skipping zdepth install because ROS is too old\")")
else()
ExternalProject_Add(
zdepth
GIT_REPOSITORY https://github.com/catid/Zdepth.git
GIT_TAG ac7c6d8e944d07be2404e5a1eaa04562595f3756
GIT_SHALLOW TRUE
PATCH_COMMAND cat ${PROJECT_SOURCE_DIR}/fix_cmakelists.patch | patch -p1
PATCH_COMMAND cat ${PROJECT_SOURCE_DIR}/fix_cmakelists.patch | patch -p1 --forward || true # If there is no --forward, the build process hangs because the patch command waits interactively for input on whether a file that has already been patched can be patched again. If there is no || true , the patch command returns non-zero status if you try to use it on the patched file, then catkin build failes
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND echo "install"
)

install(CODE "execute_process(COMMAND make install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zdepth-prefix/src/zdepth-build)")
else()
install(CODE "message(WARNING \"Skipping zdepth install because ROS is too old\")")
endif()
10 changes: 5 additions & 5 deletions dialogflow_task_executive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo")
catkin_generate_virtualenv(PYTHON_INTERPRETER python2
# https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed
EXTRA_PIP_ARGS -vvv --cert=${CMAKE_BINARY_DIR}/cacert.pem)
elseif("$ENV{ROS_DISTRO}" STRGREATER "melodic")
elseif("$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR "$ENV{ROS_DISTRO}" STREQUAL "melodic")
catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in.noetic
PYTHON_INTERPRETER python3
INPUT_REQUIREMENTS requirements.in
PYTHON_INTERPRETER python2
)
else()
catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in
PYTHON_INTERPRETER python2
INPUT_REQUIREMENTS requirements.in.noetic
PYTHON_INTERPRETER python3
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion jsk_3rdparty/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<run_depend>zdepth</run_depend>

<!-- jsk_ros_patch/ dir -->
<run_depend>collada_urdf_jsk_patch</run_depend>
<!-- <run_depend>collada_urdf_jsk_patch</run_depend> -->
<!-- <run_depend>depth_image_proc_jsk_patch</run_depend> -->
<!-- <run_depend>eecart_imped_jsk_patch</run_depend> -->
<run_depend>laser_filters_jsk_patch</run_depend>
Expand Down
11 changes: 9 additions & 2 deletions jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ project(collada_urdf_jsk_patch)
if(("$ENV{ROS_DISTRO}" STREQUAL "groovy") OR ("$ENV{ROS_DISTRO}" STREQUAL "hydro"))
set(SOURCE_DISTRO hydro-devel)
set(GIT_REPO robot_model)
elseif ("$ENV{ROS_DISTRO}" STRLESS "melodic")
elseif (("$ENV{ROS_DISTRO}" STREQUAL "indigo") OR ("$ENV{ROS_DISTRO}" STREQUAL "jade") OR ("$ENV{ROS_DISTRO}" STREQUAL "kinetic"))
set(SOURCE_DISTRO bd4fc369d56eaa0c31d8cb17677e00b9d9685de6) # 1.11.13, before strip indigo
set(GIT_REPO robot_model)
elseif ("$ENV{ROS_DISTRO}" STREQUAL "melodic" OR "$ENV{ROS_DISTRO}" STRGREATER "melodic")
elseif (("$ENV{ROS_DISTRO}" STREQUAL "melodic") OR ("$ENV{ROS_DISTRO}" STREQUAL "noetic"))
set(SOURCE_DISTRO 923c5d33bd245e82134e8ae02e4c9d379e80eb27) # 1.12.12
set(GIT_REPO collada_urdf)
else()
find_package(catkin REQUIRED)
catkin_package(CATKIN_DEPENDS)
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/CATKIN_IGNORE)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CATKIN_IGNORE #catkin_lint: ignore_once missing_file
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
return()
endif()
if ("$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR "$ENV{ROS_DISTRO}" STRGREATER "kinetic")
set(CXXFLAGS CXXFLAGS=-std=gnu++11)
Expand Down
6 changes: 3 additions & 3 deletions respeaker_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ generate_dynamic_reconfigure_options(

catkin_package()

if($ENV{ROS_DISTRO} STRGREATER "melodic")
if("$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR "$ENV{ROS_DISTRO}" STREQUAL "melodic")
catkin_generate_virtualenv(
PYTHON_INTERPRETER python3
PYTHON_INTERPRETER python2
CHECK_VENV FALSE
)
elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo")
Expand All @@ -28,7 +28,7 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo")
)
else()
catkin_generate_virtualenv(
PYTHON_INTERPRETER python2
PYTHON_INTERPRETER python3
CHECK_VENV FALSE
)
endif()
Expand Down
8 changes: 5 additions & 3 deletions sesame_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ catkin_package(
CATKIN_DEPENDS message_runtime
)

if($ENV{ROS_DISTRO} STRGREATER "melodic")
if($ENV{ROS_DISTRO} STREQUAL "kinetic" OR $ENV{ROS_DISTRO} STREQUAL "melodic")
catkin_generate_virtualenv(
PYTHON_INTERPRETER python3
PYTHON_INTERPRETER python2
CHECK_VENV FALSE
)
elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo")
file(DOWNLOAD http://curl.haxx.se/ca/cacert.pem ${CMAKE_BINARY_DIR}/cacert.pem)
Expand All @@ -33,7 +34,8 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo")
)
else()
catkin_generate_virtualenv(
PYTHON_INTERPRETER python2
PYTHON_INTERPRETER python3
CHECK_VENV FALSE
)
endif()

Expand Down
1 change: 0 additions & 1 deletion sesame_ros/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
asn1crypto==1.3.0
certifi==2020.6.20
cffi==1.14.0
chardet==3.0.4
cryptography==2.3
enum34==1.1.10
Expand Down
Loading