forked from anqixu/ueye_cam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transferred to git/github (attempt 2)
- Loading branch information
0 parents
commit 01d8302
Showing
18 changed files
with
2,999 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.project | ||
.cproject | ||
.pydevproject | ||
CMakeFiles | ||
msg_gen | ||
srv_gen | ||
CMakeCache.txt | ||
cmake_install.cmake | ||
build | ||
*.pyc | ||
bin/ | ||
CPackConfig.cmake | ||
CPackSourceConfig.cmake | ||
doxygen.cfg | ||
*.bag | ||
moc_* | ||
~* | ||
*.cfgc | ||
docs | ||
lib | ||
.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
cmake_minimum_required(VERSION 2.4.6) | ||
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) | ||
|
||
# Set the build type. Options are: | ||
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage | ||
# Debug : w/ debug symbols, w/o optimization | ||
# Release : w/o debug symbols, w/ optimization | ||
# RelWithDebInfo : w/ debug symbols, w/ optimization | ||
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries | ||
set(ROS_BUILD_TYPE RelWithAsserts) | ||
|
||
rosbuild_init() | ||
|
||
set(ROS_COMPILE_FLAGS "${ROS_COMPILE_FLAGS} -Wall -Wno-deprecated -Wno-unused-result -std=c++0x") | ||
|
||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) | ||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) | ||
|
||
set(UEYE_INCLUDE_PATH /usr/include) | ||
set(UEYE_LIBRARY_PATH /usr/lib) | ||
set(UEYE_LIBRARY ueye_api) | ||
set(UEYECAM_NODELET_NAME ueye_cam_nodelet) | ||
set(UEYECAM_NODE_NAME ueye_cam) | ||
set(UEYECAM_LIB_NAME ueye_wrapper) | ||
|
||
set(UEYECAM_NODE_SOURCES | ||
${CMAKE_SOURCE_DIR}/src/ueye_cam_node.cpp | ||
) | ||
|
||
set(UEYECAM_LIB_SOURCES | ||
${CMAKE_SOURCE_DIR}/src/ueye_cam_driver.cpp | ||
) | ||
|
||
set(UEYECAM_LIB_HEADERS | ||
${CMAKE_SOURCE_DIR}/include/logging_macros.hpp | ||
${CMAKE_SOURCE_DIR}/include/ueye_cam_driver.hpp | ||
) | ||
|
||
set(UEYECAM_NODELET_SOURCES | ||
${CMAKE_SOURCE_DIR}/src/ueye_cam_nodelet.cpp | ||
) | ||
|
||
set(UEYECAM_NODELET_HEADERS | ||
${CMAKE_SOURCE_DIR}/include/ueye_cam_nodelet.hpp | ||
) | ||
|
||
include_directories(${UEYE_INCLUDE_PATH}) | ||
link_directories(${UEYE_LIBRARY_PATH}) | ||
|
||
# Add dynamic reconfigure API | ||
rosbuild_find_ros_package(dynamic_reconfigure) | ||
include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) | ||
gencfg() | ||
|
||
rosbuild_add_library(${UEYECAM_LIB_NAME} ${UEYECAM_LIB_SOURCES} ${UEYECAM_LIB_HEADERS}) | ||
target_link_libraries(${UEYECAM_LIB_NAME} ${UEYE_LIBRARY}) | ||
|
||
rosbuild_add_library(${UEYECAM_NODELET_NAME} ${UEYECAM_NODELET_SOURCES} ${UEYECAM_NODELET_HEADERS}) | ||
target_link_libraries(${UEYECAM_NODELET_NAME} ${UEYECAM_LIB_NAME}) | ||
|
||
rosbuild_add_executable(${UEYECAM_NODE_NAME} ${UEYECAM_NODE_SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/******************************************************************************* | ||
* DO NOT MODIFY - AUTO-GENERATED | ||
* | ||
* | ||
* DISCLAMER: | ||
* | ||
* This project was created within an academic research setting, and thus should | ||
* be considered as EXPERIMENTAL code. There may be bugs and deficiencies in the | ||
* code, so please adjust expectations accordingly. With that said, we are | ||
* intrinsically motivated to ensure its correctness (and often its performance). | ||
* Please use the corresponding web repository tool (e.g. github/bitbucket/etc.) | ||
* to file bugs, suggestions, pull requests; we will do our best to address them | ||
* in a timely manner. | ||
* | ||
* | ||
* SOFTWARE LICENSE AGREEMENT (BSD LICENSE): | ||
* | ||
* Copyright (c) 2013, Anqi Xu | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following | ||
* disclaimer in the documentation and/or other materials provided | ||
* with the distribution. | ||
* * Neither the name of the School of Computer Science, McGill University, | ||
* nor the names of its contributors may be used to endorse or promote | ||
* products derived from this software without specific prior written | ||
* permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*******************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(shell rospack find mk)/cmake.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
**DISCLAMER:** | ||
|
||
This project was created within an academic research setting, and thus should | ||
be considered as EXPERIMENTAL code. There may be bugs and deficiencies in the | ||
code, so please adjust expectations accordingly. With that said, we are | ||
intrinsically motivated to ensure its correctness (and often its performance). | ||
Please use the corresponding web repository tool (e.g. github, bitbucket, etc) | ||
to file bugs, suggestions, pull requests; we will do our best to address them | ||
in a timely manner. | ||
|
||
|
||
**LAYOUT:** | ||
- ueye_cam/ | ||
- bin/: compiled executables | ||
- build/: CMake-based build files | ||
- cfg/: dynamic_reconfigure configuration files | ||
- docs/: generated documents | ||
- include/: header files | ||
- launch/: roslaunch files | ||
- lib/: compiled libraries | ||
- src/: source files | ||
- CMakeLists.txt: CMake project configuration file | ||
- LICENSES: license agreement | ||
- mainpage.dox: ROS main documentation page | ||
- Makefile: ROS CMake package bootstrap makefile (DO NOT MODIFY!) | ||
- manifest.xml: ROS manifest file | ||
- nodelet_plugins.xml: ROS nodelet specification file | ||
- README.md: this file | ||
- ~/.ros/camera_info/: camera calibration yaml files | ||
(see documentation for camera_calibration ROS package | ||
for more details) | ||
- ~/.ros/camera_conf/: UEye camera parameter configuration files | ||
(generatable using ueyedemo executable: | ||
File -> save parameter -> to file...) | ||
|
||
|
||
**DOCUMENTATION:** | ||
|
||
www.ros.org/wiki/ueye_cam | ||
|
||
|
||
|
||
Copyright (c) 2013, Anqi Xu | ||
|
||
All rights reserved. | ||
|
||
BSD3 license: see LICENSE file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env python | ||
PACKAGE = "ueye_cam" | ||
import roslib; roslib.load_manifest(PACKAGE) | ||
|
||
from dynamic_reconfigure.parameter_generator import * | ||
|
||
from driver_base.msg import SensorLevels | ||
|
||
gen = ParameterGenerator() | ||
|
||
gen.add("image_width", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Image width (not withstanding subsampling, binning, or sensor scaling)", 640, 16, 2560) | ||
gen.add("image_height", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Image height (not withstanding subsampling, binning, or sensor scaling)", 480, 4, 1920) | ||
gen.add("image_left", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Left side index for image in sensor coordinates (-1: center)", -1, -1, 2560-16) | ||
gen.add("image_top", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Top side index for image in sensor coordinates (-1: center)", -1, -1, 1920-4) | ||
|
||
color_mode_enum = gen.enum([ | ||
gen.const("MONO8", str_t, "mono8", "8-bit Monochrome"), | ||
gen.const("RGB8", str_t, "rgb8", "24-bit Red/Green/Blue"), | ||
gen.const("BAYER_RGGB8", str_t, "bayer_rggb8", "8-bit Raw Bayer (RGGB)")], | ||
"Color mode values") | ||
gen.add("color_mode", str_t, SensorLevels.RECONFIGURE_STOP, | ||
"Output image color mode", "mono8", edit_method=color_mode_enum) | ||
|
||
subsampling_enum = gen.enum([ | ||
gen.const("SUB_1X", int_t, 1, "1X Subsampling"), | ||
gen.const("SUB_2X", int_t, 2, "2X Subsampling"), | ||
gen.const("SUB_4X", int_t, 4, "4X Subsampling"), | ||
gen.const("SUB_8X", int_t, 8, "8X Subsampling"), | ||
gen.const("SUB_16X", int_t, 16, "16X Subsampling")], | ||
"Subsampling Values") | ||
gen.add("subsampling", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Output image subsampling ratio", 1, edit_method=subsampling_enum) | ||
|
||
binning_enum = gen.enum([ | ||
gen.const("BIN_1X", int_t, 1, "1X Binning"), | ||
gen.const("BIN_2X", int_t, 2, "2X Binning"), | ||
gen.const("BIN_4X", int_t, 4, "4X Binning"), | ||
gen.const("BIN_8X", int_t, 8, "8X Binning"), | ||
gen.const("BIN_16X", int_t, 16, "16X Binning")], | ||
"Binning Values") | ||
gen.add("binning", int_t, SensorLevels.RECONFIGURE_STOP, | ||
"Output image binning ratio", 1, edit_method=binning_enum) | ||
|
||
sensor_scaling_enum = gen.enum([ | ||
gen.const("SS_1X", double_t, 1.0, "1X Internal Image Scaling"), | ||
gen.const("SS_2X", double_t, 2.0, "2X Internal Image Scaling"), | ||
gen.const("SS_4X", double_t, 4.0, "4X Internal Image Scaling"), | ||
gen.const("SS_8X", double_t, 8.0, "8X Internal Image Scaling"), | ||
gen.const("SS_16X", double_t, 16.0, "16X Internal Image Scaling")], | ||
"Internal Image Scaling Values") | ||
gen.add("sensor_scaling", double_t, SensorLevels.RECONFIGURE_STOP, | ||
"Output image scaling ratio (Internal Image Scaling)", 1, edit_method=sensor_scaling_enum) | ||
|
||
gen.add("auto_gain", bool_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Auto gain (overruled by auto framerate)", False) | ||
gen.add("master_gain", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Master gain percentage", 0, 0, 100) | ||
gen.add("red_gain", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Gain percentage for red channel", 0, 0, 100) | ||
gen.add("green_gain", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Gain percentage for red channel", 0, 0, 100) | ||
gen.add("blue_gain", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Gain percentage for red channel", 0, 0, 100) | ||
gen.add("gain_boost", bool_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Analog gain boost", False) | ||
|
||
gen.add("auto_exposure", bool_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Auto exposure (a.k.a. auto shutter)", False) | ||
gen.add("exposure", double_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Exposure value (ms)", 33.0, 0.0, 300.0) | ||
|
||
gen.add("auto_white_balance", bool_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Auto white balance", False) | ||
gen.add("white_balance_red_offset", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Red level offset for white balance", 0, -50, 50) | ||
gen.add("white_balance_blue_offset", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Blue level offset for white balance", 0, -50, 50) | ||
|
||
gen.add("auto_frame_rate", bool_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Auto frame rate (requires auto exposure, supercedes auto gain)", False) | ||
gen.add("frame_rate", double_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Frame rate (Hz)", 10.0, 0.01, 200.0) | ||
gen.add("pixel_clock", int_t, SensorLevels.RECONFIGURE_RUNNING, | ||
"Pixel clock (MHz)", 25, 1, 100) | ||
|
||
exit(gen.generate(PACKAGE, "ueye_cam", "UEyeCam")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/******************************************************************************* | ||
* DO NOT MODIFY - AUTO-GENERATED | ||
* | ||
* | ||
* DISCLAMER: | ||
* | ||
* This project was created within an academic research setting, and thus should | ||
* be considered as EXPERIMENTAL code. There may be bugs and deficiencies in the | ||
* code, so please adjust expectations accordingly. With that said, we are | ||
* intrinsically motivated to ensure its correctness (and often its performance). | ||
* Please use the corresponding web repository tool (e.g. github/bitbucket/etc.) | ||
* to file bugs, suggestions, pull requests; we will do our best to address them | ||
* in a timely manner. | ||
* | ||
* | ||
* SOFTWARE LICENSE AGREEMENT (BSD LICENSE): | ||
* | ||
* Copyright (c) 2013, Anqi Xu | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following | ||
* disclaimer in the documentation and/or other materials provided | ||
* with the distribution. | ||
* * Neither the name of the School of Computer Science, McGill University, | ||
* nor the names of its contributors may be used to endorse or promote | ||
* products derived from this software without specific prior written | ||
* permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*******************************************************************************/ | ||
|
||
#ifndef LOGGING_MACROS_HPP_ | ||
#define LOGGING_MACROS_HPP_ | ||
|
||
/** | ||
* This header allows potentially ROS-agnostic code to either use ROS logging | ||
* mechanisms, ROS nodelet logging mechanisms, or standard output mechanisms. | ||
*/ | ||
|
||
#define STD_LOGGING_MACROS 0 | ||
#define ROS_LOGGING_MACROS 1 | ||
#define NODELET_LOGGING_MACROS 2 | ||
#define LOGGING_MACROS_TYPE NODELET_LOGGING_MACROS | ||
|
||
|
||
#if LOGGING_MACROS_TYPE == ROS_LOGGING_MACROS | ||
|
||
#include <ros/console.h> | ||
|
||
#define DEBUG(...) ROS_DEBUG(__VA_ARGS__) | ||
#define INFO(...) ROS_INFO(__VA_ARGS__) | ||
#define WARN(...) ROS_WARN(__VA_ARGS__) | ||
#define ERROR(...) ROS_ERROR(__VA_ARGS__) | ||
#define FATAL(...) ROS_FATAL(__VA_ARGS__) | ||
#define DEBUG_STREAM(...) ROS_DEBUG_STREAM(__VA_ARGS__) | ||
#define INFO_STREAM(...) ROS_INFO_STREAM(__VA_ARGS__) | ||
#define WARN_STREAM(...) ROS_WARN_STREAM(__VA_ARGS__) | ||
#define ERROR_STREAM(...) ROS_ERROR_STREAM(__VA_ARGS__) | ||
#define FATAL_STREAM(...) ROS_FATAL_STREAM(__VA_ARGS__) | ||
|
||
#elif LOGGING_MACROS_TYPE == NODELET_LOGGING_MACROS | ||
|
||
#include <ros/ros.h> | ||
#include <nodelet/nodelet.h> | ||
|
||
using namespace ros::this_node; | ||
|
||
#define DEBUG(...) NODELET_DEBUG(__VA_ARGS__) | ||
#define INFO(...) NODELET_INFO(__VA_ARGS__) | ||
#define WARN(...) NODELET_WARN(__VA_ARGS__) | ||
#define ERROR(...) NODELET_ERROR(__VA_ARGS__) | ||
#define FATAL(...) NODELET_FATAL(__VA_ARGS__) | ||
#define DEBUG_STREAM(...) NODELET_DEBUG_STREAM(__VA_ARGS__) | ||
#define INFO_STREAM(...) NODELET_INFO_STREAM(__VA_ARGS__) | ||
#define WARN_STREAM(...) NODELET_WARN_STREAM(__VA_ARGS__) | ||
#define ERROR_STREAM(...) NODELET_ERROR_STREAM(__VA_ARGS__) | ||
#define FATAL_STREAM(...) NODELET_FATAL_STREAM(__VA_ARGS__) | ||
|
||
#else | ||
#include <cstdio> | ||
#include <iostream> | ||
|
||
#define DEBUG(...) fprintf(stdout, "DEBUG> "); fprintf(stdout, __VA_ARGS__); fprintf(stdout, "\n") | ||
#define INFO(...) fprintf(stdout, "INFO > "); fprintf(stdout, __VA_ARGS__); fprintf(stdout, "\n") | ||
#define WARN(...) fprintf(stderr, "WARN > "); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n") | ||
#define ERROR(...) fprintf(stderr, "ERROR> "); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n") | ||
#define FATAL(...) fprintf(stderr, "FATAL> "); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n") | ||
#define DEBUG_STREAM(...) std::cout << "DEBUG> " << __VA_ARGS__ << std::endl | ||
#define INFO_STREAM(...) std::cout << "INFO > " << __VA_ARGS__ << std::endl | ||
#define WARN_STREAM(...) std::cerr << "WARN > " << __VA_ARGS__ << std::endl | ||
#define ERROR_STREAM(...) std::cerr << "ERROR> " << __VA_ARGS__ << std::endl | ||
#define FATAL_STREAM(...) std::cerr << "FATAL> " << __VA_ARGS__ << std::endl | ||
|
||
#endif | ||
|
||
#endif /* LOGGING_MACROS_HPP_ */ |
Oops, something went wrong.