Skip to content

Commit

Permalink
Enhancement/use hpp for headers based on PR moveit/moveit2#3113 (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
CihatAltiparmak authored Dec 25, 2024
1 parent 1e84e19 commit 7c467e6
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/moveit_visual_tools/imarker_end_effector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
#include <interactive_markers/menu_handler.hpp>

// MoveIt
#if __has_include(<moveit/robot_state/robot_state.hpp>)
#include <moveit/robot_state/robot_state.hpp>
#else
#include <moveit/robot_state/robot_state.h>
#endif

// this package
#include <moveit_visual_tools/moveit_visual_tools.h>
Expand Down
4 changes: 4 additions & 0 deletions include/moveit_visual_tools/imarker_robot_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
#include <visualization_msgs/msg/interactive_marker_feedback.hpp>

// MoveIt
#if __has_include(<moveit/robot_state/robot_state.hpp>)
#include <moveit/robot_state/robot_state.hpp>
#else
#include <moveit/robot_state/robot_state.h>
#endif
#include <moveit_visual_tools/moveit_visual_tools.h>

// C++
Expand Down
4 changes: 4 additions & 0 deletions include/moveit_visual_tools/moveit_visual_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
#include <rviz_visual_tools/rviz_visual_tools.hpp>

// MoveIt
#if __has_include(<moveit/planning_scene_monitor/planning_scene_monitor.hpp>)
#include <moveit/planning_scene_monitor/planning_scene_monitor.hpp>
#else
#include <moveit/planning_scene_monitor/planning_scene_monitor.h>
#endif

// MoveIt Messages
#include <moveit_msgs/msg/grasp.hpp>
Expand Down
9 changes: 9 additions & 0 deletions src/imarker_robot_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@
*/

// MoveIt
#if __has_include(<moveit/robot_state/conversions.hpp>)
#include <moveit/robot_state/conversions.hpp>
#else
#include <moveit/robot_state/conversions.h>
#endif

#if __has_include(<moveit/transforms/transforms.hpp>)
#include <moveit/transforms/transforms.hpp>
#else
#include <moveit/transforms/transforms.h>
#endif

// this package
#include <moveit_visual_tools/imarker_robot_state.h>
Expand Down
14 changes: 14 additions & 0 deletions src/moveit_visual_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,23 @@
#include <moveit_msgs/msg/collision_object.hpp>

// MoveIt
#if __has_include(<moveit/robot_state/conversions.hpp>)
#include <moveit/robot_state/conversions.hpp>
#else
#include <moveit/robot_state/conversions.h>
#endif

#if __has_include(<moveit/collision_detection/collision_tools.hpp>)
#include <moveit/collision_detection/collision_tools.hpp>
#else
#include <moveit/collision_detection/collision_tools.h>
#endif

#if __has_include(<moveit/macros/console_colors.hpp>)
#include <moveit/macros/console_colors.hpp>
#else
#include <moveit/macros/console_colors.h>
#endif

// Conversions
#if __has_include(<tf2_eigen/tf2_eigen.hpp>)
Expand Down
4 changes: 4 additions & 0 deletions src/moveit_visual_tools_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
#include <moveit_visual_tools/moveit_visual_tools.h>

// MoveIt
#if __has_include(<moveit/planning_scene_monitor/planning_scene_monitor.hpp>)
#include <moveit/planning_scene_monitor/planning_scene_monitor.hpp>
#else
#include <moveit/planning_scene_monitor/planning_scene_monitor.h>
#endif

// C++
#include <string>
Expand Down

0 comments on commit 7c467e6

Please sign in to comment.