Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves documentation. #43

Merged
merged 2 commits into from Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -36,7 +36,7 @@ ament_environment_hooks(
if(BUILD_DOCS)
message(STATUS "Doxygen generation - Enabled")
find_package(ament_cmake_doxygen REQUIRED)
ament_doxygen_generate(doxygen_maliput
ament_doxygen_generate(doxygen_maliput_sparse
CONFIG_OVERLAY doc/Doxyfile.overlay.in
TEST_ON_WARNS
)
Expand Down
86 changes: 86 additions & 0 deletions README.md
@@ -1 +1,87 @@
[![GCC](https://github.com/maliput/maliput_sparse/actions/workflows/build.yml/badge.svg)](https://github.com/maliput/maliput_sparse/actions/workflows/build.yml)

# maliput_sparse

## Description

`maliput_sparse` is a convenient package that provides several helpers for creating a maliput backend that is expected to be built on top of waypoints without any analytical model of the surface.

By using the [builder API](https://maliput.readthedocs.io/en/latest/html/deps/maliput_sparse/html/builder_8h.html), the mathematical model is solved under the hood so the user doesn't have to dive into complex geometric calculations.

**Note**: For full information about Maliput please visit [Maliput Documentation](https://maliput.readthedocs.io/en/latest/index.html).

## API Documentation

Refer to [Maliput sparse's Online API Documentation](https://maliput.readthedocs.io/en/latest/html/deps/maliput_sparse/html/index.html).

## Examples

[Getting Started](https://maliput.readthedocs.io/en/latest/getting_started.html) page is a good place for starting to see Maliput's capabilities and how to use a Maliput backend for getting a road network.

- [maliput_osm](https://github.com/maliput/maliput_osm): This maliput backend works as example on how `maliput_sparse` can be used for easily creating a backend that is based on a format that uses waypoints for describing the roads.

## Installation

### Supported platforms

Ubuntu Focal Fossa 20.04 LTS, ROS2 Foxy.

### Binary Installation on Ubuntu

See [Installation Docs](https://maliput.readthedocs.io/en/latest/installation.html#binary-installation-on-ubuntu).

### Source Installation on Ubuntu

#### Prerequisites

```
sudo apt install python3-rosdep python3-colcon-common-extensions
```

#### Build

1. Create colcon workspace if you don't have one yet.
```sh
mkdir colcon_ws/src -p
```

2. Clone this repository in the `src` folder
```sh
cd colcon_ws/src
git clone https://github.com/maliput/maliput_sparse.git
```

3. Install package dependencies via `rosdep`
```
export ROS_DISTRO=foxy
```
```sh
rosdep update
rosdep install -i -y --rosdistro $ROS_DISTRO --from-paths src
```

4. Build the package
```sh
colcon build --packages-up-to maliput_sparse
```

**Note**: To build documentation a `-BUILD_DOCS` cmake flag is required:
```sh
colcon build --packages-select maliput_sparse --cmake-args " -DBUILD_DOCS=On"
```
More info at [Building Documentation](https://maliput.readthedocs.io/en/latest/developer_guidelines.html#building-the-documentation).

For further info refer to [Source Installation on Ubuntu](https://maliput.readthedocs.io/en/latest/installation.html#source-installation-on-ubuntu)


### For development

It is recommended to follow the guidelines for setting up a development workspace as described [here](https://maliput.readthedocs.io/en/latest/developer_setup.html).

## Contributing

Please see [CONTRIBUTING](https://maliput.readthedocs.io/en/latest/contributing.html) page.

## License

[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://github.com/maliput/maliput_sparse/blob/main/LICENSE)
5 changes: 3 additions & 2 deletions include/maliput_sparse/builder/builder.h
Expand Up @@ -29,7 +29,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once

/// @file Builder API to construct a maliput::api::RoadGeometry.
/// @file
/// Builder API to construct a maliput::api::RoadGeometry.
///
/// @details It allows simple construction of nested nodes in the maliput::api::RoadGeometry graph. The
/// geometry details are expected to be computed / loaded outside this method to allow parallelization
Expand Down Expand Up @@ -390,7 +391,7 @@ class RoadGeometryBuilder final {
RoadGeometryBuilder& AngularTolerance(double angular_tolerance);

/// @brief Sets the scale length of the maliput::api::RoadGeometry.
/// @param scale_tolerance The scale length of the maliput::api::RoadGeometry. It must be positive.
/// @param scale_length The scale length of the maliput::api::RoadGeometry. It must be positive.
/// @return A reference to this RoadGeometryBuilder.
RoadGeometryBuilder& ScaleLength(double scale_length);

Expand Down
2 changes: 1 addition & 1 deletion include/maliput_sparse/geometry/utility/geometry.h
Expand Up @@ -114,7 +114,7 @@ ClosestPointResult GetClosestPoint(const std::pair<maliput::math::Vector3, malip
const maliput::math::Vector3& xyz);

/// Gets the closest point in the @p line_string to the given @p xyz point.
/// @param segment Segment to be computed the closest point from.
/// @param line_string LineString3d to be computed the closest point from.
/// @param xyz Point to be computed the closest point to.
/// @return A ClosestPointResult struct containing the closest point, the distance between the closest point and @p xyz
/// and the p coordinate in the LineString3d matching the closest point.
Expand Down