Skip to content
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
92 changes: 38 additions & 54 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,62 @@ project(sick_visionary_ros
VERSION 1.1.2
LANGUAGES CXX)

find_package(catkin REQUIRED COMPONENTS
cv_bridge
diagnostic_updater
pcl_conversions
pcl_ros
image_transport
roscpp
roslaunch
)

find_package(Boost REQUIRED COMPONENTS system)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
# find package for header message type
find_package(std_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(image_transport REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(diagnostic_updater REQUIRED)
find_package(OpenCV REQUIRED)
find_package(PCL 1.3 REQUIRED)

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS pcl_conversions pcl_ros roscpp
)

### COMPILER FLAGS ###
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
find_package(Threads REQUIRED)
find_package(Boost 1.41 REQUIRED COMPONENTS thread system)

### BUILD ###
include_directories(
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
include
sick_visionary_cpp_shared
)

add_subdirectory(sick_visionary_cpp_shared)

add_executable(sick_visionary_t_mini_node src/visionary_t_mini.cpp)
add_executable(sick_visionary_s_node src/visionary_s.cpp)
## ignore visionary_s for ROS2 port

ament_target_dependencies(sick_visionary_t_mini_node
rclcpp
sensor_msgs
std_msgs
builtin_interfaces
image_transport
cv_bridge
diagnostic_updater
OpenCV)
# link against the local shared library built in sick_visionary_cpp_shared
target_link_libraries(sick_visionary_t_mini_node
sick_visionary_cpp_shared
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARY}
)

target_link_libraries(sick_visionary_s_node
sick_visionary_cpp_shared
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARY}
Threads::Threads
Boost::thread
Boost::system
)

add_definitions(${PCL_DEFINITIONS})

### TEST ###
if(CATKIN_ENABLE_TESTING)
roslaunch_add_file_check(launch)
endif()
## skip visionary_s

### INSTALL ###
install(TARGETS sick_visionary_t_mini_node sick_visionary_s_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# install executable
install(TARGETS sick_visionary_t_mini_node
RUNTIME DESTINATION lib/${PROJECT_NAME})

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

install(FILES launch/sick_visionary-t_mini.launch
DESTINATION share/${PROJECT_NAME}/launch
RENAME sick_visionary-t_mini.launch.xml
)

# ament package directive
ament_package()
5 changes: 2 additions & 3 deletions launch/sick_visionary-t_mini.launch
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<!-- Entry point for using OpenNI devices -->
<launch>

<arg name="camera" default="sick_visionary_t_mini" />

<node pkg="sick_visionary_ros" type="sick_visionary_t_mini_node" name="$(arg camera)" output="screen">
<!-- ROS2 launch format -->
<node pkg="sick_visionary_ros" exec="sick_visionary_t_mini_node" name="sick_visionary_t_mini" output="screen">
<!-- IP address of the Visionary-T Mini device, default: 192.168.1.10 -->
<param name="remote_device_ip" value="192.168.1.10" />
<param name="frame_id" value="camera" />
Expand Down
31 changes: 10 additions & 21 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
<?xml version="1.0"?>
<package format="2">
<package format="3">
<name>sick_visionary_ros</name>
<version>1.1.2</version>
<description>Open source drivers for the SICK Visionary-S 3D camera and Visionary-T Mini 3D-ToF camera.</description>
<description>Open source drivers for the SICK Visionary-T Mini 3D-ToF camera.</description>
<license>Unlicense</license>
<maintainer email="[email protected]">SICK AG TechSupport 3D Snapshot</maintainer>
<author email="[email protected]">SICK AG TechSupport 3D Snapshot</author>
<buildtool_depend>catkin</buildtool_depend>
<depend>libpcl-all-dev</depend>
<depend>pcl_conversions</depend>
<depend>pcl_ros</depend>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rclcpp</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>image_transport</depend>
<depend>cv_bridge</depend>
<depend>diagnostic_updater</depend>
<depend>image_transport</depend>
<depend>roscpp</depend>
<depend>roslaunch</depend>
<depend>sensor_msgs</depend>
<depend>libopencv-dev</depend>
<export>
<rosindex>
<tags>
<tag>SICK</tag>
<tag>Visionary-S</tag>
<tag>Visionary-T Mini</tag>
<tag>3D snapshot</tag>
<tag>3D vision</tag>
<tag>stereo</tag>
<tag>time-of-flight</tag>
</tags>
</rosindex>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading