Skip to content

Commit

Permalink
update install procedure and prerequisite.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya committed Mar 16, 2024
1 parent d66a06a commit 0c09099
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ This tool can be viewed from two perspectives: first from the perspective of a u
To generate the documentation for almost any ROS 2 package, first build the package locally, then run this command replacing the arguments with appropriate directories:

```
$ rosdoc2 build \
rosdoc2 build \
--package-path ./src/path/to/my_package_name
```

> [!NOTE]
> Please make sure that ROS 2 colcon workspace is NOT sourced during build.
This command will inspect your package and run various documentation tools based on the configuration of your package.

The package directory that you specify must contain a single ROS 2 package that has a `package.xml` file and optionally a YAML configuration file to configure the doc build process.

There will be an `index.html` file in the output directory which you can open manually, or with this command:

```
$ rosdoc2 open ./doc_output/index.html
rosdoc2 open ./doc_output/index.html
```

For more advanced usage see the documentation.
Expand All @@ -37,13 +40,25 @@ Additionally, if you have a Python API then you will want to provide a Sphinx `c

## Installation

### Prerequisite

```
apt install -y python3-pip git
```

and then, install [ros2_documentation](https://github.com/ros2/ros2_documentation?tab=readme-ov-file#prerequisites) required packages.

### `rosdoc2` installation

`rosdoc2` can be installed locally from the git repository.
Clone the repository, change into the directory, and then run:

```
$ pip install --user --upgrade .
pip install --user --upgrade .
```

`rosdoc2` will be installed under `~/.local/bin/` directory.

## Documentation

The purpose of this tool is to automate the execution of the various documentation tools when building documentation for ROS 2 packages.
Expand Down Expand Up @@ -98,7 +113,7 @@ How to do that, and how to handle some other special cases will follow.
To generate a default config file, run

```
$ rosdoc2 default_config \
rosdoc2 default_config \
--package-path ./src/path/to/my_package_name
```

Expand Down

0 comments on commit 0c09099

Please sign in to comment.