Skip to content

Commit

Permalink
Merge pull request #40 from gergondet/topic/ROS2Support
Browse files Browse the repository at this point in the history
Add ROS2 support and remove obsolete tools
  • Loading branch information
gergondet authored Feb 16, 2024
2 parents e41e72d + 5c4be17 commit cdd045c
Show file tree
Hide file tree
Showing 81 changed files with 1,092 additions and 2,851 deletions.
90 changes: 17 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,87 +19,31 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [gcc]
os: [ubuntu-22.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Temporary APT mirrors cleanup
if: startsWith(runner.os, 'Linux')
run: |
set -e
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
- name: Setup extra APT mirror
if: startsWith(runner.os, 'Linux')
run: |
set -x
set -e
curl -1sLf 'https://dl.cloudsmith.io/public/mc-rtc/head/setup.deb.sh' | sudo -E bash
- name: Install ROS
if: startsWith(runner.os, 'Linux')
run: |
set -e
set -x
pushd .
if [ "${{ matrix.os }}" = "ubuntu-16.04" ]
then
export ROS_DISTRO="kinetic"
elif [ "${{ matrix.os }}" = "ubuntu-18.04" ]
then
export ROS_DISTRO="melodic"
else
export ROS_DISTRO="noetic"
fi
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -qq ros-${ROS_DISTRO}-ros-base ros-${ROS_DISTRO}-tf2-ros ros-${ROS_DISTRO}-tf ros-${ROS_DISTRO}-rviz ros-${ROS_DISTRO}-mc-rtc-plugin
. /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p /tmp/_ci/catkin_ws/src/
cd /tmp/_ci/catkin_ws/src
catkin_init_workspace
cd ../
catkin_make || exit 1
popd
- name: Setup env
if: matrix.os == 'macos-latest'
run: |
export PATH=/usr/local/opt/qt/bin:$PATH
echo "PATH=${PATH}" >> $GITHUB_ENV
export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5:${CMAKE_PREFIX_PATH}
echo "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV
- name: Install dependencies
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
compiler: gcc
build-type: RelWithDebInfo
ubuntu: |
apt: libltdl-dev qt5-default libqwt-qt5-dev libmc-rtc-dev
macos: |
brew-taps: mc-rtc/mc-rtc
brew: qt5 qwt mc_rtc
github: # Get the head version of mc_rtc
- path: jrl-umi3218/mc_rtc
options: -DPYTHON_BINDING:BOOL=OFF
- name: Build and test
if: matrix.os == 'macos-latest'
uses: jrl-umi3218/github-actions/build-cmake-project@master
apt-mirrors:
mc-rtc:
cloudsmith: mc-rtc/head
apt: libmc-rtc-dev libqwt-qt5-dev
ros: |
apt: mc-rtc-plugin
- name: Install Qt5
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
compiler: gcc
build-type: RelWithDebInfo
macos-options: '-DCMAKE_CXX_STANDARD=17'
ubuntu: |
apt: qt5-default
- name: Build with catkin
if: startsWith(runner.os, 'Linux')
run: |
set -e
set -x
PROJECT_DIR=`pwd`
cd /tmp/_ci/catkin_ws
cp -r $PROJECT_DIR src/
. devel/setup.bash
catkin_make || exit 1
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: jrl-umi3218/github-actions/build-catkin-project@master
- name: Build with colcon
if: ${{ matrix.os != 'ubuntu-20.04' }}
uses: jrl-umi3218/github-actions/build-colcon-project@master
- name: Slack Notification
if: failure()
uses: archive/github-actions-slack@master
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ jobs:
uses: jrl-umi3218/github-actions/.github/workflows/package-project.yml@master
with:
with-ros: true
latest-cmake: true
matrix: |
{
"dist": ["bionic", "focal"],
"dist": ["bionic", "focal", "jammy"],
"arch": ["amd64"]
}
secrets:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This stack requires:
Installing
------

## Ubuntu LTS (16.04, 18.04, 20.04)
## Ubuntu LTS (18.04, 20.04. 22.04)

You must first setup our package mirror:

Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt → debian/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ enable_testing()
find_package(catkin)

if(${catkin_FOUND})
add_subdirectory(mc_log_visualization)
add_subdirectory(mc_convex_visualization)
add_subdirectory(mc_rtc_ticker)
add_subdirectory(mc_surfaces_visualization)
endif()

add_subdirectory(mc_rtc_rviz_panel)
Empty file added debian/COLCON_IGNORE
Empty file.
9 changes: 6 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ Vcs-git: https://github.com/jrl-umi3218/mc_rtc_msgs
Vcs-Browser: https://github.com/jrl-umi3218/mc_rtc_msgs
Build-Depends: debhelper (>= 9),
cmake,
qt5-default,
qtbase5-dev | qt5-default,
libqwt-qt5-dev,
# ros-@ROS_DISTRO@-mc-rtc-plugin,
# ros-@ROS_DISTRO@-rviz,
# ros-@ROS_DISTRO@-tf,
#ROS1 ros-@ROS_DISTRO@-rviz,
#ROS1 ros-@ROS_DISTRO@-tf,
#ROS2 ros-@ROS_DISTRO@-rviz2,
#ROS2 ros-@ROS_DISTRO@-tf2,
#ROS2 ros-@ROS_DISTRO@-visualization-msgs,
libmc-rtc-dev
37 changes: 4 additions & 33 deletions debian/control.ros
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@

Package: ros-@ROS_DISTRO@-mc-convex-visualization
Architecture: any
Section: science
Depends: ${misc:Depends},
${shlibs:Depends},
ros-@ROS_DISTRO@-rviz
Description: mc-rtc - Convex visualization
RViZ based tools to visualize convexes

Package: ros-@ROS_DISTRO@-mc-log-visualization
Architecture: any
Section: science
Depends: ${misc:Depends},
${shlibs:Depends},
ros-@ROS_DISTRO@-rviz
Description: mc-rtc - Log visualization
RViZ based tools to visualize logs

Package: ros-@ROS_DISTRO@-mc-rtc-rviz-panel
Architecture: any
Section: science
Depends: ${mic:Depends},
${shlibs:Depends},
ros-@ROS_DISTRO@-rviz
#ROS1 ros-@ROS_DISTRO@-rviz
#ROS2 ros-@ROS_DISTRO@-rviz2
Description: mc-rtc - RViZ panel
RViZ plugin implementing mc_rtc GUI

Expand All @@ -34,22 +17,10 @@ Depends: ${misc:Depends},
Description: mc-rtc - ROS ticker
mc_rtc interface implementation using ROS for kinematic simulations

Package: ros-@ROS_DISTRO@-mc-surfaces-visualization
Architecture: any
Section: science
Depends: ${misc:Depends},
${shlibs:Depends},
ros-@ROS_DISTRO@-rviz
Description: mc-rtc - Surfaces visualization
RViZ based tools to visualize surfaces

Package: ros-@ROS_DISTRO@-mc-rtc-tools
Architecture: any
Section: science
Depends: ros-@ROS_DISTRO@-mc-convex-visualization,
ros-@ROS_DISTRO@-mc-log-visualization,
ros-@ROS_DISTRO@-mc-rtc-rviz-panel,
ros-@ROS_DISTRO@-mc-rtc-ticker,
ros-@ROS_DISTRO@-mc-surfaces-visualization
Depends: ros-@ROS_DISTRO@-mc-rtc-rviz-panel,
ros-@ROS_DISTRO@-mc-rtc-ticker
Description: mc-rtc - ROS tools
Collection of ROS-based tools for mc_rtc
3 changes: 0 additions & 3 deletions debian/ros-ROS_DISTRO-mc-convex-visualization.install

This file was deleted.

3 changes: 0 additions & 3 deletions debian/ros-ROS_DISTRO-mc-log-visualization.install

This file was deleted.

9 changes: 7 additions & 2 deletions debian/ros-ROS_DISTRO-mc-rtc-rviz-panel.install
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
opt/ros/@ROS_DISTRO@/lib/libmc_rtc_rviz_panel.so
opt/ros/@ROS_DISTRO@/lib/mc_rtc_rviz_panel/mc_rtc_gui
opt/ros/@ROS_DISTRO@/lib/pkgconfig/mc_rtc_rviz_panel.pc
#ROS1 opt/ros/@ROS_DISTRO@/lib/mc_rtc_rviz_panel/mc_rtc_gui
#ROS1 opt/ros/@ROS_DISTRO@/lib/pkgconfig/mc_rtc_rviz_panel.pc
#ROS2 opt/ros/@ROS_DISTRO@/bin/mc_rtc_gui
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/package_run_dependencies/mc_rtc_rviz_panel
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/packages/mc_rtc_rviz_panel
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/parent_prefix_path/mc_rtc_rviz_panel
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/rviz_common__pluginlib__plugin/mc_rtc_rviz_panel
opt/ros/@ROS_DISTRO@/share/mc_rtc_rviz_panel/*
6 changes: 4 additions & 2 deletions debian/ros-ROS_DISTRO-mc-rtc-ticker.install
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
opt/ros/@ROS_DISTRO@/lib/mc_rtc_ticker/*
opt/ros/@ROS_DISTRO@/lib/pkgconfig/mc_rtc_ticker.pc
#ROS1 opt/ros/@ROS_DISTRO@/lib/pkgconfig/mc_rtc_ticker.pc
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/package_run_dependencies/mc_rtc_ticker
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/packages/mc_rtc_ticker
#ROS2 opt/ros/@ROS_DISTRO@/share/ament_index/resource_index/parent_prefix_path/mc_rtc_ticker
opt/ros/@ROS_DISTRO@/share/mc_rtc_ticker/*
3 changes: 0 additions & 3 deletions debian/ros-ROS_DISTRO-mc-surfaces-visualization.install

This file was deleted.

48 changes: 28 additions & 20 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
#!/usr/bin/make -f
# -*- makefile -*-

SRC:=$(CURDIR)
TMP:=$(CURDIR)/debian/tmp

export ROS_DISTRO=@ROS_DISTRO@
ifeq (${ROS_DISTRO},)
export CMAKE_OPTIONS=
export EXTRA_STEPS=
export ROS_DISTRO:=@ROS_DISTRO@
export ROS_VERSION:=$(shell . /opt/ros/${ROS_DISTRO}/setup.sh && echo $$ROS_VERSION)
export ROS_PYTHON_VERSION:=$(shell . /opt/ros/${ROS_DISTRO}/setup.sh && echo $$ROS_PYTHON_VERSION)
ifeq (${ROS_PYTHON_VERSION}, 3)
export PYTHONPATH:=/opt/ros/${ROS_DISTRO}/lib/python3/dist-packages:${PYTHONPATH}
export PYTHONPATH:=/opt/ros/${ROS_DISTRO}/lib/python$(shell python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}');")/site-packages:${PYTHONPATH}
export PYTHON_EXECUTABLE:=/usr/bin/python3
else
export ROS_PYTHON_VERSION:=$(shell . /opt/ros/${ROS_DISTRO}/setup.sh && echo $$ROS_PYTHON_VERSION)
ifeq (${ROS_PYTHON_VERSION}, 3)
export PYTHONPATH:=/opt/ros/${ROS_DISTRO}/lib/python3/dist-packages:${PYTHONPATH}
export PYTHON_EXECUTABLE=/usr/bin/python3
else
export PYTHONPATH:=/opt/ros/${ROS_DISTRO}/lib/python2.7/dist-packages:${PYTHONPATH}
export PYTHON_EXECUTABLE=/usr/bin/python
endif
export PKG_CONFIG_PATH=/opt/ros/${ROS_DISTRO}/lib/pkgconfig:$PKG_CONFIG_PATH
export ROS_MASTER_URI=http://localhost:11311
export ROS_PACKAGE_PATH=/opt/ros/${ROS_DISTRO}/share
export CMAKE_PREFIX_PATH=/opt/ros/${ROS_DISTRO}:$CMAKE_PREFIX_PATH
export CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=/opt/ros/${ROS_DISTRO} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
export PYTHONPATH:=/opt/ros/${ROS_DISTRO}/lib/python2.7/dist-packages:${PYTHONPATH}
export PYTHON_EXECUTABLE:=/usr/bin/python
endif
export PKG_CONFIG_PATH:=/opt/ros/${ROS_DISTRO}/lib/pkgconfig:$PKG_CONFIG_PATH
export ROS_MASTER_URI:=http://localhost:11311
export ROS_PACKAGE_PATH:=/opt/ros/${ROS_DISTRO}/share
export LD_LIBRARY_PATH:=/opt/ros/${ROS_DISTRO}/lib:$LD_LIBRARY_PATH
export CMAKE_PREFIX_PATH:=/opt/ros/${ROS_DISTRO}:$CMAKE_PREFIX_PATH
# Default CMake options for Debian packaging
export CMAKE_OPTIONS:=-DCMAKE_BUILD_TYPE=None -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_AUTOGEN_VERBOSE=ON
export CMAKE_OPTIONS:=${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=/opt/ros/${ROS_DISTRO} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}


%:
dh $@

override_dh_auto_configure:
dh_auto_configure -- ${CMAKE_OPTIONS}
cmake -S $(SRC)/mc_rtc_ticker -B $(SRC)/build/mc_rtc_ticker ${CMAKE_OPTIONS}
cmake -S $(SRC)/mc_rtc_rviz_panel -B $(SRC)/build/mc_rtc_rviz_panel ${CMAKE_OPTIONS}

override_dh_auto_build:
cmake --build $(SRC)/build/mc_rtc_ticker
cmake --build $(SRC)/build/mc_rtc_rviz_panel

override_dh_auto_install:
dh_auto_install --destdir=$(TMP)
${EXTRA_STEPS}
cd $(SRC)/build/mc_rtc_ticker && make -j1 install DESTDIR=$(TMP) AM_UPDATE_INFO_DIR=no
cd $(SRC)/build/mc_rtc_rviz_panel && make -j1 install DESTDIR=$(TMP) AM_UPDATE_INFO_DIR=no

override_dh_auto_test:
3 changes: 0 additions & 3 deletions mc_convex_visualization/.gitmodules

This file was deleted.

33 changes: 0 additions & 33 deletions mc_convex_visualization/CMakeLists.txt

This file was deleted.

24 changes: 0 additions & 24 deletions mc_convex_visualization/README.md

This file was deleted.

Loading

0 comments on commit cdd045c

Please sign in to comment.