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

Feature/spinnaker #1984

Merged
merged 19 commits into from
Feb 19, 2019
Merged
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
59 changes: 46 additions & 13 deletions ros/src/sensing/drivers/camera/packages/pointgrey/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ find_package(catkin REQUIRED COMPONENTS
std_msgs
message_generation
tf
)
sensor_msgs
camera_info_manager
image_transport
cv_bridge
)

set(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}")

find_package(OpenCV REQUIRED)

catkin_package()
Expand Down Expand Up @@ -72,13 +75,13 @@ if (EXISTS "/usr/include/ladybug")
nodes/ladybug/ladybug.cpp
)

target_link_libraries(ladybug_camera
${catkin_LIBRARIES}
${OpenCV_LIBS}
${XercesC_LIBRARIES}
flycapture
ladybug
)
target_link_libraries(ladybug_camera
${catkin_LIBRARIES}
${OpenCV_LIBS}
${XercesC_LIBRARIES}
flycapture
ladybug
)
install(TARGETS
ladybug_camera
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
Expand All @@ -89,7 +92,37 @@ if (EXISTS "/usr/include/ladybug")
scripts/ladybug.launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)

else ()
message("'SDK for Ladybug' is not installed. 'ladybug_camera' will not be built.")
endif ()
else()
message("'SDK for Ladybug' is not installed. 'ladybug_camera' will not be built.")
endif()

if(EXISTS "/usr/include/spinnaker")
include(FindSpinnaker.cmake)
include_directories(
nodes/spinnaker
${Spinnaker_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

add_executable(spinnaker_camera
nodes/spinnaker/spinnaker.cpp
)

target_link_libraries(spinnaker_camera
${catkin_LIBRARIES}
${OpenCV_LIBS}
${Spinnaker_LIBRARIES}
)
install(TARGETS spinnaker_camera
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES
scripts/spinnaker.launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
else()
message("'SDK for Spinnaker' is not installed. 'spinnaker_camera' will not be built.")
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
unset(Spinnaker_FOUND)
unset(Spinnaker_INCLUDE_DIRS)
unset(Spinnaker_LIBRARIES)

find_path(Spinnaker_INCLUDE_DIRS NAMES
Spinnaker.h
PATHS
/usr/include/spinnaker/
/usr/local/include/spinnaker/
)

find_library(Spinnaker_LIBRARIES NAMES Spinnaker
PATHS
/usr/lib
/usr/local/lib
)

if (Spinnaker_INCLUDE_DIRS AND Spinnaker_LIBRARIES)
set(Spinnaker_FOUND 1)
endif (Spinnaker_INCLUDE_DIRS AND Spinnaker_LIBRARIES)
21 changes: 20 additions & 1 deletion ros/src/sensing/drivers/camera/packages/pointgrey/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This package allows the capture of an image stream from Point Grey cameras.
It has been tested successfully with Grasshopper3 and LadyBug5 devices on both Ubuntu 14.04 and 16.04.

## Requirements
* FlyCapture SDK provided by Point Grey.
* FlyCapture SDK or Spinnaker SDK provided by Point Grey.

---

Expand Down Expand Up @@ -72,3 +72,22 @@ Execute from `Autoware/ros` base path.
|`WIDTH`|*integer*|Image width of the stream (Default 640).|
|`HEIGHT`|*integer*|Image height of the camera (Default 512).|
|`NS`|*string*|Namespace to add as prefix. Default `flir_adk`.|

## Spinnaker

### How to launch
* From a sourced terminal:\
`roslaunch autoware_pointgrey_drivers spinnaker.launch`
* From Runtime manager:\
Sensing Tab -> Cameras -> PointGrey Spinnaker

### Parameters available

|Parameter| Type| Description|
----------|-----|--------
|`fps`|*integer* |Frame per second (Default 60).|
|`width`|*integer*|Image width of the stream (Default 1440).|
|`height`|*integer*|Image height of the camera (Default 1080).|
|`dltl`|*integer*|DeviceLinkThroughputLimit (Default 100000000).|


Loading