Skip to content

Commit

Permalink
fix(ad_service_state_monitor): modify build error in rolling (#716)
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
wep21 authored and yn-mrse committed Dec 20, 2022
1 parent 43125ee commit 05c54e0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
7 changes: 7 additions & 0 deletions system/ad_service_state_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ ament_auto_add_executable(ad_service_state_monitor

target_link_libraries(ad_service_state_monitor glog)

# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
target_compile_definitions(ad_service_state_monitor PRIVATE
USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
)
endif()

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>

#include <tf2/utils.h>

#include <deque>
#include <string>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

#include "ad_service_state_monitor/ad_service_state_monitor_node.hpp"

#include <tf2_geometry_msgs/tf2_geometry_msgs.h>

#include <deque>
#include <memory>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

#include "ad_service_state_monitor/ad_service_state_monitor_node.hpp"

#include <tf2_geometry_msgs/tf2_geometry_msgs.h>

#include <string>
#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "ad_service_state_monitor/state_machine.hpp"

#include <deque>
#include <vector>

#define FMT_HEADER_ONLY
#include "ad_service_state_monitor/state_machine.hpp"

#define FMT_HEADER_ONLY // NOLINT
#include <fmt/format.h>
#include <tf2/utils.h>

#ifdef USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

namespace
{
Expand Down

0 comments on commit 05c54e0

Please sign in to comment.