Skip to content

Commit 08e9684

Browse files
committed
Fix tf*.h Deprecation
1 parent b2004b2 commit 08e9684

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/rviz_visual_tools.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,16 @@
4242
#include <rviz_visual_tools/rviz_visual_tools.hpp>
4343

4444
// Conversions
45+
#if __has_include(<tf2_eigen/tf2_eigen.hpp>)
4546
#include <tf2/convert.hpp>
4647
#include <tf2/LinearMath/Vector3.hpp>
4748
#include <tf2/LinearMath/Quaternion.hpp>
48-
#if __has_include(<tf2_eigen/tf2_eigen.hpp>)
4949
#include <tf2_eigen/tf2_eigen.hpp>
5050
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
5151
#else
52+
#include <tf2/convert.h>
53+
#include <tf2/LinearMath/Vector3.h>
54+
#include <tf2/LinearMath/Quaternion.h>
5255
#include <tf2_eigen/tf2_eigen.h>
5356
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
5457
#endif

src/tf_visual_tools.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434
#include <rclcpp/create_timer.hpp>
3535
#if __has_include(<tf2_eigen/tf2_eigen.hpp>)
3636
#include <tf2_eigen/tf2_eigen.hpp>
37+
#include <tf2/convert.hpp>
3738
#else
3839
#include <tf2_eigen/tf2_eigen.h>
39-
#endif
40-
41-
// TF
4240
#include <tf2/convert.h>
41+
#endif
4342

4443
// C++
4544
#include <string>

0 commit comments

Comments
 (0)