Skip to content

Commit

Permalink
Merge pull request #19 from reaganlo/release
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
reaganlo committed Mar 30, 2016
2 parents 199e42c + e992fb2 commit 68c9370
Show file tree
Hide file tree
Showing 19 changed files with 577 additions and 349 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### System Configuration
Please complete Your Configuration detail below.

| Version | Known Good | Your Configuration |
| ---------------- | ------------:| ------------------:|
| Operating System | ubuntu 14.04 | ??? |
| Kernel Version | 4.4.0-13 | ?.?.?-? |
| R200 FW | 1.0.72.06 | ?.?.?.? |
| librealsense | 0.9.1 | ?.?.? |

---
#### How to collect Configuration Data
*This section can be delete before submission.*

| Version | Method |
| ---------------- | ------------ |
| Operating System | `cat /etc/*elease*` |
| Kernel Version | `uname -r` |
| R200 FW | View the ROS log from running node **OR** `<path to librealsense>/librealsense/bin/cpp-enumerate-devices | grep -i firmware` |
| librealsense | `cat <path to librealsense>/librealsense/readme.md | grep release-image | awk -F- '{print $3}'` |
---


### Expected Behavior


### Actual Behavior


### Steps to Reproduce


8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Fixes Issue: #

Changes proposed in this pull request:
-
-
-


18 changes: 18 additions & 0 deletions camera/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
Changelog for package realsense_camera
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.0.2 (2016-03-28)
------------------
* Added functionality to access camera using Serial No:
This fixes Issue #18.
Added code to handle various use cases for input serial number such as
--Exit with error if no serial number is specified and multiple cameras are detected.
--Exit with error if no camera is detected that matches the input serial number.
--Prints all the detected cameras.
Updated launch files with a placeholder for serial number.
Updated rgbd_launch test code to remove hardcoded topic names.
* Modified all parameters to lowercase for consistency
This fixes Issue #13.
* Removed support for R200_DISPARITY_MULTIPLIER camera option
* Added missing install targets
This fixes Pull Request #2.
This fixes Issue #17.
* Contributors: Reagan Lopez, Rajvi Jingar

1.0.1 (2016-03-17)
------------------
* Convert command line args to ROS params
Expand Down
28 changes: 23 additions & 5 deletions camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,47 @@ generate_dynamic_reconfigure_options(
cfg/camera_params.cfg
)



include_directories(
${catkin_INCLUDE_DIRS}
)

add_library(realsense_camera_nodelet src/realsense_camera_nodelet.cpp)
target_link_libraries(realsense_camera_nodelet
target_link_libraries(realsense_camera_nodelet
${catkin_LIBRARIES}
/usr/local/lib/librealsense.so
)
add_dependencies(realsense_camera_nodelet realsense_camera_generate_messages_cpp ${PROJECT_NAME}_gencfg)

add_executable(realsense_camera_test test/realsense_camera_test_node.cpp)
target_link_libraries(realsense_camera_test
target_link_libraries(realsense_camera_test
${catkin_LIBRARIES}
${GTEST_LIBRARIES}
)
add_dependencies(realsense_camera_test realsense_camera_generate_messages_cpp ${PROJECT_NAME}_gencfg)

add_executable(realsense_camera_test_rgbd test/realsense_camera_test_rgbd_node.cpp)
target_link_libraries(realsense_camera_test_rgbd
target_link_libraries(realsense_camera_test_rgbd
${catkin_LIBRARIES}
${GTEST_LIBRARIES}
)
add_dependencies(realsense_camera_test_rgbd realsense_camera_generate_messages_cpp)

# Install nodelet library
install(TARGETS realsense_camera_nodelet LIBRARY
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

# Install launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)

# Install rviz files
install(DIRECTORY rviz/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/rviz
)

# Install xml files
install(FILES package.xml realsense_camera_nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
105 changes: 56 additions & 49 deletions camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ Infrared2 camera
#### Static Parameters

Stream parameters:
serial_no (string, default: blank)
Specify the serial_no to uniquely connect to a camera, especially if multiple cameras are detected by the nodelet.
This feature has been tested to work only on kernel version 4.4.0-040400-generic.
mode (string, default: preset)
Specify the mode to start camera streams. Mode comprises of height, width and fps.
Preset mode enables default values whereas Manual mode enables the specified parameter values.
Expand All @@ -98,19 +101,19 @@ Infrared2 camera
Specify the camera name.
Camera parameters:
Following are the parameters that can be set only statically in the R200 camera:
R200_DEPTH_UNITS : [1, 2147483647]
R200_DEPTH_CLAMP_MIN : [0, 65535]
R200_DEPTH_CLAMP_MAX : [0, 65535]
R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_DECREMENT : [0 - 255]
R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_INCREMENT : [0 - 255]
R200_DEPTH_CONTROL_MEDIAN_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_SCORE_MINIMUM_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_SCORE_MAXIMUM_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_TEXTURE_COUNT_THRESHOLD : [0 - 31]
R200_DEPTH_CONTROL_TEXTURE_DIFFERENCE_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_SECOND_PEAK_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_NEIGHBOR_THRESHOLD : [0 - 1023]
R200_DEPTH_CONTROL_LR_THRESHOLD : [0 - 2047]
r200_depth_units : [1, 2147483647]
r200_depth_clamp_min : [0, 65535]
r200_depth_clamp_max : [0, 65535]
r200_depth_control_estimate_median_decrement : [0 - 255]
r200_depth_control_estimate_median_increment : [0 - 255]
r200_depth_control_median_threshold : [0 - 1023]
r200_depth_control_score_minimum_threshold : [0 - 1023]
r200_depth_control_score_maximum_threshold : [0 - 1023]
r200_depth_control_texture_count_threshold : [0 - 31]
r200_depth_control_texture_difference_threshold : [0 - 1023]
r200_depth_control_second_peak_threshold : [0 - 1023]
r200_depth_control_neighbor_threshold : [0 - 1023]
r200_depth_control_lr_threshold : [0 - 2047]

####Services
get_settings (camera/get_settings)
Expand All @@ -126,28 +129,27 @@ To get supported camera options with current value set. It returns string in opt

Camera parameters:
Following are the parameters that can be set dynamically as well as statically in the R200 camera.
COLOR_BACKLIGHT_COMPENSATION
COLOR_BRIGHTNESS
COLOR_CONTRAST
COLOR_GAIN
COLOR_GAMMA
COLOR_HUE
COLOR_SATURATION
COLOR_SHARPNESS
COLOR_ENABLE_AUTO_WHITE_BALANCE
COLOR_WHITE_BALANCE (Must be set only if COLOR_ENABLE_AUTO_WHITE_BALANCE is disabled)
R200_LR_GAIN
R200_EMITTER_ENABLED
R200_DISPARITY_MULTIPLIER (This parameter does not work in the latest R200 firmware release. Likely to be removed in the next ros-realsense release.)
R200_LR_EXPOSURE (Must be set only if R200_LR_AUTO_EXPOSURE_ENABLED is disabled)
Following are the parameters that can only be set dynamically in the R200 camera.
R200_LR_AUTO_EXPOSURE_ENABLED
R200_AUTO_EXPOSURE_TOP_EDGE (Must be set only if R200_LR_AUTO_EXPOSURE_ENABLED is enabled)
R200_AUTO_EXPOSURE_BOTTOM_EDGE (Must be set only if R200_LR_AUTO_EXPOSURE_ENABLED is enabled)
R200_AUTO_EXPOSURE_LEFT_EDGE (Must be set only if R200_LR_AUTO_EXPOSURE_ENABLED is enabled)
R200_AUTO_EXPOSURE_RIGHT_EDGE (Must be set only if R200_LR_AUTO_EXPOSURE_ENABLED is enabled)

Note: For Autoexposure EDGE parameters, max value will go only upto the bounds of the infrared image.
color_backlight_compensation
color_brightness
color_contrast
color_gain
color_gamma
color_hue
color_saturation
color_sharpness
color_enable_auto_white_balance
color_white_balance (Must be set only if color_enable_auto_white_balance is disabled)
r200_lr_gain
r200_emitter_enabled
r200_lr_exposure (Must be set only if r200_lr_auto_exposure_enabled is disabled)
Following are the parameters that can only be set dynamically in the R200 camera.
r200_lr_auto_exposure_enabled
r200_auto_exposure_top_edge (Must be set only if r200_lr_auto_exposure_enabled is enabled)
r200_auto_exposure_bottom_edge (Must be set only if r200_lr_auto_exposure_enabled is enabled)
r200_auto_exposure_left_edge (Must be set only if r200_lr_auto_exposure_enabled is enabled)
r200_auto_exposure_right_edge (Must be set only if r200_lr_auto_exposure_enabled is enabled)

Note: For Autoexposure edge parameters, max value will go only upto the bounds of the infrared image.
E.g. For 320x240 infrared image, valid values are within 0-319 and 0-239)

Use rqt_reconfigure GUI to view and edit the parameters that are accessible via dynamic_reconfigure.
Expand All @@ -158,7 +160,7 @@ Command to launch GUI:
Command to change dynamic parameters using commandline:

$ rosrun dynamic_reconfigure dynparam set /<node> <parameter_name> <value>
E.g. $ rosrun dynamic_reconfigure dynparam set /RealsenseNodelet COLOR_BACKLIGHT_COMPENSATION 2
E.g. $ rosrun dynamic_reconfigure dynparam set /RealsenseNodelet color_backlight_compensation 2


###Running the R200 nodelet
Expand Down Expand Up @@ -245,17 +247,22 @@ Refer to the function definitions in [realsense_camera_nodelet.h](src/realsense_


###Limitations:
Currently, the ROS camera nodelet only supports the following formats:
* Color stream: RGB8
* Depth stream: Y16
* Infrared stream: Y8

Note: The camera does not provide hardware based depth registration/projector data. Hence the launch file "realsense_r200_rgbd.launch" will not generate data for the following topics:
/camera/depth_registered/hw_registered/image_rect_raw
/camera/depth_registered/points
/camera/depth_registered/hw_registered/image_rect
/camera/depth_registered/image
/camera/depth/disparity
/camera/depth_registered/disparity

* Currently, the camera nodelet has been tested to work only for R200 cameras.

* Currently, the camera nodelet only supports the following formats:
* Color stream: RGB8
* Depth stream: Y16
* Infrared stream: Y8

* The camera does not provide hardware based depth registration/projector data.
Hence the launch file "realsense_r200_rgbd.launch" will not generate data for the following topics:
* /camera/depth_registered/hw_registered/image_rect_raw
* /camera/depth_registered/points
* /camera/depth_registered/hw_registered/image_rect
* /camera/depth_registered/image
* /camera/depth/disparity
* /camera/depth_registered/disparity

* If there are multiple R200 cameras connected to a system, the nodelet can be launched for a particular camera
by specifing the serial_no parameter in the launch file. But it has not been tested to launch nodelets simultaneouly for multiple cameras.

37 changes: 18 additions & 19 deletions camera/cfg/camera_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ gen = ParameterGenerator()

# Name Type Level Description Default Min Max
gen.add("enable_depth", bool_t, 0, "Enable Depth", True)
gen.add("COLOR_BACKLIGHT_COMPENSATION", int_t, 0, "Backlight Compensation", 1, 0, 4)
gen.add("COLOR_BRIGHTNESS", int_t, 0, "Brightness", 56, 0, 255)
gen.add("COLOR_CONTRAST", int_t, 0, "Contrast", 32, 16, 64)
gen.add("COLOR_GAIN", int_t, 0, "Gain", 32, 0, 256)
gen.add("COLOR_GAMMA", int_t, 0, "Gamma", 220, 100, 280)
gen.add("COLOR_HUE", int_t, 0, "Hue", 0, -2200, 2200)
gen.add("COLOR_SATURATION", int_t, 0, "Saturation", 128, 0, 255)
gen.add("COLOR_SHARPNESS", int_t, 0, "Sharpness", 0, 0, 7)
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)
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("R200_DISPARITY_MULTIPLIER", int_t, 0, "Disparity Multiplier", 32, 1, 1000)
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("color_backlight_compensation", int_t, 0, "Backlight Compensation", 1, 0, 4)
gen.add("color_brightness", int_t, 0, "Brightness", 56, 0, 255)
gen.add("color_contrast", int_t, 0, "Contrast", 32, 16, 64)
gen.add("color_gain", int_t, 0, "Gain", 32, 0, 256)
gen.add("color_gamma", int_t, 0, "Gamma", 220, 100, 280)
gen.add("color_hue", int_t, 0, "Hue", 0, -2200, 2200)
gen.add("color_saturation", int_t, 0, "Saturation", 128, 0, 255)
gen.add("color_sharpness", int_t, 0, "Sharpness", 0, 0, 7)
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)
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("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)

exit(gen.generate(PACKAGE, "realsense_camera", "camera_params"))
3 changes: 2 additions & 1 deletion camera/launch/includes/realsense_r200_nodelet.launch.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<launch>
<!-- Name of nodelet manager, must be fully resolved -->
<arg name="manager" />

<arg name="depth_frame_id" default="camera_depth_optical_frame" />
<arg name="rgb_frame_id" default="camera_rgb_optical_frame" />
<arg name="publish_tf" default="true" />
<arg name="depth" default="depth" />
<arg name="rgb" default="rgb" />
<arg name="ir" default="ir" />
<arg name="ir2" default="ir2" />
<arg name="serial_no" default="" />
<arg name="mode" default="preset" />
<arg name="enable_depth" default="true" />
<arg name="enable_color" default="true" />
Expand All @@ -25,6 +25,7 @@

<node pkg="nodelet" type="nodelet" name="camera_nodelet"
args="load realsense_camera/RealsenseNodelet $(arg manager)">
<param name="serial_no" type="str" value="$(arg serial_no)" />
<param name="mode" type="str" value="$(arg mode)" />
<param name="enable_depth" type="bool" value="$(arg enable_depth_ir)" />
<param name="enable_color" type="bool" value="$(arg enable_color)" />
Expand Down
3 changes: 2 additions & 1 deletion camera/launch/realsense_r200_navigation.launch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<launch>

<arg name="serial_no" default="" />
<arg name="mode" default="preset" />
<arg name="enable_depth" default="true" />
<arg name="enable_color" default="true" />
Expand All @@ -10,6 +10,7 @@

<node pkg="nodelet" type="nodelet" name="RealsenseNodelet"
args="load realsense_camera/RealsenseNodelet standalone_nodelet" >
<param name="serial_no" type="str" value="$(arg serial_no)" />
<param name="mode" type="str" value="$(arg mode)" />
<param name="enable_depth" type="bool" value="$(arg enable_depth)" />
<param name="enable_color" type="bool" value="$(arg enable_color)" />
Expand Down
2 changes: 2 additions & 0 deletions camera/launch/realsense_r200_nodelet_standalone_manual.launch
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<launch>

<arg name="serial_no" default="" />
<arg name="mode" default="manual" />
<arg name="color_height" default="240" />
<arg name="color_width" default="320" />
Expand All @@ -16,6 +17,7 @@

<node pkg="nodelet" type="nodelet" name="RealsenseNodelet"
args="load realsense_camera/RealsenseNodelet standalone_nodelet">
<param name="serial_no" type="str" value="$(arg serial_no)" />
<param name="mode" type="str" value="$(arg mode)" />
<param name="enable_depth" type="bool" value="$(arg enable_depth)" />
<param name="enable_color" type="bool" value="$(arg enable_color)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<launch>

<arg name="serial_no" default="" />
<arg name="mode" default="preset" />
<arg name="enable_depth" default="true" />
<arg name="enable_color" default="true" />
Expand All @@ -10,6 +10,7 @@

<node pkg="nodelet" type="nodelet" name="RealsenseNodelet"
args="load realsense_camera/RealsenseNodelet standalone_nodelet">
<param name="serial_no" type="str" value="$(arg serial_no)" />
<param name="mode" type="str" value="$(arg mode)" />
<param name="enable_depth" type="bool" value="$(arg enable_depth)" />
<param name="enable_color" type="bool" value="$(arg enable_color)" />
Expand Down
Loading

0 comments on commit 68c9370

Please sign in to comment.