Skip to content

Commit

Permalink
Merge pull request #98 from koide3/jazzy
Browse files Browse the repository at this point in the history
jazzy
  • Loading branch information
koide3 authored Jul 10, 2024
2 parents 93d37dd + 946a775 commit e05398e
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ROS_DISTRO: [humble, noetic]
ROS_DISTRO: [jazzy, humble, noetic]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ROS_DISTRO: [humble, noetic]
ROS_DISTRO: [jazzy, humble, noetic]

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS filesystem program_options)
find_package(Iridescence REQUIRED)

set(OLD_DISTRO "humble;galactic;foxy")
if($ENV{ROS_DISTRO} IN_LIST OLD_DISTRO)
add_definitions(-DCV_BRIDGE_INCLUDE_H)
else()
add_definitions(-DCV_BRIDGE_INCLUDE_HPP)
endif()

find_package(OpenMP)
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
Expand Down
47 changes: 47 additions & 0 deletions docker/jazzy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM koide3/gtsam_docker:jazzy

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
libomp-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
libpcl-dev \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /root
RUN git clone https://github.com/ceres-solver/ceres-solver \
&& mkdir ceres-solver/build \
&& cd ceres-solver/build \
&& cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DUSE_CUDA=OFF \
&& make -j$(nproc) \
&& make install \
&& rm -rf /root/ceres-solver

COPY . /root/ros2_ws/src/direct_visual_lidar_calibration

WORKDIR /root/ros2_ws

RUN apt-fast update && \
rosdep install -i --from-paths src --simulate | \
sed '1d' | sed 's/apt-get install//' | sed 's/ //g' > /tmp/depends && \
xargs apt-fast install --no-install-recommends -y < /tmp/depends && \
apt-fast clean && \
rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c ". /opt/ros/jazzy/setup.bash; colcon build"

RUN echo "#!/bin/bash" >> /ros_entrypoint.sh \
&& echo "set -e" >> /ros_entrypoint.sh \
&& echo "source /opt/ros/jazzy/setup.bash" >> /ros_entrypoint.sh \
&& echo "source /root/ros2_ws/install/setup.bash" >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh \
&& chmod a+x /ros_entrypoint.sh

WORKDIR /root/ros2_ws/src/direct_visual_lidar_calibration

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
51 changes: 51 additions & 0 deletions docker/jazzy/Dockerfile_with_superglue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM koide3/gtsam_docker:jazzy

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
libomp-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /root
RUN git clone https://github.com/ceres-solver/ceres-solver \
&& mkdir ceres-solver/build \
&& cd ceres-solver/build \
&& cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DUSE_CUDA=OFF \
&& make -j$(nproc) \
&& make install \
&& rm -rf /root/ceres-solver

COPY . /root/ros2_ws/src/direct_visual_lidar_calibration

WORKDIR /root/ros2_ws

RUN apt-fast update && \
rosdep install -i --from-paths src --simulate | \
sed '1d' | sed 's/apt-get install//' | sed 's/ //g' > /tmp/depends && \
xargs apt-fast install --no-install-recommends -y < /tmp/depends && \
apt-fast clean && \
rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c ". /opt/ros/jazzy/setup.bash; colcon build"

RUN echo "#!/bin/bash" >> /ros_entrypoint.sh \
&& echo "set -e" >> /ros_entrypoint.sh \
&& echo "source /opt/ros/jazzy/setup.bash" >> /ros_entrypoint.sh \
&& echo "source /root/ros2_ws/install/setup.bash" >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh \
&& chmod a+x /ros_entrypoint.sh

WORKDIR /root/ros2_ws/src/direct_visual_lidar_calibration

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
python3-pip python3-numpy python3-torch python3-torchvision python3-matplotlib python3-opencv \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/magicleap/SuperGluePretrainedNetwork /root/SuperGlue
ENV PYTHONPATH=$PYTHONPATH:/root/SuperGlue


ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
4 changes: 4 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ We provide ROS1/ROS2 docker images on our docker hub repository:
- [koide3/direct_visual_lidar_calibration:noetic ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/koide3/direct_visual_lidar_calibration/noetic)](https://hub.docker.com/repository/docker/koide3/direct_visual_lidar_calibration)
- [koide3/direct_visual_lidar_calibration:humble ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/koide3/direct_visual_lidar_calibration/humble)](https://hub.docker.com/repository/docker/koide3/direct_visual_lidar_calibration)

!!!warning
We avoided including SuperGlue in our images to avoid contamination of its strict license.
If you need the automatic image matching, you must build a docker image with [Dockerfile_with_superglue](https://github.com/koide3/direct_visual_lidar_calibration/tree/main/docker/humble) at your own risk.

## Pull image

```bash
Expand Down
3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repo_url: https://github.com/koide3/direct_visual_lidar_calibration
site_url: https://koide3.github.io/direct_visual_lidar_calibration/
site_description: "LiDAR-Camera extrinsic calibration toolbox"

theme:
theme:
name: material
palette:
primary: indigo
Expand All @@ -23,7 +23,6 @@ markdown_extensions:
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- fontawesome_markdown

copyright: Copyright &copy; 2023 Kenji Koide
extra:
Expand Down
2 changes: 1 addition & 1 deletion scripts/find_matches_superglue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# WARNING: SuperGlue is allowed to be used for non-commercial research purposes!!
# : You must carefully check and follow its licensing condition!!
# : https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/LICENSE
Expand Down
7 changes: 7 additions & 0 deletions src/preprocess_ros2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
#include <rosbag2_cpp/readers/sequential_reader.hpp>
#include <rosbag2_storage/storage_filter.hpp>

#ifdef CV_BRIDGE_INCLUDE_H
#include <cv_bridge/cv_bridge.h>
#elif CV_BRIDGE_INCLUDE_HPP
#include <cv_bridge/cv_bridge.hpp>
#else
#error "File extension of cv_bridge is unknown!!"
#endif

#include <sensor_msgs/msg/image.hpp>
#include <sensor_msgs/msg/compressed_image.hpp>
#include <sensor_msgs/msg/camera_info.hpp>
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/Sophus
Submodule Sophus updated 90 files
+2 −2 .github/ISSUE_TEMPLATE/bug_report.md
+2 −0 .github/semantic.yml
+0 −59 .github/workflows/coverage.yml
+22 −0 .github/workflows/format.yml
+0 −34 .github/workflows/gh_pages.yml
+101 −42 .github/workflows/main.yml
+70 −0 .github/workflows/pybind.yml
+2 −2 .github/workflows/sympy.yml
+1 −1 .gitignore
+45 −0 .pre-commit-config.yaml
+97 −126 CMakeLists.txt
+1 −1 LICENSE.txt
+95 −0 README.md
+0 −44 README.rst
+1 −0 SOPHUS_VERSION
+70 −0 Sophus.code-workspace
+0 −1 SophusConfig.cmake.in
+0 −35 appveyor.yml
+0 −107 cmake_modules/FindEigen3.cmake
+0 −24 doxyfile
+0 −20 doxyrest-config.lua
+30 −5 examples/CMakeLists.txt
+2 −3 examples/custom_ensure_handler.cpp
+5 −0 examples/ensure_example.cpp
+7 −6 examples/hello_so3.cpp
+9 −0 generate_stubs.py
+0 −3 make_docs.sh
+0 −22 package.xml
+0 −54 rst-dir/conf.py
+0 −9 rst-dir/page_index.rst
+0 −23 rst-dir/pysophus.rst
+0 −1 run_format.sh
+0 −21 scripts/install_docs_deps.sh
+0 −27 scripts/install_linux_deps.sh
+0 −14 scripts/install_linux_fmt_deps.sh
+0 −52 scripts/install_osx_deps.sh
+29 −0 scripts/install_osx_deps_incl_ceres.sh
+30 −0 scripts/install_ubuntu_deps_incl_ceres.sh
+0 −12 scripts/run_cpp_tests.sh
+12 −0 scripts/run_cpp_tests_clang.sh
+12 −0 scripts/run_cpp_tests_gcc.sh
+160 −0 setup.py
+23 −30 sophus/average.hpp
+6 −6 sophus/cartesian.hpp
+0 −52 sophus/ceres_local_parameterization.hpp
+3 −1 sophus/ceres_typetraits.hpp
+114 −148 sophus/common.hpp
+2 −2 sophus/interpolate.hpp
+2 −2 sophus/rotation_matrix.hpp
+18 −17 sophus/rxso2.hpp
+9 −9 sophus/rxso3.hpp
+17 −17 sophus/se2.hpp
+14 −14 sophus/se3.hpp
+13 −13 sophus/sim2.hpp
+12 −12 sophus/sim3.hpp
+11 −10 sophus/so2.hpp
+48 −25 sophus/so3.hpp
+56 −70 sophus/test_macros.hpp
+5 −5 sophus/types.hpp
+0 −71 sophus/velocities.hpp
+0 −0 sophus_pybind-stubs/py.typed
+180 −0 sophus_pybind-stubs/sophus_pybind.pyi
+67 −0 sophus_pybind/README
+542 −0 sophus_pybind/SE3PyBind.h
+403 −0 sophus_pybind/SO3PyBind.h
+35 −0 sophus_pybind/SophusPyBind.h
+3 −0 sophus_pybind/bindings.cpp
+369 −0 sophus_pybind/examples/sophus_quickstart_tutorial.ipynb
+187 −0 sophus_pybind/tests/sophusPybindTests.py
+27 −34 sympy/sophus/complex.py
+29 −35 sympy/sophus/dual_quaternion.py
+4 −4 sympy/sophus/matrix.py
+35 −43 sympy/sophus/quaternion.py
+77 −69 sympy/sophus/se2.py
+116 −80 sympy/sophus/se3.py
+53 −60 sympy/sophus/so2.py
+131 −98 sympy/sophus/so3.py
+2 −2 test/CMakeLists.txt
+1 −4 test/ceres/CMakeLists.txt
+1 −16 test/ceres/tests.hpp
+24 −23 test/core/CMakeLists.txt
+13 −13 test/core/test_common.cpp
+6 −4 test/core/test_rxso2.cpp
+6 −4 test/core/test_rxso3.cpp
+2 −2 test/core/test_se2.cpp
+2 −2 test/core/test_se3.cpp
+2 −2 test/core/test_so2.cpp
+4 −4 test/core/test_so3.cpp
+0 −130 test/core/test_velocities.cpp
+62 −59 test/core/tests.hpp

0 comments on commit e05398e

Please sign in to comment.