Skip to content

Commit a6f329e

Browse files
authored
Merge pull request #17 from FraunhoferIOSB/feat/small_gicp_vendor
Feat/small gicp vendor
2 parents b0d05e4 + f0d33f9 commit a6f329e

File tree

11 files changed

+61
-123
lines changed

11 files changed

+61
-123
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,10 @@ multisensor_calibration/launch/*
145145
!multisensor_calibration/launch/example
146146
!multisensor_calibration/launch/multi_sensor_calib_example.launch
147147

148-
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,ros,c++
148+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,ros,c++
149+
150+
# Debian packaging
151+
*.deb
152+
*.ddeb
153+
debian/
154+
.obj*/

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Further requirements:
6666
- [**PCL**](https://pointclouds.org/)
6767
- [**OpenCV**](https://opencv.org/)
6868
- [**Qt**](https://www.qt.io/)
69-
- [**small_gicp**](https://github.com/koide3/small_gicp): This is included as git-submodule and will be cloned and built on the first build. It is licensed under the MIT-License.
69+
- [**small_gicp**](https://github.com/koide3/small_gicp): TThe package `small_gicp_vendor` wraps this library to make it available for other ROS components. This is a common practice for third-party libraries without available deb sources. It is licensed under the MIT-License.
7070
- [**OpenMP**](https://www.openmp.org/) (optional): This is used to parallelize and speed up the processing of each point in the point cloud. If not found by CMake the processing will be done sequentially.
7171
- [**Doxygen**](https://www.doxygen.nl/) (optional): If available, this Doxygen documentation will be build automatically.
7272

@@ -78,21 +78,15 @@ Further requirements:
7878
git clone https://github.com/FraunhoferIOSB/multisensor_calibration.git
7979
```
8080

81-
2. (OPTIONAL) Clone and build 'small_gicp'.<br>If this step is omitted, it will be executed as part of the first build.
82-
83-
```bash
84-
cd multisensor_calibration && ./thirdparty/clone_small_gicp.sh && ./thirdparty/build_and_install_small_gicp.sh
85-
```
86-
87-
3. Initialize `rosdep` and install dependencies:
81+
2. Initialize `rosdep` and install dependencies:
8882

8983
```bash
9084
sudo rosdep init
9185
rosdep update
9286
rosdep install --from-paths src -y --ignore-src
9387
```
9488

95-
4. Run `colcon` to build from source:<br>
89+
3. Run `colcon` to build from source:<br>
9690
To build in 'Debug' mode add `-DCMAKE_BUILD_TYPE=Debug` to catkin command.
9791
If 'CMAKE_BUILD_TYPE' omitted, multisensor_calibration will be build in 'Release' mode.
9892

doc/user_docs/installation.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ cd ../../
3737
```
3838
</li>
3939

40-
<li>
41-
(OPTIONAL) Clone and build 'small_gicp'.<br>If this step is omitted, it will be executed as part of the first build.
42-
43-
```bash
44-
src/multisensor_calibration/thirdparty/clone_small_gicp.sh && src/multisensor_calibration/thirdparty/build_and_install_small_gicp.sh
45-
```
46-
</li>
47-
4840
<li>
4941
Initialize `rosdep` and install dependencies:
5042

@@ -103,14 +95,6 @@ git clone https://github.com/FraunhoferIOSB/multisensor_calibration.git
10395
```
10496
</li>
10597

106-
<li>
107-
(OPTIONAL) Clone and build 'small_gicp'.<br>If this step is omitted, it will be executed as part of the first build.
108-
109-
```bash
110-
src/multisensor_calibration/thirdparty/clone_small_gicp.sh && src/multisensor_calibration/thirdparty/build_and_install_small_gicp.sh
111-
```
112-
</li>
113-
11498
<li>
11599
Initialize `rosdep` and install dependencies:
116100

@@ -156,6 +140,6 @@ Apart from the basic catkin requirements, `multisensor_calibration` depends on t
156140
- [**PCL**](https://pointclouds.org/)
157141
- [**OpenCV**](https://opencv.org/)
158142
- [**Qt**](https://www.qt.io/)
159-
- [**small_gicp**](https://github.com/koide3/small_gicp): This is included as git-submodule and will be cloned and built on the first build. It is licensed under the MIT-License.
143+
- [**small_gicp**](https://github.com/koide3/small_gicp): The package `small_gicp_vendor` wraps this library to make it available for other ROS components. This is a common practice for third-party libraries without available deb sources. It is licensed under the MIT-License.
160144
- [**OpenMP**](https://www.openmp.org/) (optional): This is used to parallelize and speed up the processing of each point in the point cloud. If not found by CMake the processing will be done sequentially.
161145
- [**Doxygen**](https://www.doxygen.nl/) (optional): If available, this Doxygen documentation will be build automatically.

multisensor_calibration/CMakeLists.txt

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,8 @@ find_package(OpenCV REQUIRED COMPONENTS
101101
core
102102
calib3d
103103
)
104-
105-
# if small gicp does not exist clone and build
106-
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/install/small_gicp/lib/cmake/small_gicp")
107-
execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/../thirdparty/clone_small_gicp.sh)
108-
execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/../thirdparty/build_and_install_small_gicp.sh)
109-
endif()
110-
111-
find_package(small_gicp REQUIRED
112-
PATHS "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/install/small_gicp/lib/cmake/small_gicp")
113-
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../.git/modules/thirdparty/small_gicp/HEAD"
114-
SMALL_GICP_HEAD_COMMIT_HASH
115-
)
104+
find_package(small_gicp_vendor REQUIRED)
105+
find_package(small_gicp REQUIRED)
116106

117107

118108
find_package(OpenMP)
@@ -144,7 +134,7 @@ set(COMMON_COMPILE_DEFINITIONS
144134
-DEXTRINSIC_LIDAR_REFERENCE_CALIBRATION_TARGET=4
145135
-DEXTRINSIC_LIDAR_VEHICLE_CALIBRATION_TARGET=5
146136
-DMULTI_THREADED
147-
-DSMALL_GICP_HEAD_COMMIT_HASH="${SMALL_GICP_HEAD_COMMIT_HASH}"
137+
-DSMALL_GICP_HEAD_COMMIT_HASH="${small_gicp_VERSION}"
148138
)
149139
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
150140
set(COMMON_COMPILE_DEFINITIONS ${COMMON_COMPILE_DEFINITIONS}
@@ -168,6 +158,8 @@ set(DEPENDENCIES
168158
geometry_msgs
169159
visualization_msgs
170160
multisensor_calibration_interface
161+
small_gicp
162+
small_gicp_vendor
171163
)
172164

173165

@@ -251,9 +243,9 @@ target_compile_definitions(${LIBRARY_TARGET_NAME} PRIVATE
251243
)
252244
ament_target_dependencies(${LIBRARY_TARGET_NAME}
253245
${DEPENDENCIES}
254-
small_gicp
255246
)
256247
ament_export_targets(export_${LIBRARY_TARGET_NAME} HAS_LIBRARY_TARGET)
248+
ament_export_dependencies(${DEPENDENCIES})
257249

258250
rclcpp_components_register_nodes(${LIBRARY_TARGET_NAME} "multisensor_calibration::visualizers::PointCloud2PointCloudDistanceNode")
259251
rclcpp_components_register_nodes(${LIBRARY_TARGET_NAME} "multisensor_calibration::visualizers::PointCloud2ImageNode")

multisensor_calibration/package.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
<depend>tinyxml2</depend>
3535
<depend>urdf</depend>
3636
<depend>rviz_common</depend>
37+
<depend>multisensor_calibration_interface</depend>
38+
39+
<depend>small_gicp_vendor</depend>
3740

3841
<depend>std_msgs</depend>
3942
<depend>sensor_msgs</depend>
4043
<depend>geometry_msgs</depend>
4144
<depend>visualization_msgs</depend>
4245

43-
<depend>multisensor_calibration_interface</depend>
4446

4547
<test_depend>ament_lint_auto</test_depend>
4648
<test_depend>ament_lint_common</test_depend>

small_gicp_vendor/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(small_gicp_vendor)
3+
4+
find_package(ament_cmake REQUIRED)
5+
find_package(ament_cmake_vendor_package REQUIRED)
6+
7+
find_package(small_gicp QUIET)
8+
9+
# Define the URL and branch
10+
set(GITREPO "https://github.com/koide3/small_gicp.git")
11+
set(GITVERSION "master")
12+
13+
ament_vendor(small_gicp_vendor
14+
SATISFIED ${small_gicp_FOUND}
15+
VCS_URL ${GITREPO}
16+
VCS_VERSION ${GITVERSION}
17+
CMAKE_ARGS
18+
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
19+
)
20+
21+
22+
ament_package()

small_gicp_vendor/package.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>small_gicp_vendor</name>
5+
<version>2.0.1</version>
6+
<description>Vendor package for small_gicp. This is just a wrapper to provide ExternalProject build</description>
7+
<maintainer email="[email protected]">miguel</maintainer>
8+
<license>MIT</license> <!-- small_gicp -->
9+
<license>BSD3</license> <!-- small_gicp_vendor -->
10+
11+
<url type="website">https://github.com/koide3/small_gicp</url>
12+
13+
<buildtool_depend>ament_cmake</buildtool_depend>
14+
<buildtool_depend>ament_cmake_vendor_package</buildtool_depend>
15+
16+
<export>
17+
<build_type>ament_cmake</build_type>
18+
</export>
19+
</package>

thirdparty/build_and_install_small_gicp.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

thirdparty/clone_small_gicp.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)