Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to ROS2 galactic #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 49 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5.1)
project(kelo_tulip)

find_package(catkin REQUIRED COMPONENTS
roscpp
geometry_msgs
nav_msgs
sensor_msgs
std_msgs
tf
)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

# find_package(catkin REQUIRED COMPONENTS
# roscpp
# geometry_msgs
# nav_msgs
# sensor_msgs
# std_msgs
# tf
# )

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(tf2 REQUIRED)

#set(Boost_USE_STATIC_LIBS ON)
find_package(Boost REQUIRED COMPONENTS thread)

if(WIN32)
set(INCLUDE_DIRS
set(INCLUDE_DIRS_KELO
include
include/kelo_tulip/soem
include/kelo_tulip/soem/osal
Expand All @@ -23,7 +36,7 @@ if(WIN32)
${WINPCAP_INCLUDE_DIRS}
)
else(WIN32)
set(INCLUDE_DIRS
set(INCLUDE_DIRS_KELO
include
include/kelo_tulip/soem
include/kelo_tulip/soem/osal
Expand All @@ -32,14 +45,9 @@ else(WIN32)
)
endif(WIN32)

catkin_package(
INCLUDE_DIRS ${INCLUDE_DIRS}
LIBRARIES tulip_velocity_controller
)

include_directories(
${INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${INCLUDE_DIRS_KELO}
# ${catkin_INCLUDE_DIRS}
)

# Optionally apply cap_net_raw+ep permissions to binary. Requires root previleges.
Expand All @@ -59,8 +67,9 @@ add_library(tulip_velocity_controller
)

target_link_libraries(tulip_velocity_controller
${catkin_LIBRARIES}
# ${catkin_LIBRARIES}
${Boost_LIBRARIES}
${rclcpp_LIBRARIES}
)

add_executable(platform_driver
Expand All @@ -72,10 +81,11 @@ add_executable(platform_driver

target_link_libraries(platform_driver
tulip_velocity_controller
${catkin_LIBRARIES}
# ${catkin_LIBRARIES}
${Boost_LIBRARIES}
soem
pthread
${rclcpp_LIBRARIES}
)

IF(USE_SETCAP)
Expand All @@ -85,20 +95,33 @@ IF(USE_SETCAP)
endif(USE_SETCAP)

install(TARGETS platform_driver
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
DESTINATION include/${PROJECT_NAME}
)

install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
DESTINATION share/${PROJECT_NAME}/config
)

install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
DESTINATION share/${PROJECT_NAME}/launch
)

ament_export_include_directories(
include
${INCLUDE_DIRS_KELO}
)

ament_export_libraries(
tulip_velocity_controller
)

ament_package(
# INCLUDE_DIRS ${INCLUDE_DIRS}
# LIBRARIES tulip_velocity_controller
)
26 changes: 16 additions & 10 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
<?xml version="1.0"?>
<package>
<package format="2">
<name>kelo_tulip</name>
<version>1.0.0</version>
<description>KELO Tulip software</description>
<author email="[email protected]">walter</author>
<maintainer email="[email protected]">walter</maintainer>
<license>internal</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<depend>rclcpp</depend>

<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
<build_depend>tf2</build_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>tf2</exec_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading