Skip to content

Commit c06136f

Browse files
Merge pull request #94 from luis-camero/noetic-devel
Copy Spinnaker Libraries to build/usr/lib
2 parents f268467 + b97c089 commit c06136f

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

spinnaker_camera_driver/cmake/DownloadSpinnaker.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ function(download_spinnaker FLIR_LIB_VAR FLIR_INCLUDE_DIR_VAR)
1616
message(STATUS "Running download_spinnaker script with arguments: ${FLIR_ARCH} ${FLIR_DIR} ${OS_CODE_NAME}")
1717
execute_process(
1818
COMMAND ${DOWNLOAD_SCRIPT} ${FLIR_ARCH} "${FLIR_DIR}" ${OS_CODE_NAME})
19-
set(${FLIR_LIB_VAR} "${CMAKE_BINARY_DIR}/opt/spinnaker/lib/libSpinnaker.so" PARENT_SCOPE)
19+
set(${FLIR_LIB_VAR} "${CMAKE_BINARY_DIR}/usr/lib/libSpinnaker.so" PARENT_SCOPE)
2020
set(${FLIR_INCLUDE_DIR_VAR} "${CMAKE_BINARY_DIR}/opt/spinnaker/include/" PARENT_SCOPE)
2121
endfunction()

spinnaker_camera_driver/cmake/download_spinnaker

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ARCHS = {
5050
'current': '20.04',
5151
'type': 'deb',
5252
'folder_name': 'spinnaker-2.2.0.48-amd64',
53-
'shared_library': 'opt/spinnaker/lib/libSpinnaker.so.2.2.0.48',
53+
'shared_library': 'opt/spinnaker/lib/',
5454
'debs':[
5555
'libgentl_2.2.0.48_amd64.deb',
5656
'libspinnaker_2.2.0.48_amd64.deb',
@@ -73,7 +73,7 @@ ARCHS = {
7373
'linux_arch': 'armh64',
7474
'current': '20.04',
7575
'type': 'deb',
76-
'shared_library': 'opt/spinnaker/lib/libSpinnaker.so.2.2.0.48',
76+
'shared_library': 'opt/spinnaker/lib/',
7777
'folder_name': 'spinnaker-2.2.0.48_arm64',
7878
'debs': [
7979
'libgentl_2.2.0.48_arm64.deb',
@@ -139,9 +139,13 @@ if not os.path.exists(os.path.join(os.getcwd(), folder_name)):
139139
logging.info('Extracting {0}'.format(deb))
140140
subprocess.call(['dpkg', '--extract', deb, unpack_dir])
141141

142-
# finally, copy the shared libraries into the output folder
143-
src_file = os.path.join(unpack_dir, shared_library)
144-
logging.info('Copying shared library to {0}'.format(destination_folder))
142+
# Copy the shared libraries into the output folder
143+
logging.info('Copying libraries to {0}'.format(destination_folder))
145144
if not os.path.exists(destination_folder):
146145
os.makedirs(destination_folder)
147-
shutil.copyfile(src_file, os.path.join(destination_folder, 'libSpinnaker.so'))
146+
libs = glob.glob(os.path.join(os.getcwd(), 'opt/spinnaker/lib', "lib[!Q][!t]*.so*"))
147+
for lib in libs:
148+
logging.info('Copying: {}'.format(os.path.basename(lib)))
149+
shutil.copyfile(lib, os.path.join(destination_folder, os.path.basename(lib)))
150+
else:
151+
logging.info("Previous installation found, skipping...")

spinnaker_camera_driver/include/spinnaker_camera_driver/diagnostics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ class DiagnosticsManager
133133
// constuctor parameters
134134
std::string camera_name_;
135135
std::string serial_number_;
136+
std::shared_ptr<ros::Publisher> diagnostics_pub_;
136137
ros::NodeHandle nh_;
137138
std::shared_ptr<bond::Bond> bond_ = nullptr;
138-
std::shared_ptr<ros::Publisher> diagnostics_pub_;
139139

140140
// vectors to keep track of the items to publish
141141
std::vector<diagnostic_params<int>> integer_params_;

0 commit comments

Comments
 (0)