Skip to content

Commit

Permalink
[MERGE] Merged master into feat_particle_filter
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGNEAU Romain committed Jul 7, 2024
2 parents 5dabd56 + ef77e09 commit f228e1e
Show file tree
Hide file tree
Showing 63 changed files with 2,525 additions and 1,744 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/ubuntu-dep-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
# Function to get the most recent tag of a remote repository without having to clone it, excluding tag with 'pr' as in Pre Release
FUNCTION_GET_LATEST: 'git -c "versionsort.suffix=-" ls-remote --exit-code --refs --sort="version:refname" --tags ${GIT_ADDRESS} "*.*.*" | cut --delimiter="/" --fields=3 | grep -v -e pr | tail --lines=1'

jobs:
build-ubuntu-dep-src:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -59,7 +63,10 @@ jobs:
run: |
pwd
echo $GITHUB_WORKSPACE
git clone --depth 1 https://github.com/xianyi/OpenBLAS.git ${HOME}/OpenBLAS
GIT_ADDRESS=https://github.com/xianyi/OpenBLAS.git
LATEST_TAG=`eval ${FUNCTION_GET_LATEST}`
echo "Newest tag is ${LATEST_TAG}"
git clone --depth 1 --branch ${LATEST_TAG} ${GIT_ADDRESS} ${HOME}/OpenBLAS
cd ${HOME}/OpenBLAS
mkdir install
make -j$(nproc)
Expand All @@ -74,7 +81,10 @@ jobs:
pwd
echo "GIT_CLONE_PROTECTION_ACTIVE=false" >> $GITHUB_ENV
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone --recursive --depth 1 --branch v9.3.0 https://github.com/Kitware/VTK.git ${HOME}/VTK
GIT_ADDRESS="https://github.com/Kitware/VTK.git"
LATEST_TAG=`eval ${FUNCTION_GET_LATEST}`
echo "Newest tag is ${LATEST_TAG}"
git clone --recursive --depth 1 --branch ${LATEST_TAG} ${GIT_ADDRESS} ${HOME}/VTK
cd ${HOME}/VTK
mkdir build && cd build && mkdir install
cmake .. -DVTK_ANDROID_BUILD=OFF -DVTK_BUILD_DOCUMENTATION=OFF -DVTK_BUILD_EXAMPLES=OFF -DVTK_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release \
Expand All @@ -86,7 +96,10 @@ jobs:
- name: Build OpenCV from source
run: |
pwd
git clone --depth 1 https://github.com/opencv/opencv.git ${HOME}/opencv
GIT_ADDRESS="https://github.com/opencv/opencv.git"
LATEST_TAG=`eval ${FUNCTION_GET_LATEST}`
echo "Newest tag is ${LATEST_TAG}"
git clone --depth 1 --branch ${LATEST_TAG} ${GIT_ADDRESS} ${HOME}/opencv
cd ${HOME}/opencv
mkdir build && cd build && mkdir install
cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install
Expand All @@ -97,7 +110,10 @@ jobs:
- name: Build librealsense2 from source
run: |
pwd
git clone --depth 1 https://github.com/IntelRealSense/librealsense.git ${HOME}/librealsense
GIT_ADDRESS="https://github.com/IntelRealSense/librealsense.git"
LATEST_TAG=`eval ${FUNCTION_GET_LATEST}`
echo "Newest tag is ${LATEST_TAG}"
git clone --depth 1 --branch ${LATEST_TAG} ${GIT_ADDRESS} ${HOME}/librealsense
cd ${HOME}/librealsense
mkdir build && cd build && mkdir install
cmake .. -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install
Expand All @@ -108,7 +124,10 @@ jobs:
- name: Build PCL from source
run: |
pwd
git clone --depth 1 https://github.com/PointCloudLibrary/pcl.git ${HOME}/pcl
GIT_ADDRESS="https://github.com/PointCloudLibrary/pcl.git"
LATEST_TAG=`eval ${FUNCTION_GET_LATEST}`
echo "Newest tag is ${LATEST_TAG}"
git clone --depth 1 --branch ${LATEST_TAG} ${GIT_ADDRESS} ${HOME}/pcl
cd ${HOME}/pcl
mkdir build && cd build && mkdir install
cmake .. -DBUILD_tools=OFF -DBUILD_global_tests=OFF -DPCL_DISABLE_GPU_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install
Expand Down
3 changes: 2 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ ViSP 3.x.x (Version in development)
. New tutorials in tutorial/segmentation/color folder to show how to use HSV color segmentation to
extract the corresponding point cloud
. New scene renderer based on Panda3D. See inheritance diagram for vpPanda3DBaseRenderer class and corresponding
tutorial.
tutorial
. New docker image for Ubuntu 24.04 in docker folder
- Applications
. Migrate eye-to-hand tutorials in apps
- Tutorials
Expand Down
126 changes: 81 additions & 45 deletions ci/docker/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,88 @@
FROM ubuntu:18.04
MAINTAINER Fabien Spindler <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive
ARG VISPCI_USER_UID=1001
ARG DOCKER_GROUP_GID=130
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with new repo
RUN apt-get update
# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
mercurial \
nano \
net-tools \
python3 \
python3-dev \
python3-pip \
python3-dbg \
python3-empy \
python3-numpy \
python3-pip \
python3-psutil \
python3-venv \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Install packages
RUN apt-get install -y \
sudo \
build-essential \
cmake \
git \
net-tools \
iputils-ping \
# Recommended ViSP 3rd parties
libopencv-dev \
libx11-dev \
liblapack-dev \
libeigen3-dev \
libdc1394-22-dev \
libv4l-dev \
libzbar-dev \
libpthread-stubs0-dev \
# Other optional 3rd parties
libpcl-dev \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev
# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
&& apt-get clean

RUN adduser --disabled-password --gecos "" --uid $VISPCI_USER_UID vispci \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo vispci \
&& usermod -aG docker vispci \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers \
&& adduser vispci video
# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libpcl-dev \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev \
&& apt-get clean

ENV HOME=/home/vispci
# Set Locale
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
Expand All @@ -54,16 +92,14 @@ RUN mkdir -p ${HOME}/visp-ws \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Get visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp

# Build visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j4

USER vispci
&& make -j$(nproc)

WORKDIR /home/vispci
CMD ["/bin/bash"]
130 changes: 85 additions & 45 deletions ci/docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,92 @@
FROM ubuntu:20.04
MAINTAINER Fabien Spindler <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive
ARG VISPCI_USER_UID=1001
ARG DOCKER_GROUP_GID=130
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with new repo
RUN apt-get update
# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
mercurial \
nano \
net-tools \
python3 \
python3-dev \
python3-pip \
python3-dbg \
python3-empy \
python3-numpy \
python3-pip \
python3-psutil \
python3-venv \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Install packages
RUN apt-get install -y \
sudo \
build-essential \
cmake \
git \
net-tools \
iputils-ping \
# Recommended ViSP 3rd parties
libopencv-dev \
libx11-dev \
liblapack-dev \
libeigen3-dev \
libdc1394-22-dev \
libv4l-dev \
libzbar-dev \
libpthread-stubs0-dev \
# Other optional 3rd parties
libpcl-dev \
libcoin-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev
# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
nlohmann-json3-dev \
&& apt-get clean

RUN adduser --disabled-password --gecos "" --uid $VISPCI_USER_UID vispci \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo vispci \
&& usermod -aG docker vispci \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers \
&& adduser vispci video
# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libcoin-dev \
libdmtx-dev \
libgsl-dev \
libjpeg-dev \
libogre-1.9-dev \
libois-dev \
libpcl-dev \
libpng-dev \
&& apt-get clean

ENV HOME=/home/vispci
# Set Locale
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
Expand All @@ -54,16 +96,14 @@ RUN mkdir -p ${HOME}/visp-ws \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Get visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp

# Build visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j4

USER vispci
&& make -j$(nproc)

WORKDIR /home/vispci
CMD ["/bin/bash"]
Loading

0 comments on commit f228e1e

Please sign in to comment.