Skip to content

Commit 924629c

Browse files
committed
feat: added ros1 code
1 parent d50aeec commit 924629c

File tree

187 files changed

+44165
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+44165
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Further requirements:
7171
2. (OPTIONAL) Clone and build 'small_gicp'.<br>If this step is omitted, it will be executed as part of the first build.
7272

7373
```bash
74-
cd multisensor_calibration && ./scripts/clone_small_gicp.sh && ./build_and_install_small_gicp.sh
74+
cd multisensor_calibration && ./thirdparty/clone_small_gicp.sh && ./thirdparty/build_and_install_small_gicp.sh
7575
```
7676

7777
3. Initialize `rosdep` and install dependencies:

cmake/gitversion.cmake

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (c) 2024 - 2025 Fraunhofer IOSB and contributors
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
#
6+
# * Redistributions of source code must retain the above copyright
7+
# notice, this list of conditions and the following disclaimer.
8+
#
9+
# * Redistributions in binary form must reproduce the above copyright
10+
# notice, this list of conditions and the following disclaimer in the
11+
# documentation and/or other materials provided with the distribution.
12+
#
13+
# * Neither the name of the Fraunhofer IOSB nor the names of its
14+
# contributors may be used to endorse or promote products derived from
15+
# this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
# POSSIBILITY OF SUCH DAMAGE.
28+
29+
# Need to call git with manually specified paths to repository
30+
set(GIT_BASE_COMMAND git --git-dir "${CMAKE_CURRENT_LIST_DIR}/../.git" --work-tree "${CMAKE_CURRENT_LIST_DIR}/..")
31+
32+
# Trying to get version from git tag / revision
33+
execute_process(COMMAND ${GIT_BASE_COMMAND} describe --always --tags OUTPUT_VARIABLE GIT_TAG)
34+
string(STRIP "${GIT_TAG}" GIT_VERSION) # strip leading and trailing whitespace
35+
36+
# get commit count
37+
execute_process(COMMAND ${GIT_BASE_COMMAND} rev-list HEAD --count OUTPUT_VARIABLE GIT_COMMIT_COUNT)
38+
string(STRIP "${GIT_COMMIT_COUNT}" GIT_COMMIT_COUNT) # strip leading and trailing whitespace
39+
if ("${GIT_COMMIT_COUNT}" STREQUAL "")
40+
set(GIT_COMMIT_COUNT 0)
41+
endif()
42+
43+
# Check if tag name does not consist of 'v' (optional) followed by three digits
44+
# if not append commit count to tag name
45+
if("${GIT_VERSION}" MATCHES "[v]*[0-9]+[.][0-9]+[.][0-9]+.*")
46+
47+
# if preceeding 'v', remove
48+
if("${GIT_VERSION}" MATCHES "^[v].*")
49+
string(SUBSTRING "${GIT_VERSION}" 1 -1 GIT_VERSION)
50+
endif()
51+
52+
# Turn describe output like 0.1.5-42-g652c397 into "0.1.5.42.652c397"
53+
string(REPLACE "-" "." GIT_VERSION "${GIT_VERSION}")
54+
55+
# remove commit hash
56+
string(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+[.]*[0-9]*" GIT_VERSION "${GIT_VERSION}")
57+
58+
else()
59+
60+
# append commit count to tag name
61+
set(GIT_VERSION "0.0.0.${GIT_COMMIT_COUNT}")
62+
endif()
63+
64+
# set return variables
65+
string(REPLACE "." ";" VERSION_LIST "${GIT_VERSION}")
66+
set(VERSION_STR "${GIT_VERSION}")
67+
list(GET VERSION_LIST 0 VERSION_MAJOR)
68+
list(GET VERSION_LIST 1 VERSION_MINOR)
69+
list(GET VERSION_LIST 2 VERSION_PATCH)

0 commit comments

Comments
 (0)