Skip to content

Commit

Permalink
Merge pull request #515 from goldbattle/dockerfile
Browse files Browse the repository at this point in the history
Ubuntu 20.04 and CI Dockerfiles
  • Loading branch information
goldbattle authored May 3, 2022
2 parents 445b946 + b933194 commit c528449
Show file tree
Hide file tree
Showing 167 changed files with 2,467 additions and 1,529 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docker_1604_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "ROS1 Ubuntu 16.04"

on:
push:
branches: [ master, dockerfile ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Create Workspace
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
cd $GITHUB_WORKSPACE/.. && mkdir src/ &&
mv $REPO/ src/ && mkdir $REPO/ && mv src/ $REPO/ && cd $REPO/
- name: Build Docker
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
docker build -t kalibr -f $GITHUB_WORKSPACE/src/$REPO/Dockerfile_ros1_16_04 .
23 changes: 23 additions & 0 deletions .github/workflows/docker_1804_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "ROS1 Ubuntu 18.04"

on:
push:
branches: [ master, dockerfile ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Create Workspace
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
cd $GITHUB_WORKSPACE/.. && mkdir src/ &&
mv $REPO/ src/ && mkdir $REPO/ && mv src/ $REPO/ && cd $REPO/
- name: Build Docker
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
docker build -t kalibr -f $GITHUB_WORKSPACE/src/$REPO/Dockerfile_ros1_18_04 .
23 changes: 23 additions & 0 deletions .github/workflows/docker_2004_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "ROS1 Ubuntu 20.04"

on:
push:
branches: [ master, dockerfile ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Create Workspace
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
cd $GITHUB_WORKSPACE/.. && mkdir src/ &&
mv $REPO/ src/ && mkdir $REPO/ && mv src/ $REPO/ && cd $REPO/
- name: Build Docker
run: |
export REPO=$(basename $GITHUB_REPOSITORY) &&
docker build -t kalibr -f $GITHUB_WORKSPACE/src/$REPO/Dockerfile_ros1_20_04 .
26 changes: 26 additions & 0 deletions .github/workflows/industrial_ci_action.yml.disable
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

# This determines when this workflow is run
on: [push, pull_request] # on all pushes and PRs

jobs:
CI:
strategy:
matrix:
env:
- {ROS_DISTRO: melodic}
- {ROS_DISTRO: noetic}
env:
CCACHE_DIR: /github/home/.ccache # Enable ccache
NOT_TEST_BUILD: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# This step will fetch/store the directory used by ccache before/after the ci run
- uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
# Run industrial_ci
- uses: 'ros-industrial/industrial_ci@master'
env: ${{ matrix.env }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ CMakeLists.txt.user

# MacOS Desktop Services Store
.DS_Store

# Jetbrains Clion
cmake-build-*
.idea
build
Build
56 changes: 56 additions & 0 deletions Dockerfile_ros1_16_04
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM osrf/ros:kinetic-desktop-full


# Dependencies we use, catkin tools is very good build system
# https://github.com/ethz-asl/kalibr/wiki/installation
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
git wget autoconf automake \
python2.7-dev python-pip python-scipy python-matplotlib \
ipython python-wxgtk3.0 python-tk python-igraph \
libeigen3-dev libboost-all-dev libsuitesparse-dev \
doxygen \
libopencv-dev \
libpoco-dev libtbb-dev libblas-dev liblapack-dev libv4l-dev \
python-catkin-tools


# Create the workspace and build kalibr in it
ENV WORKSPACE /catkin_ws

RUN mkdir -p $WORKSPACE/src && \
cd $WORKSPACE && \
catkin init && \
catkin config --extend /opt/ros/kinetic && \
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

ADD . $WORKSPACE/src/kalibr
# RUN cd $WORKSPACE/src &&\
# git clone https://github.com/ori-drs/kalibr.git

RUN cd $WORKSPACE &&\
catkin build -j$(nproc)


# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash















50 changes: 50 additions & 0 deletions Dockerfile_ros1_18_04
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM osrf/ros:melodic-desktop-full


# Dependencies we use, catkin tools is very good build system
# https://github.com/ethz-asl/kalibr/wiki/installation
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
git wget autoconf automake nano \
python3-dev python-pip python-scipy python-matplotlib \
ipython python-wxgtk4.0 python-tk python-igraph \
libeigen3-dev libboost-all-dev libsuitesparse-dev \
doxygen \
libopencv-dev \
libpoco-dev libtbb-dev libblas-dev liblapack-dev libv4l-dev \
python-catkin-tools


# Create the workspace and build kalibr in it
ENV WORKSPACE /catkin_ws

RUN mkdir -p $WORKSPACE/src && \
cd $WORKSPACE && \
catkin init && \
catkin config --extend /opt/ros/melodic && \
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

ADD . $WORKSPACE/src/kalibr
# RUN cd $WORKSPACE/src &&\
# git clone https://github.com/ori-drs/kalibr.git

RUN cd $WORKSPACE &&\
catkin build -j$(nproc)


# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash









46 changes: 46 additions & 0 deletions Dockerfile_ros1_20_04
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM osrf/ros:noetic-desktop-full


# Dependencies we use, catkin tools is very good build system
# https://github.com/ethz-asl/kalibr/wiki/installation
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
git wget autoconf automake nano \
python3-dev python3-pip python3-scipy python3-matplotlib \
ipython3 python3-wxgtk4.0 python3-tk python3-igraph \
libeigen3-dev libboost-all-dev libsuitesparse-dev \
doxygen \
libopencv-dev \
libpoco-dev libtbb-dev libblas-dev liblapack-dev libv4l-dev \
python3-catkin-tools python3-osrf-pycommon


# Create the workspace and build kalibr in it
ENV WORKSPACE /catkin_ws

RUN mkdir -p $WORKSPACE/src && \
cd $WORKSPACE && \
catkin init && \
catkin config --extend /opt/ros/noetic && \
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

ADD . $WORKSPACE/src/kalibr
# RUN cd $WORKSPACE/src &&\
# git clone https://github.com/ori-drs/kalibr.git

RUN cd $WORKSPACE &&\
catkin build -j$(nproc)


# When a user runs a command we will run this code before theirs
# This will allow for using the manual focal length if it fails to init
# https://github.com/ethz-asl/kalibr/pull/346
ENTRYPOINT export KALIBR_MANUAL_FOCAL_LENGTH_INIT=1 && \
# /bin/bash -c "source \"$WORKSPACE/devel/setup.bash\"" && \
cd $WORKSPACE && \
/bin/bash





4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Kalibr](https://raw.githubusercontent.com/wiki/ethz-asl/kalibr/images/kalibr_small.png)

*Ubuntu 14.04+ROS indigo*: [![Build Status](https://jenkins.asl.ethz.ch/buildStatus/icon?job=kalibr_weekly/label=ubuntu-trusty)](https://jenkins.asl.ethz.ch/job/kalibr_weekly/label=ubuntu-trusty/) *Ubuntu 16.04+ROS kinetic*: [![Build Status](https://jenkins.asl.ethz.ch/buildStatus/icon?job=kalibr_weekly/label=ubuntu-trusty)](https://jenkins.asl.ethz.ch/job/kalibr_weekly/label=ubuntu-xenial/)
<!--*Ubuntu 14.04+ROS indigo*: [![Build Status](https://jenkins.asl.ethz.ch/buildStatus/icon?job=kalibr_weekly/label=ubuntu-trusty)](https://jenkins.asl.ethz.ch/job/kalibr_weekly/label=ubuntu-trusty/) *Ubuntu 16.04+ROS kinetic*: [![Build Status](https://jenkins.asl.ethz.ch/buildStatus/icon?job=kalibr_weekly/label=ubuntu-trusty)](https://jenkins.asl.ethz.ch/job/kalibr_weekly/label=ubuntu-xenial/)-->

## Introduction
Kalibr is a toolbox that solves the following calibration problems:
Expand All @@ -17,6 +17,8 @@ Kalibr is a toolbox that solves the following calibration problems:

**For questions or comments, please open an issue on Github.**



## Tutorial: IMU-camera calibration
A video tutorial for the IMU-camera calibration can be found here:

Expand Down
44 changes: 34 additions & 10 deletions Schweizer-Messer/numpy_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(numpy_eigen)

find_package(catkin REQUIRED COMPONENTS cmake_modules python_module)
include_directories(${catkin_INCLUDE_DIRS})
set(CMAKE_CXX_STANDARD 14)

find_package(catkin REQUIRED COMPONENTS python_module)
find_package(Boost REQUIRED COMPONENTS system)
find_package(Eigen REQUIRED)
find_package(Eigen3 REQUIRED)

catkin_python_setup()

add_definitions(${EIGEN_DEFINITIONS})
include_directories(include ${Eigen_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
include_directories(include ${EIGEN3_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
include_directories("${PROJECT_SOURCE_DIR}/include/numpy_eigen")

catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME}
DEPENDS
DEPENDS Boost
CFG_EXTRAS numpy_eigen-extras.cmake
)
add_definitions(-std=c++0x -D__STRICT_ANSI__)
add_definitions(-D__STRICT_ANSI__)

# ignore "error: return-statement with a value, in function returning ‘void’" in "__multiarray_api.h"
add_compile_options(-fpermissive)

include_directories(include ${Boost_INCLUDE_DIRS})

Expand Down Expand Up @@ -46,8 +51,27 @@ add_python_export_library(${PROJECT_NAME}_test
## Testing ##
#############
if(CATKIN_ENABLE_TESTING)

## Add nosetest based cpp test target.
catkin_add_nosetests(test/numpy_eigen_tests.py)

endif()

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

##################
## Installation ##
##################

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
Loading

0 comments on commit c528449

Please sign in to comment.