Skip to content

Commit bcd2cd9

Browse files
authored
Added documentation (#69)
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
1 parent 1abcb5e commit bcd2cd9

File tree

6 files changed

+238
-2
lines changed

6 files changed

+238
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ ros2 run point_cloud_transport_tutorial my_publisher --ros-args -p pct.point_clo
8585

8686
## Known transports
8787

88-
- [draco_point_cloud_transport](https://github.com/ros-perception/point_cloud_transport_plugins/tree/ros2/draco_point_cloud_transport): Lossy compression via Google
89-
- [zlib_point_cloud_transport](https://github.com/ros-perception/point_cloud_transport_plugins/tree/ros2/zlib_point_cloud_transport): Lossless compression via Zlib compression.
88+
- [draco_point_cloud_transport](https://github.com/ros-perception/point_cloud_transport_plugins/tree/rolling/draco_point_cloud_transport): Lossy compression via Google
89+
- [zlib_point_cloud_transport](https://github.com/ros-perception/point_cloud_transport_plugins/tree/rolling/zlib_point_cloud_transport): Lossless compression via Zlib compression.
90+
- [zstd_point_cloud_transport](https://github.com/ros-perception/point_cloud_transport_plugins/tree/rolling/zstd_point_cloud_transport): Lossless compression via Zstd compression.
9091
- Did you write one? Don't hesitate and send a pull request adding it to this list!
9192

9293
## Authors

point_cloud_transport/doc/conf.py

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# Copyright 2024 Open Source Robotics Foundation, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# -*- coding: utf-8 -*-
16+
#
17+
# Configuration file for the Sphinx documentation builder.
18+
#
19+
# This file does only contain a selection of the most common options. For a
20+
# full list see the documentation:
21+
# http://www.sphinx-doc.org/en/master/config
22+
23+
# -- Path setup --------------------------------------------------------------
24+
25+
# If extensions (or modules to document with autodoc) are in another directory,
26+
# add these directories to sys.path here. If the directory is relative to the
27+
# documentation root, use os.path.abspath to make it absolute, like shown here.
28+
import os
29+
import sys
30+
sys.path.insert(0, os.path.abspath('.'))
31+
32+
33+
# -- Project information -----------------------------------------------------
34+
35+
36+
from datetime import datetime
37+
now = datetime.now() # current date and time
38+
year = now.strftime("%Y")
39+
40+
project = 'point_cloud_transport'
41+
copyright = '2008-' + year + ', Open Source Robotics Foundation, Inc.' # noqa
42+
author = 'Open Source Robotics Foundation, Inc.'
43+
44+
# The short X.Y version
45+
version = ''
46+
# The full version, including alpha/beta/rc tags
47+
release = '3.0.5'
48+
49+
50+
# -- General configuration ---------------------------------------------------
51+
52+
# If your documentation needs a minimal Sphinx version, state it here.
53+
#
54+
# needs_sphinx = '1.0'
55+
56+
# Add any Sphinx extension module names here, as strings. They can be
57+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
58+
# ones.
59+
extensions = [
60+
'sphinx.ext.autodoc',
61+
'sphinx.ext.autosummary',
62+
'sphinx.ext.doctest',
63+
'sphinx.ext.coverage',
64+
'sphinx_rtd_theme',
65+
"myst_parser",
66+
]
67+
68+
# Add any paths that contain templates here, relative to this directory.
69+
templates_path = ['_templates']
70+
71+
# The suffix(es) of source filenames.
72+
# You can specify multiple suffix as a list of string:
73+
#
74+
# source_suffix = ['.rst', '.md']
75+
source_suffix = '.rst'
76+
77+
# The master toctree document.
78+
master_doc = 'index'
79+
80+
# The language for content autogenerated by Sphinx. Refer to documentation
81+
# for a list of supported languages.
82+
#
83+
# This is also used if you do content translation via gettext catalogs.
84+
# Usually you set "language" from the command line for these cases.
85+
language = None
86+
87+
# List of patterns, relative to source directory, that match files and
88+
# directories to ignore when looking for source files.
89+
# This pattern also affects html_static_path and html_extra_path.
90+
exclude_patterns = []
91+
92+
# The name of the Pygments (syntax highlighting) style to use.
93+
pygments_style = None
94+
95+
96+
# -- Options for HTML output -------------------------------------------------
97+
98+
# The theme to use for HTML and HTML Help pages. See the documentation for
99+
# a list of builtin themes.
100+
#
101+
html_theme = 'sphinx_rtd_theme'
102+
103+
# Theme options are theme-specific and customize the look and feel of a theme
104+
# further. For a list of options available for each theme, see the
105+
# documentation.
106+
#
107+
# html_theme_options = {}
108+
109+
# Add any paths that contain custom static files (such as style sheets) here,
110+
# relative to this directory. They are copied after the builtin static files,
111+
# so a file named "default.css" will overwrite the builtin "default.css".
112+
html_static_path = []
113+
114+
# Custom sidebar templates, must be a dictionary that maps document names
115+
# to template names.
116+
#
117+
# The default sidebars (for documents that don't match any pattern) are
118+
# defined by theme itself. Builtin themes are using these templates by
119+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
120+
# 'searchbox.html']``.
121+
#
122+
# html_sidebars = {}
123+
124+
125+
# -- Options for HTMLHelp output ---------------------------------------------
126+
127+
# Output file base name for HTML help builder.
128+
htmlhelp_basename = 'point_cloud_transport_doc'
129+
130+
131+
# -- Options for LaTeX output ------------------------------------------------
132+
133+
latex_elements = {
134+
# The paper size ('letterpaper' or 'a4paper').
135+
#
136+
# 'papersize': 'letterpaper',
137+
138+
# The font size ('10pt', '11pt' or '12pt').
139+
#
140+
# 'pointsize': '10pt',
141+
142+
# Additional stuff for the LaTeX preamble.
143+
#
144+
# 'preamble': '',
145+
146+
# Latex figure (float) alignment
147+
#
148+
# 'figure_align': 'htbp',
149+
}
150+
151+
152+
# -- Options for manual page output ------------------------------------------
153+
154+
# One entry per manual page. List of tuples
155+
# (source start file, name, description, authors, manual section).
156+
man_pages = [
157+
(master_doc, 'point_cloud_transport', 'point_cloud_transport Documentation',
158+
[author], 1)
159+
]
160+
161+
162+
# -- Options for Texinfo output ----------------------------------------------
163+
164+
# Grouping the document tree into Texinfo files. List of tuples
165+
# (source start file, target name, title, author,
166+
# dir menu entry, description, category)
167+
texinfo_documents = [
168+
(master_doc, 'point_cloud_transport', 'point_cloud_transport Documentation',
169+
author, 'point_cloud_transport', 'ROS 2 components for point cloud transport.',
170+
'Miscellaneous'),
171+
]
172+
173+
174+
# -- Options for Epub output -------------------------------------------------
175+
176+
# Bibliographic Dublin Core info.
177+
epub_title = project
178+
179+
# The unique identifier of the text. This can be a ISBN number
180+
# or the project homepage.
181+
#
182+
# epub_identifier = ''
183+
184+
# A unique identification for the text.
185+
#
186+
# epub_uid = ''
187+
188+
# A list of files that should not be packed into the epub file.
189+
epub_exclude_files = ['search.html']
190+
191+
192+
# -- Extension configuration -------------------------------------------------
193+
194+
autoclass_content = 'both'
195+
196+
autodoc_default_options = {
197+
'members': True, # document members
198+
'undoc-members': True, # also document members without documentation
199+
}

point_cloud_transport/doc/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. include:: readme_include.md
2+
:parser: myst_parser.sphinx_
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
self
8+
9+
Indices and tables
10+
==================
11+
12+
* :ref:`genindex`
13+
* :ref:`search`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```{include} ../../README.md
2+
:relative-images:
3+
```

point_cloud_transport/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
<export>
3333
<build_type>ament_cmake</build_type>
34+
<rosdoc2>rosdoc2.yaml</rosdoc2>
3435
</export>
3536

3637
</package>

point_cloud_transport/rosdoc2.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type: 'rosdoc2 config'
2+
version: 1
3+
4+
---
5+
6+
settings:
7+
generate_package_index: false
8+
always_run_doxygen: false
9+
enable_breathe: false
10+
enable_exhale: false
11+
always_run_sphinx_apidoc: false
12+
override_build_type: 'ament_python'
13+
python_source: 'doc'
14+
builders:
15+
- sphinx: {
16+
name: 'point_cloud_transport',
17+
sphinx_sourcedir: 'doc',
18+
output_dir: ''
19+
}

0 commit comments

Comments
 (0)