Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
653fa0c
Migrate README.md
apockill Nov 22, 2024
e6e3526
Migrate pyproject.toml
apockill Nov 22, 2024
e4fba86
Add `qos` tooling
apockill Nov 22, 2024
7fe4d15
Clean up README
apockill Nov 23, 2024
368a5dc
Remove runtime scripts, for now
apockill Nov 23, 2024
cc0d803
Description formatting
apockill Nov 24, 2024
bb5c863
Boring files
apockill Nov 24, 2024
c75a805
Migrate some test resources
apockill Nov 24, 2024
215b528
Migrate `ros2_numpy` module, passing tests now
apockill Nov 24, 2024
7b26244
Update dependencies, with a now-working ros2_numpy
apockill Nov 24, 2024
a4498a9
Add transforms3d to get around numpy issues
apockill Nov 24, 2024
3050044
Pass lint
apockill Nov 26, 2024
8561a1b
Update template
apockill Nov 26, 2024
a93eef0
Use pytest not unittest in `ros2_numpy`
apockill Nov 26, 2024
d0e05c3
Add `node_helpers.interaction`
apockill Nov 26, 2024
1811ae7
Add README for node_helpers.interaction
apockill Nov 26, 2024
1c10894
Markers
apockill Nov 26, 2024
dd9f403
Minor documentation improvement
apockill Nov 26, 2024
e32d72b
Add `std_msgs` as a dependency
apockill Nov 26, 2024
f165eb4
Add `AsyncAdapter` and tests
apockill Nov 26, 2024
d4d8f3c
Remove OpenCV dependency
apockill Nov 26, 2024
30c8254
Add `node_helpers.robust_rpc`
apockill Nov 26, 2024
9d99dba
Add pubsub package
apockill Nov 26, 2024
2229d8d
Lint ros2_numpy tests
apockill Nov 26, 2024
1bb7214
Add pubsub readme
apockill Nov 26, 2024
6d951e9
Add `destruction` module
apockill Nov 26, 2024
829eafe
Add `futures` module and tests
apockill Nov 26, 2024
5e87f12
Add futures library
apockill Nov 26, 2024
ea4b7e4
Add `node_helpers.actions`
apockill Nov 26, 2024
6085626
Add `node_helpers.actions` tests
apockill Nov 26, 2024
4e1768c
Add `actions` documentation
apockill Nov 27, 2024
964c00f
Update tracking PR in comment.
apockill Nov 27, 2024
478d6a0
Reduce result timeout default significantly
apockill Nov 27, 2024
60cc308
Add `launching.rst`
apockill Nov 27, 2024
6e54379
Add `node_helpers.launching`
apockill Nov 27, 2024
1251b4b
Add the rest of `node_helpers.launching` unit tests
apockill Nov 27, 2024
1c0efcf
Add `index.rst`
apockill Nov 27, 2024
8140d0c
Add `node_helpers.tf`
apockill Nov 27, 2024
457038f
Add readme for `node_helpers.tf`
apockill Nov 27, 2024
1c8905b
Add readme for `node_helpers.tf`
apockill Nov 27, 2024
e6f8115
Add `timing` integration tests
apockill Nov 27, 2024
3f4722b
Add LatchingPublisher
apockill Nov 27, 2024
c6f500f
Remove unused import
apockill Nov 27, 2024
f493c25
Add `BinaryReading.msg` and `RangefinderReading.msg`
apockill Nov 27, 2024
e3b8eb1
Add `node_helpers.sensors`
apockill Nov 27, 2024
6184efb
Linting
apockill Nov 27, 2024
e7b4821
Remove `station` from robust_rpc
apockill Nov 27, 2024
2044e43
Add `geometry_msgs` to messages dependencies
apockill Nov 27, 2024
b57dbea
Add root `conftest.py`
apockill Nov 27, 2024
4bbda3f
Remove `signals/`
apockill Nov 27, 2024
a0d68dc
Add `node_helpers.testing`
apockill Nov 27, 2024
af84062
Add custom `MultiThreadedStackTracedExecutor`
apockill Nov 27, 2024
8b9b274
Add `create_spin_function`
apockill Nov 27, 2024
32907ed
Add `create_spin_function`
apockill Nov 29, 2024
5d24e26
Add parameters module
apockill Nov 29, 2024
cd1d3d6
Remove errant logs
apockill Nov 29, 2024
1545880
Improve README
apockill Nov 29, 2024
2442e22
Introduce `InteractiveTransformPublisher`
apockill Nov 30, 2024
eb55f24
ADd docs for `InteractiveTransformPublisher`
apockill Nov 30, 2024
e53e79c
Cleaning up
apockill Nov 30, 2024
6047443
Add `HelpfulNode`
apockill Nov 30, 2024
e3904f6
Removed unused tests from the template
apockill Nov 30, 2024
b34717c
Add `SoundPlayer` node
apockill Nov 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "git@github.com:UrbanMachine/create-ros-app.git",
"commit": "92da06d68aabc5ba36e559b7fdd83cf7a54a997f",
"commit": "5cbe2af623cd536fbb52420e3dc8e3205ff6c86e",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -9,13 +9,14 @@
"dockerhub_username_or_org": "urbanmachine",
"project_name": "node_helpers",
"project_description": "An opinionated ROS2 framework that minimizes boilerplate while maximizing reliability. Features intuitive APIs for parameter management, action handling, and error-resilient RPC. Designed by Urban Machine for safe and scalable robotics.",
"version": "1.0.0",
"version": "0.5.0",
"license": "MIT",
"example_package_name": "node_helpers",
"example_package_description": "An opinionated ROS2 framework that minimizes boilerplate while maximizing reliability. Features intuitive APIs for parameter management, action handling, and error-resilient RPC. Designed by Urban Machine for safe and scalable robotics.",
"example_node_name": "ExampleNode",
"example_launch_profile": "node_helpers_showcase",
"example_package_version": "0.1.0",
"example_package_version": "0.5.0",
"__example_messages_package_name": "node_helpers_msgs",
"_template": "git@github.com:UrbanMachine/create-ros-app.git"
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/lint/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
LINTERS = {
PYTHON_LANGUAGE: [
# Run linters from fastest to slowest
lint_ruff_check,
lint_ruff_format,
lint_ruff_check,
lint_darglint,
lint_mypy,
],
Expand Down
4 changes: 2 additions & 2 deletions .github/lint/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def required_path(path_str: str) -> Path:

ROS_PATH = required_path("pkgs")
LINT_PATH = required_path(".github/lint")
JS_PATH = Path(".")
FIRMWARE_PATH = Path(".")
JS_PATH = Path()
FIRMWARE_PATH = Path()
LAUNCH_PATH = required_path("launch-profiles")


Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@ An opinionated ROS2 framework that minimizes boilerplate while maximizing reliab
## Running This Project

For in-depth documentation on the repository features, read the [About Template](docs/about_template.md) documentation.
This project is a collection of ROS utilities that play nicely together. It's
recommended to start by reading the highlights in ``docs/``. For smaller utilities, they
will be documented in READMEs in their respective modules.

### Dependencies
For example, ``node_helpers.timing`` has a README describing the API's in that module.
However ``node_helpers.parameters`` has a page under ``docs/`` that describes the
philosophy and usage of the module in depth.

This project depends on [Docker](https://docs.docker.com/get-docker/), and can be accelerated using [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Install both before proceeding.
### Dependencies

The linting tooling requires [Poetry](https://python-poetry.org/docs/) to run.
This project depends on [Docker](https://docs.docker.com/get-docker/). The linting tooling requires [Poetry](https://python-poetry.org/docs/) to run.

### Running the Project

This project is intended to be used as a library, however there is a showcase
launch-profile that demonstrates some of the library's features.

To run the project, use the following command:

```shell
docker/launch node_helpers_showcase
```

Take a look at the nodes under `pkgs/node_helpers/nodes`, and the launch file under
`launch-profiles` to get an idea of some of the libraries features.

Then, open http://localhost/ on your browser to view the project logs.


Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ services:
- "./launch-profiles/${LAUNCH_PROFILE:- 'set in docker/_shared'}:/robot/launch-profile/"
# Necessary for display passthrough
- "/tmp/.X11-unix:/tmp/.X11-unix:rw"
# Necessary for PulseAudio passthrough
- "/run/user/${USER_ID:-1000}/pulse/native:/pulse-socket"
# Build cache, used by `save-build-cache` and `restore-build-cache` docker scripts
- type: volume
source: ros-nodes-build-cache
target: /robot/build
environment:
# Necessary for display passthrough
DISPLAY: $DISPLAY
# Necessary for PulseAudio passthrough
PULSE_SERVER: "unix:/pulse-socket"
# Gives the container access to kernel capabilities, useful for most robots
network_mode: host
cap_add:
Expand Down
3 changes: 0 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ RUN echo "/opt/ros/${ROS2_DISTRO}/lib/${PYTHON_VERSION}/site-packages" >> /usr/l
RUN echo "/opt/ros/${ROS2_DISTRO}/local/lib/${PYTHON_VERSION}/dist-packages" >> /usr/local/lib/${PYTHON_VERSION}/dist-packages/ros2.pth
RUN make-pth-file-from-workspace "$(pwd)/install" /usr/local/lib/${PYTHON_VERSION}/dist-packages/robot.pth

# Copy in useful runtime scripts
COPY docker/utils/runtime/* /usr/local/bin/

# Move the build cache from a Docker cache mount to a place where our build
# system can see it. This helps make `colcon build` faster between runs.
RUN --mount=type=cache,target="${BUILD_CACHE}" restore-build-cache
Expand Down
2 changes: 1 addition & 1 deletion docker/utils/environment/make-pth-file-from-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# make-pth-file-from-workspace {workspace install dir} {.pth file destination}
#
# Example:
# make-pth-file-from-workspace /robot/install /usr/local/lib/python3.8/dist-packages/robot.pth
# make-pth-file-from-workspace /robot/install /usr/local/lib/pythonX.XX/dist-packages/robot.pth

set -o errexit
set -o pipefail
Expand Down
14 changes: 10 additions & 4 deletions docs/about_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Using `create-ros-app`

This repository was initialized by the [create-ros-app](https://github.com/UrbanMachine/create-ros-app) template.
This template is a everything-but-the-robot-code starter for ROS projects. It includes a Dockerfile for building ROS packages, a GitHub Actions workflow for linting and autoformatting, and a few other goodies.
This template is a everything-but-the-robot-code starter for ROS projects. It includes a Dockerfile for building ROS packages, a GitHub Actions workflow for linting and autoformatting, and many other goodies.

This documentation walks through the features of the template, and how to use them.

Expand Down Expand Up @@ -56,15 +56,15 @@ Here's a quick guide on the features of this template

The packages directory contains all the packages that are used in the project. Each package is added in the `Dockerfile`, and any new packages should be added there as well.

#### Package structure
Each package is made up of:
#### Python Package structure
Each python package is made up of:
- A `resource` directory, which is a colcon requirement
- A `package.xml` file, which is a colcon requirement
- A `pyproject.toml`, because this project uses [colcon-poetry-ros](https://github.com/UrbanMachine/colcon-poetry-ros) to install project dependencies. Most ROS python packages use `setup.py`, but by using this plugin, we can use a modern python tool called [Poetry](https://python-poetry.org/) to manage dependencies.
- A directory for code
- A directory for tests

#### Test directories
##### Test directories

As (arbitrary) best practice, the example node uses a test directory that follows the following structure

Expand All @@ -84,6 +84,12 @@ package_name/

Essentially, tests exist in a parallel directory to the package, and are split into `unit` and `integration` tests. The directories within `unit` and `integration` mirror the structure of the package itself, except that module names are prefixed with `test_`.

#### Message Package Structure

The template will generate a message package for you with an `ExampleAction`, `ExampleService`, and `ExampleMessage`. You can add more messages by adding them to the `msg` directory and updating the `CMakeLists.txt` and `package.xml` files.

This can be used as a place for you to store your messages used just for this project. It follows standard ROS2 message package structure.

### `.github/`

This project uses poetry for linting, and has some code for running linting and autoformatting under `.github/lint`.
Expand Down
Loading