personalrobotics / herb_launch

Launch files for HERB.
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Add RealSense dynamic_reconfigure configuration. #56

Closed brianhou closed 4 years ago

brianhou commented 4 years ago

The only change from the default configuration (inherited from image_transport) is to use png compression for the aligned depth data. The default is jpg, which isn't able to handle the 16-bit depths provided by the RealSense. There may be a speed penalty (I haven't profiled yet), but OpenCV/libjpeg will just drop the upper 8 bits if it uses jpg, which renders the data unusable for distances farther than 0.25m.

(I don't fully understand why, but the cv::imwrite documentation specifically says that 16-bit unsigned images can only be encoded as png/jpeg2000 and not jpeg.)

Kelym commented 4 years ago

LGTM. Is there more doc that you used to write this dynamic_reconfigure? maybe helpful to link it here?

brianhou commented 4 years ago

Thanks! I generated this by manually running dynamic_reconfigure to set the format and dumping the resulting configuration, something like

$ rosrun dynamic_reconfigure dynparam set /camera/aligned_depth_to_color/image_raw/compressed/format png
$ rosrun dynamic_reconfigure dynparam dump