Skip to content

Commit

Permalink
Fix order of include directories (#320)
Browse files Browse the repository at this point in the history
* Fix order of include directories

Merge Franka_INCLUDE_DIRS and catkin_INCLUDE_DIRS,
which may both come from /opt/ros or overlayed workspaces,
in topological order.

---------

Co-authored-by: Zheng Qu <zheng.qu@franka.de>
  • Loading branch information
rhaschke and Maverobot committed Feb 3, 2023
1 parent 2d458ab commit dd66f3f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Requires `libfranka` >= 0.8.0
* `franka_gazebo`: Offer both `panda.launch` and `fr3.launch`.
* `franka_gazebo`: Fix velocity control by adding the missing effort.
* `franka_control`: Clear the error flag if the robot is in `kIdle` mode, i.e. ready to move.
* Fix a possible compilation error by sorting include directories by topological order ([#319](https://github.com/frankaemika/franka_ros/issues/319)).

## 0.10.1 - 2022-09-15

Expand Down
5 changes: 3 additions & 2 deletions franka_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ if(NOT Franka_FOUND)
find_package(Franka 0.8.0 REQUIRED)
endif()

# merge Franka + catkin INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

catkin_package(
INCLUDE_DIRS include
LIBRARIES franka_state_controller
Expand Down Expand Up @@ -60,7 +63,6 @@ target_link_libraries(franka_state_controller
)

target_include_directories(franka_state_controller SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
target_include_directories(franka_state_controller PUBLIC
Expand All @@ -83,7 +85,6 @@ target_link_libraries(franka_control_node
)

target_include_directories(franka_control_node SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)

Expand Down
4 changes: 3 additions & 1 deletion franka_example_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ if(NOT Franka_FOUND)
find_package(Franka 0.8.0 REQUIRED)
endif()

# merge Franka + INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

add_message_files(FILES
JointTorqueComparison.msg
)
Expand Down Expand Up @@ -97,7 +100,6 @@ target_link_libraries(franka_example_controllers PUBLIC
)

target_include_directories(franka_example_controllers SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
Expand Down
4 changes: 3 additions & 1 deletion franka_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ endif()
find_package(Eigen3 REQUIRED)
find_package(orocos_kdl REQUIRED)

# merge Franka + catkin INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

catkin_package(
CATKIN_DEPENDS
roscpp
Expand Down Expand Up @@ -96,7 +99,6 @@ target_link_libraries(franka_hw_sim
${orocos_kdl_LIBRARIES}
)
target_include_directories(franka_hw_sim SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
Expand Down
4 changes: 3 additions & 1 deletion franka_gripper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ if(NOT Franka_FOUND)
find_package(Franka 0.8.0 REQUIRED)
endif()

# merge Franka + catkin INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

add_action_files(
DIRECTORY action
FILES Grasp.action
Expand Down Expand Up @@ -63,7 +66,6 @@ target_link_libraries(franka_gripper
)

target_include_directories(franka_gripper SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
target_include_directories(franka_gripper PUBLIC
Expand Down
5 changes: 3 additions & 2 deletions franka_hw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ if(NOT Franka_FOUND)
find_package(Franka 0.8.0 REQUIRED)
endif()

# merge Franka + catkin INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

catkin_package(
INCLUDE_DIRS include
LIBRARIES franka_hw franka_control_services
Expand Down Expand Up @@ -62,7 +65,6 @@ target_link_libraries(franka_hw
)

target_include_directories(franka_hw SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
target_include_directories(franka_hw PUBLIC
Expand All @@ -89,7 +91,6 @@ target_link_libraries(franka_control_services
)

target_include_directories(franka_control_services SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)

Expand Down
4 changes: 3 additions & 1 deletion franka_visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ if(NOT Franka_FOUND)
find_package(Franka 0.8.0 REQUIRED)
endif()

# merge Franka + catkin INCLUDE_DIRS in topological order
list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${Franka_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

catkin_package(CATKIN_DEPENDS sensor_msgs roscpp)

set(EXECUTABLES robot_joint_state_publisher gripper_joint_state_publisher)
Expand All @@ -27,7 +30,6 @@ foreach(executable ${EXECUTABLES})
${catkin_EXPORTED_TARGETS}
)
target_include_directories(${executable} SYSTEM PUBLIC
${Franka_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
target_link_libraries(${executable} PUBLIC
Expand Down

0 comments on commit dd66f3f

Please sign in to comment.