Skip to content

Commit

Permalink
pull (#1)
Browse files Browse the repository at this point in the history
* Don't ignore linker flags set by user

Yocto's bitbake sets global LDFLAGS that include the option
--hash-style=gnu. If this option is ignored then bitbake's
QA checks report that

QA Issue: No GNU_HASH in the elf binary: '/[...]/opt/ros/indigo/lib/librealsense_camera_nodelet.so' [ldflags]

The patch includes user defined linker flags to
CMAKE_SHARED_LINKER_FLAGS defined in the project's CMakeList.txt.

Signed-off-by: Dmitry Rozhkov <[email protected]>

* Make system wrapper function generic

Error message was assume only use was dynamic reconfigure

Added boost as ROS dependency -- should have already been required.

* Added imu_start_ts for imu sync

* Added frame callbacks instead of rs_wait_for_frames

* Added imu_mutex for data sync to callback

* Refactored setStreams

* Removed prepareTopics thread; replaced with setDepthEnable

* Changed depth_scale_meters to local var

* Renamed getStreamData to setImageData

* Change color stream default to 30fps

Improve reliability of the camera by reducing the color stream
to 30fps by default. This will be the highest frame rate which will
be validate with VGA or higher resolutions for use with ROS.

Default files will no longer use the librealsense preset modes
as they will be depreciated in the future.

* Fixed boost mutex error when destroying ZR300 nodelet

Replaced boost::mutex with std::mutex

* Added destructor to ZR300 nodelet to join thread

* Fix F200/SR300 tests for new default 30fps

The F200 and SR300 tests were attempting too much code reuse
by include the r200_nodelet_default.launch file.
When the Default launch files were changed to set 30fps as the new
default for the color stream, F200/SR300 also had to set new defaults
for the Depth stream to prevent using the invalid R200 depth default.
The R200 default file does NOT pass the depth_width and depth_height
to the nodelet so the override values were lost.

* Add Dynamic Transforms support -- multi-cam

Due to a ROS bug which prevents publishing more than one static
transform in separate processes, enable the use of dynamic
camera transforms when needed for multiple camera support.

Static transforms are still the default.

See:
  ros/ros_comm#146
  ros/geometry2#181

* Code Review Fixes

* Enable ROS Lint

Many minor fixes to be compliant with ROS Lint standards.

* C++11 Flagged ROS Lint items

Suppressing these for now, but should be investigated as
they are not compliant with current ROS standards.

* Update Change log for release

* 1.7.0

* Update RGBD launch files.

Modify the r200/sr300 RGBD-style launch files
to no longer use the RGBD depth/ir/rgb_processing
flags to control whether the corresponding stream
is also enabled. For example, now turning off
RGBD depth *processing* will no longer disable
the depth stream itself.

* Do not register IR callback if stream disabled

Work around bug in librealsense where the callback for
IR is called even if the stream is disabled if IR2 stream
is enabled.
See IntelRealSense/librealsense#393

* Start IMU in startCamera

* Fix Multi-cam example launch file

Leading '/' required to ensure both cameras use the same
nodelet manager due to group name space.

* Added try-catch for start and stop device

* Fixed spacing before comment - roslint failure

* Disable Fisheye and IMU on ZR300 for RGBD launch

* Fixed roslint tabs errors

* Allow Disabling of IMU after PR#175

Refactoring PR IntelRealSense#175 broke the logic for disabling IMU

* Updated Change Log for 1.7.0

* Added retry in tests to avoid random failures

* Also exclude swap files from Git

* Use shared timestamp for SR300/F200 cameras

Due to camera hardware issues on the SR300 and F200, reverted back
to using a common timestamp updated by the fastest stream. This was the
old behaviour when rs_wait_for_frames was used prior to release 1.7.0.

* Generate Warning for non-validated camera firmware

Compare the camera's firmware version to the validated firmware version. Log
a warn message if the two firmware versions do not match. If the camera is
ZR300, also check the adapter firmware version and the motion module firmware
version.

* Updated Change Log for 1.7.1

* 1.7.1

* Git ignore QT Creator *.workspace files

* Upload 18 bat tests

Upload first version of stable bat tests, there are 2 common tests
to check librealsense and realsense_camera installed, and there are
4 specific tests of each camera (R200/F200/SR300/ZR300) to check
camera info matrix, enabled tf, set power off/on and force power
off/on, totally 18 tests.

All the tests are based on rospy, using python script as test type.

* Changed fisheye_strobe and fisheye_external_trigger to static params

* Change tf to using setRPY for consistency

* Create tool to get debug info

Create a node tool that, when run, will display the user's
operating system, kernel, ROS version, RealSense version, librealsense
version, and the type and firmware of any detected cameras.

* Fix minor spelling errors

* Updated the maintainers

* Update change log

* 1.7.2

* Added SyncNodelet class

* Updated F200 to be based on SyncNodelet

* Updated SR300 to be based on SyncNodelet

* Fixed roslint errors

* Removed getTimestamp override from F200 and SR300

* Updated r200 to be based on SyncNodelet

* Added loop checking of start/stop camera

* Update Debug Tool

Update debug tool to show motion module and adapter firmwares for the
ZR300 camera.

Update the validated firmware versions.

* Added check for depth_enable dynamic change

* Dynamic reconfigure of SR300 exposure controls

* Updated Copyright to 2017

* Added SyncNodelet destructor

* Added blank lines for readability after closing braces

* Fixed LR auto exposure issue IntelRealSense#131

LR gain should be set only when LR auto exposure is disabled

* Add option to link against non-catkin librealsense

In OpenEmbedded setups where both meta-ros and
meta-intel-realsense layers are used it's problematic
to avoid two copies of librealsense installed onto
an embedded target: one catkit-based installed under
/opt/ros and one other installed to a standard system
location.

This patch adds an option making realsense_camera link
against librealsense provided by the host system.

By default the currently existing behavior is preserved.

Signed-off-by: Dmitry Rozhkov <[email protected]>

* Enable roslint when CATKIN_ENABLE_TESTING is True

roslint depends on catkin_run_tests_target() which is defined only
when CATKIN_ENABLE_TESTING is True.

Thus run roslint functions in CMakeLists.txt only when testing
is enabled.

Signed-off-by: Dmitry Rozhkov <[email protected]>

* Exposed autoexposure toggle and exposure control for F200, R200. Updated copyright data on nodelets

* Fix build timing issue for catkin

* Make ZR300 consistent with other cameras

Recent color auto exposure code changes are slightly different
for SR300/F200/R200 from ZR300. Mainly the ZR300 needed the same
if condition added for only setting the manual value when auto
exposure is disabled.

* Updated changelog

* 1.8.0

* Enable configuration of the TF publication rate when using tf_dynamic

The parameter is called tf_publication_rate

* 1.8.0 -- Updated

* librealsense: Fix link when the system library is used

Otherwise librealsense won't be listed as a dependency for the nodelet
that will fail to load due to undefined symbols.

Signed-off-by: Murilo Belluzzo <[email protected]>

* Add RGDB launch file for the ZR300
  • Loading branch information
jonpol01 authored Apr 17, 2017
1 parent 266e084 commit 43c95bf
Show file tree
Hide file tree
Showing 80 changed files with 3,234 additions and 967 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ msg/_*.py

# qcreator stuff
CMakeLists.txt.user
*.workspace

srv/_*.py
*.pcd
Expand All @@ -44,6 +45,7 @@ qtcreator-*

# Ignore all Linux Editor revision save files
*~
*.swp

# Emacs
.#*
Expand Down
40 changes: 40 additions & 0 deletions realsense_camera/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@
Changelog for package realsense_camera
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.8.0 (2017-03-27)
------------------
* Enable configuration of the TF publication rate when using tf_dynamic
* Enable roslint when CATKIN_ENABLE_TESTING is True
* Add option to link against non-catkin librealsense
* Fixed LR auto exposure (#131)
* Dynamic reconfig autoexposure/exposure control SR300/F200/R200 (#213)
* Added check for depth_enable dynamic change
* Update Debug Tool
* Added SyncNodelet class as new base for F200/SR300/R200 (#207, #210)
* Contributors: Amanda Brindle, Dmitry Rozhkov, James Sergeant, Mark Horn, Matthew Hansen, Reagan Lopez, Séverin Lemaignan

1.7.2 (2017-03-01)
------------------
* Create tool to get debug info
* Change tf to using setRPY for consistency
* Changed fisheye_strobe and fisheye_external_trigger to static params
* Contributors: Amanda Brindle, Mark Horn, Matthew Hansen, Wang Jinliang

1.7.1 (2017-01-14)
------------------
* Generate Warning for non-validated camera firmware
* Use shared timestamp for SR300/F200 cameras
* Added retry in tests to avoid random failures
* Contributors: Amanda Brindle, Mark D Horn, Ning Wang

1.7.0 (2016-12-20)
------------------
* Enable ROS Lint
* Update RGBD launch files
* Add Dynamic Transforms support -- multi-cam (#120)
* Change color stream default to 30fps
* Major code refactor to use librealsense callbacks
* Added imu_start_ts for imu sync
* Make system wrapper function generic
* Don't ignore linker flags set by user (Yocto fix)
* Changed nodelet to use camera timestamps
* Migrate README.md content to ROS wiki
* Contributors: Dmitry Rozhkov, Mark D Horn, Matt Hansen

1.6.1 (2016-11-18)
------------------
* Clean up system process calls
Expand Down
58 changes: 48 additions & 10 deletions realsense_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ set(CMAKE_CXX_FLAGS "-fPIE -fPIC -std=c++11 -O2 -D_FORTIFY_SOURCE=2 -fstack-prot
# Flags executables
set(CMAKE_EXE_LINKER_FLAGS "-pie -z noexecstack -z relro -z now")
# Flags shared libraries
set(CMAKE_SHARED_LINKER_FLAGS "-z noexecstack -z relro -z now")
set(CMAKE_SHARED_LINKER_FLAGS "-z noexecstack -z relro -z now ${CMAKE_SHARED_LINKER_FLAGS}")

find_package(catkin REQUIRED COMPONENTS
librealsense
option(USE_SYSTEM_LIBREALSENSE "Build realsense_camera against system librealsense, not the one built with catkin" OFF)

set(REALSENSE_CATKIN_BASED_DEPS
dynamic_reconfigure
roscpp
nodelet
Expand All @@ -29,6 +30,16 @@ find_package(catkin REQUIRED COMPONENTS
pcl_ros
)

if(USE_SYSTEM_LIBREALSENSE)
find_package(realsense REQUIRED)
else()
list(APPEND REALSENSE_CATKIN_BASED_DEPS librealsense)
endif()

find_package(catkin REQUIRED COMPONENTS
${REALSENSE_CATKIN_BASED_DEPS}
)

add_message_files(
FILES
IMUInfo.msg
Expand Down Expand Up @@ -65,28 +76,55 @@ generate_dynamic_reconfigure_options(
# LIBRARIES: libraries you create in this project that dependent projects also need
# CATKIN_DEPENDS: catkin_packages dependent projects also need
# DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS librealsense std_msgs message_runtime sensor_msgs
LIBRARIES ${PROJECT_NAME}_nodelet
)
if(USE_SYSTEM_LIBREALSENSE)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS std_msgs message_runtime sensor_msgs
DEPENDS realsense
LIBRARIES ${PROJECT_NAME}_nodelet
)
else()
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS std_msgs message_runtime sensor_msgs librealsense
LIBRARIES ${PROJECT_NAME}_nodelet
)
endif()

# Specify additional locations of header files
include_directories(
include
${catkin_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME}_nodelet src/base_nodelet.cpp src/r200_nodelet.cpp src/f200_nodelet.cpp src/sr300_nodelet.cpp
add_library(${PROJECT_NAME}_nodelet src/base_nodelet.cpp src/sync_nodelet.cpp src/r200_nodelet.cpp src/f200_nodelet.cpp src/sr300_nodelet.cpp
src/zr300_nodelet.cpp)
target_link_libraries(${PROJECT_NAME}_nodelet
${catkin_LIBRARIES}
)
if(USE_SYSTEM_LIBREALSENSE)
target_link_libraries(${PROJECT_NAME}_nodelet
${realsense_LIBRARY}
)
endif()

add_dependencies(${PROJECT_NAME}_nodelet ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg)
add_dependencies(${PROJECT_NAME}_nodelet ${catkin_EXPORTED_TARGETS})

add_executable(get_debug_info src/get_debug_info.cpp)
target_link_libraries(get_debug_info ${catkin_LIBRARIES})
if(USE_SYSTEM_LIBREALSENSE)
target_link_libraries(get_debug_info PRIVATE realsense::realsense)
endif()

if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(roslint REQUIRED)

# ROS Lint the code
roslint_cpp()
roslint_python()
roslint_add_test()

add_executable(tests_camera_core test/camera_core.cpp)
target_link_libraries(tests_camera_core
Expand All @@ -106,7 +144,7 @@ if (CATKIN_ENABLE_TESTING)
endif()

# Install nodelet library
install(TARGETS ${PROJECT_NAME}_nodelet
install(TARGETS ${PROJECT_NAME}_nodelet get_debug_info
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand Down
11 changes: 11 additions & 0 deletions realsense_camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ Both these methods first starts the nodelet and then executes all the unit tests

Sample test files are available in "realsense_camera/test" directory

##Bat Tests:
The bat tests can be executed using `rostest` command with test files

$ rostest realsense_camera <test_filename>
E.g. rostest realsense_camera r200_camera_info_matrix_check.test

Sample test files are available in "realsense_camera/test/files/bat-tests" directory.

Bat tests include its executable python scripts, they will be copied to specific directory when build realsense_camera.
If will not run the bat tests again or want to clean realsense_camera, please remove the bat python scripts by additional running `catkin_make clean-script` command.

##Errata:
See the [GitHub Issues Bugs](https://github.com/intel-ros/realsense/labels/bug)
for a complete list.
Expand Down
4 changes: 4 additions & 0 deletions realsense_camera/cfg/f200_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ gen.add("color_sharpness", int_t, 0, "Sharpnes
# Must be set only if color_enable_auto_white_balance is disabled
gen.add("color_white_balance", int_t, 0, "White Balance", 3200, 2500, 6500)

# Must be set only if color_enable_auto_exposure is disabled
gen.add("color_exposure", int_t, 0, "Exposure", 156, 39, 10000)

gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)
gen.add("f200_laser_power", int_t, 0, "Laser Power", 16, 0, 16)
gen.add("f200_accuracy", int_t, 0, "Accuracy", 2, 1, 3)
gen.add("f200_motion_range", int_t, 0, "Motion Range", 1, 0, 100)
Expand Down
12 changes: 8 additions & 4 deletions realsense_camera/cfg/r200_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,25 @@ gen.add("color_sharpness", int_t, 0, "Sharpnes
# Must be set only if color_enable_auto_white_balance is disabled
gen.add("color_white_balance", int_t, 0, "White Balance", 6500, 2000, 8000)

gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("r200_lr_auto_exposure_enabled", int_t, 0, "LR Auto Exposure Enabled", 0, 0, 1)
gen.add("r200_lr_gain", int_t, 0, "LR Gain", 400, 100, 6399)
# Must be set only if color_enable_auto_exposure is disabled
gen.add("color_exposure", int_t, 0, "Exposure", 156, 39, 10000)

# Must be set only if r200_lr_auto_exposure_enabled is disabled
gen.add("r200_lr_gain", int_t, 0, "LR Gain", 400, 100, 6399)
gen.add("r200_lr_exposure", int_t, 0, "LR Exposure", 164, 1, 164)

gen.add("r200_emitter_enabled", int_t, 0, "Emitter Enabled", 1, 0, 1)
gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)
gen.add("r200_lr_auto_exposure_enabled", int_t, 0, "Enable LR Auto Exposure", 0, 0, 1)

# The following edge parameters must be set only if r200_lr_auto_exposure_enabled is enabled
gen.add("r200_auto_exposure_top_edge", int_t, 0, "Auto Exposure Top Edge", 0, 0, 479)
gen.add("r200_auto_exposure_bottom_edge", int_t, 0, "Auto Exposure Bottom Edge", 479, 0, 479)
gen.add("r200_auto_exposure_left_edge", int_t, 0, "Auto Exposure Left Edge", 0, 0, 639)
gen.add("r200_auto_exposure_right_edge", int_t, 0, "Auto Exposure Right Edge", 639, 0, 639)

gen.add("r200_emitter_enabled", int_t, 0, "Emitter Enabled", 1, 0, 1)

# Depth Control Grouping
r200_depth_control = gen.add_group("R200 Depth Control")
r200_dc_preset_enum = gen.enum(
Expand Down
5 changes: 5 additions & 0 deletions realsense_camera/cfg/sr300_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ gen.add("color_white_balance", int_t, 0, "White Bala

gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)

# Must be set only if color_enable_auto_exposure is disabled
gen.add("color_exposure", int_t, 0, "Exposure", 156, 39, 10000)

gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)

# Options common with F200
gen.add("f200_laser_power", int_t, 0, "Laser Power", 16, 0, 16)
gen.add("f200_accuracy", int_t, 0, "Accuracy", 1, 1, 3)
Expand Down
12 changes: 5 additions & 7 deletions realsense_camera/cfg/zr300_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ gen.add("color_sharpness", int_t, 0, "Sha
# Must be set only if color_enable_auto_white_balance is disabled
gen.add("color_white_balance", int_t, 0, "White Balance", 4600, 2000, 8000)

gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)
gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("r200_lr_auto_exposure_enabled", int_t, 0, "LR Auto Exposure Enabled", 0, 0, 1)
gen.add("r200_lr_gain", int_t, 0, "LR Gain", 400, 100, 6399)

# Must be set only if r200_lr_auto_exposure_enabled is disabled
gen.add("r200_lr_gain", int_t, 0, "LR Gain", 400, 100, 6399)
gen.add("r200_lr_exposure", int_t, 0, "LR Exposure", 164, 1, 164)

gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)
gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("r200_lr_auto_exposure_enabled", int_t, 0, "Enable LR Auto Exposure", 0, 0, 1)

gen.add("r200_emitter_enabled", int_t, 0, "Emitter Enabled", 1, 0, 1)
gen.add("r200_depth_clamp_min", int_t, 0, "Depth Clamp Min", 0, 0, 65535)
gen.add("r200_depth_clamp_max", int_t, 0, "Depth Clamp Max", 65535, 0, 65535)
Expand Down Expand Up @@ -71,8 +71,6 @@ r200_depth_control.add("r200_dc_lr_threshold",

gen.add("fisheye_exposure", int_t, 0, "Fisheye Exposure", 40, 40, 331)
gen.add("fisheye_gain", int_t, 0, "Fisheye Gain", 0, 0, 2047)
gen.add("fisheye_strobe", int_t, 0, "Fisheye Strobe", 0, 0, 1)
gen.add("fisheye_external_trigger", int_t, 0, "Fisheye External Trigger", 0, 0, 1)
gen.add("fisheye_enable_auto_exposure", int_t, 0, "Fisheye Enable Auto Exposure", 1, 0, 1)
gen.add("fisheye_auto_exposure_mode", int_t, 0, "Fisheye Auto Exposure Mode", 0, 0, 2)
gen.add("fisheye_auto_exposure_antiflicker_rate", int_t, 0, "Fisheye Auto Exposure Antiflicker Rate", 60, 50, 60)
Expand Down
Loading

0 comments on commit 43c95bf

Please sign in to comment.