Skip to content

Commit fe56a84

Browse files
committed
FIX: rosbridge build with latest tf2
1 parent 3d53ef2 commit fe56a84

File tree

7 files changed

+25
-8
lines changed

7 files changed

+25
-8
lines changed

appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# version format
2-
version: 2.14.8-{branch}-build{build}
2+
version: 2.14.9-{branch}-build{build}
33

44
os: Visual Studio 2019
55

@@ -18,13 +18,13 @@ build_script:
1818
- copy cmakemodules\registerExtension.nsh "C:\Program Files (x86)\NSIS\Include\"
1919
- cd c:\projects\mrpt\build\
2020
# Build debug libraries
21-
# - cmake --build . --config Debug --target all_mrpt_libs
21+
# - cmake --build . --config Debug --target all_mrpt_libs
2222
# re-call CMake to detect the debug libs and all them to the install package:
23-
# - cmake .
23+
# - cmake .
2424
# Do unit tests:
2525
- cmake --build . --config Release --target test_legacy
2626
# All seem OK. Build all.
27-
# - cmake --build . --config Release
27+
# - cmake --build . --config Release
2828
# Build package:
2929
- cmake --build . --config Release --target PACKAGE
3030
# Rename package:
@@ -91,22 +91,22 @@ on_failure:
9191
# artifacts configuration #
9292
#---------------------------------#
9393
artifacts:
94-
- path: 'mrpt*.exe'
94+
- path: "mrpt*.exe"
9595

9696
#---------------------------------#
9797
# deployment configuration #
9898
#---------------------------------#
9999
deploy:
100100
- provider: GitHub
101101
release: "Release of v$(APPVEYOR_REPO_TAG_NAME) [Windows binaries]"
102-
description: 'Windows binary releases (nightly builds) from AppVeyor.'
102+
description: "Windows binary releases (nightly builds) from AppVeyor."
103103
auth_token:
104104
secure: vUzG+a7umHCzqv0eUNXZS/dczNSMiJ37Ivuv50aIPXhYQenlxUiua+Merj/pjCmy
105105
artifact: /.*\.exe/
106106
draft: false
107107
prerelease: false
108108
on:
109-
APPVEYOR_REPO_TAG: true # deploy on tag push only
109+
APPVEYOR_REPO_TAG: true # deploy on tag push only
110110
- provider: GitHub
111111
release: "Windows nightly builds"
112112
description: '**Build timestamp: %APPVEYOR_REPO_COMMIT_TIMESTAMP%**\nWindows binary releases (develop) from AppVeyor CI.\nAPPVEYOR_BUILD_VERSION=%APPVEYOR_BUILD_VERSION%\nGit commit: %APPVEYOR_REPO_COMMIT% %APPVEYOR_REPO_COMMIT_MESSAGE%'

cmakemodules/script_ros.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ if (NOT DISABLE_ROS)
146146
# Convert package versions to hex so they can be used in preprocessor for wider
147147
# versions compatibility of "one-source for all":
148148
mrpt_version_to_hex(cv_bridge_VERSION cv_bridge_VERSION_HEX)
149+
mrpt_version_to_hex(tf2_VERSION tf2_VERSION_HEX)
149150

150151

151152
# Kinda hack to prevent build farm to time out for "dev" jobs:

doc/source/doxygen-docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
\page changelog Change Log
22

3+
# Version 2.14.9: Released May 17th, 2025
4+
- BUG FIXES:
5+
- Fix build with latest tf2 version.
6+
37
# Version 2.14.8: Released Apr 25th, 2025
48
- Build system:
59
- Fix build w/o OpenCV.

libs/ros2bridge/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ if(BUILD_mrpt-ros2bridge)
6767
target_compile_definitions(ros2bridge PRIVATE ${ROS_DEFINITIONS})
6868
target_compile_definitions(ros2bridge PRIVATE IS_MRPT_ROS2BRIDGE)
6969
target_compile_definitions(ros2bridge PRIVATE CV_BRIDGE_VERSION=${cv_bridge_VERSION_HEX})
70+
target_compile_definitions(ros2bridge PRIVATE TF2_VERSION=${tf2_VERSION_HEX})
7071
endif()

libs/ros2bridge/include/mrpt/ros2bridge/pose.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
#include <mrpt/math/TPose2D.h>
1515
#include <mrpt/math/TPose3D.h>
1616
#include <mrpt/poses/poses_frwds.h>
17+
18+
#if TF2_VERSION >= 0x004201
19+
#include <tf2/LinearMath/Matrix3x3.hpp>
20+
#include <tf2/LinearMath/Transform.hpp>
21+
#else
1722
#include <tf2/LinearMath/Matrix3x3.h>
1823
#include <tf2/LinearMath/Transform.h>
24+
#endif
1925

2026
#include <cstring> // size_t
2127
#include <geometry_msgs/msg/pose_with_covariance.hpp>

libs/ros2bridge/src/pose.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@
4242
#include <mrpt/poses/CPosePDFGaussian.h>
4343
#include <mrpt/poses/CPosePDFGaussianInf.h>
4444
#include <mrpt/ros2bridge/pose.h>
45+
46+
#if TF2_VERSION >= 0x004201
47+
#include <tf2/LinearMath/Matrix3x3.hpp>
48+
#else
4549
#include <tf2/LinearMath/Matrix3x3.h>
50+
#endif
4651

4752
// MRPT -> ROS functions:
4853
tf2::Matrix3x3 mrpt::ros2bridge::toROS(const mrpt::math::CMatrixDouble33& src)

version_prefix.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2.14.8
1+
2.14.9
22
# IMPORTANT: This file is parsed by CMake, don't add any comment to
33
# the first line.
44
# This file is used in both Windows and Linux scripts to automatically

0 commit comments

Comments
 (0)