Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Feb 4, 2024
1 parent af7f154 commit c7f104b
Show file tree
Hide file tree
Showing 6 changed files with 525 additions and 2 deletions.
18 changes: 18 additions & 0 deletions depth_image_proc/doc/changes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Changelog Notes
===============

Jazzy Jalisco
-------------
There are several major change between ``Iron`` and ``Jazzy``:

* All components now properly support ``image_transport`` parameter, or
``depth_image_transport`` if the topic is a depth image.
* All components now properly support remapping the ``camera_info`` topic
for an associated ``image`` topic. For instance, if you remap ``image``
to ``my/image`` then ``my/camera_info`` will be used. Previously you
would have to manually remap the ``camera_info`` topic.
* The input of ``point_cloud_xyz_radial`` is renamed from ``image_raw``
to ``depth/image_raw`` for consistency.
* The input of ``point_cloud_xyzrgb_radial`` is renamed from
``depth_registered/image_rect`` to ``depth/image_raw`` and
``rgb/image_rect_color`` to ``rgb/image_raw``.
178 changes: 178 additions & 0 deletions depth_image_proc/doc/components.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
Nodes and Components
====================

This package includes a number of ROS 2 components that can be assembled
into depth image processing pipelines.
See the tutorial :ref:`Launch depth_image_proc Components`.

Alternatively, each component can be run as a standalone node.

depth_image_proc::ConvertMetricNode
-----------------------------------
Component to convert raw uint16 depth image in mm to float depth image in m.
Also available as a standalone node with the name ``convert_metric_node``.

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **image_raw** (sensor_msgs/Image): ``uint16`` depth image in mm, the native
OpenNI format.

Published Topics
^^^^^^^^^^^^^^^^
* **image** (sensor_msgs/Image): ``float`` depth image in m, the recommended
format for processing in ROS.

Parameters
^^^^^^^^^^
* **image_transport** (string, default: raw): Image transport to use.

depth_image_proc::CropForemostNode
----------------------------------
TODO

depth_image_proc::DisparityNode
-------------------------------
Comoonent to convert depth image to disparity image.

TODO: copy images in here

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **left/image_rect** (sensor_msgs/Image): Rectified depth image.
* **right/camera_info** (sensor_msgs/CameraInfo): Camera calibration and
metadata. Must contain the baseline, which conventionally is encoded in
the right camera P matrix.

Published Topics
^^^^^^^^^^^^^^^^
* **left/disparity** (stereo_msgs/DisparityImage): Disparity image
(inversely related to depth), for interop with stereo processing nodes.
For all other purposes use depth images instead.

Parameters
^^^^^^^^^^
* **delta_d** (double, default: 0.125): Smallest allowed disparity increment,
which relates to the achievable depth range resolution. Defaults to 1/8 pixel.
* **image_transport** (string, default: raw): Image transport to use.
* **min_range** (double, default: 0.0): Minimum detectable distance.
* **max_range** (double, default: +Inf): Maximum detectable distance.
* **queue_size** (int, default: 5): Size of message queue for synchronizing
subscribed topics.

depth_image_proc::PointCloudXyzNode
-----------------------------------
Component to convert depth image to XYZ point cloud.

TODO: copy images

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **depth/image_rect** (sensor_msgs/Image): Rectified depth image.
* **intensity/image_rect** (sensor_msgs/Image): Rectified intensity image.
* **camera_info** (sensor_msgs/CameraInfo): Camera calibration and metadata.

Published Topics
^^^^^^^^^^^^^^^^
* **points** (sensor_msgs/PointCloud2): XYZ point cloud. If using PCL,
subscribe as PointCloud<PointXYZ>.

Parameters
^^^^^^^^^^
* **depth_image_transport** (string, default: raw): Image transport to use
for the depth topic subscriber.
* **image_transport** (string, default: raw): Image transport to use for
the intensity image subscriber.
* **queue_size** (int, default: 5): Size of message queue for synchronizing
subscribed topics.

depth_image_proc::PointCloudXyzRadialNode
-----------------------------------------
TODO

depth_image_proc::PointCloudXyziNode
------------------------------------
Component to convert depth image to XYZI point cloud.

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **image_rect** (sensor_msgs/Image): Rectified depth image.
* **camera_info** (sensor_msgs/CameraInfo): Camera calibration and metadata.

Published Topics
^^^^^^^^^^^^^^^^
* **points** (sensor_msgs/PointCloud2): XYZ point cloud. If using PCL,
subscribe as PointCloud<PointXYZI>.

Parameters
^^^^^^^^^^
* **depth_image_transport** (string, default: raw): Image transport to use.
* **queue_size** (int, default: 5): Size of message queue for synchronizing
subscribed topics.

depth_image_proc::PointCloudXyziRadialNode
------------------------------------------
TODO

depth_image_proc::PointCloudXyzrgbNode
--------------------------------------
Component combine registered depth image and RGB image into XYZRGB point cloud.

TODO: copy images

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **depth_registered/image_rect** (sensor_msgs/Image): Rectified depth image,
registered to the RGB camera
* **rgb/image_rect_color** (sensor_msgs/Image): Rectified color image.
* **rgb/camera_info** (sensor_msgs/CameraInfo): RGB camera calibration and metadata.

Published Topics
^^^^^^^^^^^^^^^^
* **points** (sensor_msgs/PointCloud2): XYZ point cloud. If using PCL,
subscribe as PointCloud<PointXYZRGB>.

Parameters
^^^^^^^^^^
* **depth_image_transport** (string, default: raw): Image transport to use
for depth_registered subscriber.
* **image_transport** (string, default: raw): Image transport to use for
rgb/image_rect_color subscriber.
* **exact_sync** (bool, default: False): Whether to use exact synchronizer.
* **queue_size** (int, default: 5): Size of message queue for synchronizing
subscribed topics.

depth_image_proc::PointCloudXyzrgbRadialNode
--------------------------------------------
TODO

depth_image_proc::RegisterNode
------------------------------
Component to "register" a depth image to another camera frame. Reprojecting the
depths requires the calibration parameters of both cameras and, from tf, and the
extrinsic transform between them.

Subscribed Topics
^^^^^^^^^^^^^^^^^
* **depth/image_rect** (sensor_msgs/Image): Rectified depth image.
* **depth/camera_info** (sensor_msgs/CameraInfo): Depth camera calibration and metadata.
* **rgb/camera_info** (sensor_msgs/CameraInfo): RGB camera calibration and metadata.

Published Topics
^^^^^^^^^^^^^^^^
* **depth_registered/camera_info** (sensor_msgs/CameraInfo): Camera calibration and
metadata. Same as rgb/camera_info but time-synced to depth_registered/image_rect.
* **depth_registered/image_rect** (sensor_msgs/Image): Reprojected depth image in the
RGB camera frame.

Parameters
^^^^^^^^^^
* **depth_image_transport** (string, default: raw): Image transport to use
for depth subscriber.
* **queue_size** (int, default: 5): Size of message queue for synchronizing
subscribed topics.

Required TF Transforms
^^^^^^^^^^^^^^^^^^^^^^
* /depth_optical_frame → /rgb_optical_frame: The transform between the depth and
RGB camera optical frames as specified in the headers of the subscribed topics
(rendered here as /depth_optical_frame and /rgb_optical_frame).
194 changes: 194 additions & 0 deletions depth_image_proc/doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'depth_image_proc'
copyright = '2008-2024, Open Source Robotics Foundation, Inc.' # noqa
author = 'Open Source Robotics Foundation, Inc.'

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '3.2.1'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx_rtd_theme',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'depth_image_proc_doc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'depth_image_proc', 'depth_image_proc Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'depth_image_proc', 'depth_image_proc Documentation',
author, 'depth_image_proc', 'ROS 2 components for depth image processing.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

autoclass_content = 'both'

autodoc_default_options = {
'members': True, # document members
'undoc-members': True, # also document members without documentation
}
Loading

0 comments on commit c7f104b

Please sign in to comment.