Skip to content

Commit ed1fa5a

Browse files
committed
Update trajopt_example.cpp
1 parent 93cb7c0 commit ed1fa5a

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

doc/examples/trajopt_planner/src/trajopt_example.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,19 @@
1717
#include <moveit_msgs/PlanningScene.h>
1818

1919
#include <geometry_msgs/TransformStamped.h>
20-
#include <tf2/utils.hpp>
21-
#include <tf2_eigen/tf2_eigen.hpp>
22-
#include <tf2_ros/transform_listener.hpp>
20+
21+
// TODO(mosfet80): remove else after EOL galactic
22+
#if __has_include(<tf2/utils.hpp>)
23+
#include <tf2/utils.hpp>
24+
#include <tf2_eigen/tf2_eigen.hpp>
25+
#include <tf2_ros/transform_listener.hpp>
26+
#else
27+
#include <tf2/utils.h>
28+
#include <tf2_eigen/tf2_eigen.h>
29+
#include <tf2_ros/transform_listener.h>
30+
#endif
31+
32+
2333

2434
/* Author: Omid Heidari
2535
Desc: This file is a test for using trajopt in MoveIt. The goal is to make different types of constraints in

0 commit comments

Comments
 (0)