Skip to content

Commit 7fcba3a

Browse files
committed
Implement review feedback
1 parent 1568426 commit 7fcba3a

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ ARG DEBIAN_FRONTEND=noninteractive
33

44
# Install dependencies
55
RUN apt-get update && apt-get install -y \
6-
clang \
76
curl \
87
git \
98
libclang-dev \

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ The current set of features include:
1919
- Support for publishers and subscriptions
2020
- Tunable QoS settings
2121

22-
Lots of things are still missing however, see the [issue list](https://github.com/ros2-rust/ros2_rust/issues) for an overview.
22+
Lots of things are still missing however, see the [issue list](https://github.com/ros2-rust/ros2_rust/issues) for an overview. You are very welcome to [contribute](docs/Contributing.md)!
2323

24-
The client library is still rapidly evolving, and there are no stability guarantees.
24+
Since the client library is still rapidly evolving, there are no stability guarantees for the moment.
2525

2626
Sounds great, how can I try this out?
2727
-------------------------------------
2828

29-
In a nutshell, the steps to get started are:
29+
Here are the steps for building the `ros2_rust` examples in a vanilla Ubuntu Focal installation. See the [in-depth guide for building `ros2_rust` packages](docs/Building.md) for more details and options, including a Docker-based setup.
3030

31+
<!--- These steps should be kept in sync with docs/Building.md --->
3132
```shell
33+
# Install Rust, e.g. as described in https://rustup.rs/
34+
# Install ROS 2 as described in https://docs.ros.org/en/foxy/Installation.html
35+
# Assuming you installed the minimal version of ROS 2, you need these additional packages:
36+
sudo apt install -y git libclang-dev python3-pip python3-vcstool # libclang-dev is required by bindgen
37+
# Install these plugins for cargo and colcon:
38+
cargo install cargo-ament-build
39+
pip install git+https://github.com/colcon/colcon-cargo.git git+https://github.com/colcon/colcon-ros-cargo.git
40+
3241
mkdir -p workspace/src && cd workspace
3342
git clone https://github.com/ros2-rust/ros2_rust.git src/ros2_rust
34-
docker build -t ros2_rust_dev - < src/ros2_rust/Dockerfile
35-
docker run --rm -it --volume $(pwd):/workspace ros2_rust_dev /bin/bash
36-
# The following steps are executed in Docker
3743
vcs import src < src/ros2_rust/ros2_rust_foxy.repos
38-
tmux
44+
. /opt/ros/foxy/setup.sh
3945
colcon build
4046
```
4147

4248
Then, to run the minimal pub-sub example, do this:
4349

4450
```shell
45-
# In a new terminal (tmux window) inside Docker
51+
# In a new terminal (or tmux window)
4652
. ./install/setup.sh
4753
ros2 run rclrs_examples minimal_publisher
48-
# In a new terminal (tmux window) inside Docker
54+
# In a new terminal (or tmux window)
4955
. ./install/setup.sh
5056
ros2 run rclrs_examples minimal_subscriber
5157
```
52-
53-
For an actual guide, see the following documents:
54-
- [Building `ros2_rust` packages](docs/Building.md)
55-
- [Contributing to `ros2_rust`](docs/Contributing.md)
56-
57-
Let us know if you build something cool with `ros2_rust`!

docs/Building.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,27 @@ In this guide, the Foxy distribution of ROS 2 is used, but newer distributions c
77

88
## Environment setup
99

10-
Building `rclrs` requires a standard [ROS 2 installation](https://docs.ros.org/en/foxy/Installation.html), and a few Rust-specific extensions.
10+
Building `rclrs` requires a standard [ROS 2 installation](https://docs.ros.org/en/foxy/Installation.html), and a few extensions.
1111
These extensions are: `colcon-cargo`, `colcon-ros-cargo`, `cargo-ament-build`. The former two are `colcon` plugins, and the latter is a `cargo` plugin.
1212

13-
It is recommended to use the premade Docker image that contains all the necessary dependencies.
14-
If you do not want to use Docker, see the `Dockerfile` in the `ros2_rust` repo for how dependencies can be installed.
13+
The `libclang` library is also required for automatically generating FFI bindings with `bindgen`. See the [`bindgen` docs](https://rust-lang.github.io/rust-bindgen/requirements.html) on how to install it. As a side note, on Ubuntu the `clang` package is not required, only the `libclang-dev` package.
14+
15+
The `python3-vcstool` package is used in [importing auxiliary repositories](#importing-repositories). It can also be installed through `pip` instead of `apt`.
16+
17+
You can use the [premade Docker image](#using-the-docker-image) that contains all these dependencies.
18+
19+
Otherwise, to sum up, here is how you would install the dependencies on Ubuntu:
20+
21+
<!--- These steps should be kept in sync with README.md --->
22+
```shell
23+
# Install Rust, e.g. as described in https://rustup.rs/
24+
# Install ROS 2 as described in https://docs.ros.org/en/foxy/Installation.html
25+
# Assuming you installed the minimal version of ROS 2, you need these additional packages:
26+
sudo apt install -y git libclang-dev python3-pip python3-vcstool # libclang-dev is required by bindgen
27+
# Install these plugins for cargo and colcon:
28+
cargo install cargo-ament-build
29+
pip install git+https://github.com/colcon/colcon-cargo.git git+https://github.com/colcon/colcon-ros-cargo.git
30+
```
1531

1632

1733
### Choosing a workspace directory and cloning `ros2_rust`
@@ -28,7 +44,7 @@ mkdir src
2844
git clone https://github.com/ros2-rust/ros2_rust.git src/ros2_rust
2945
```
3046

31-
*Note: Once `rclrs` is published on crates.io, it's not technically needed anymore to clone the `ros2_rust` repo, and this section should be adapted to reflect that.*
47+
*Note: Once `rclrs` is published on crates.io, it's not technically needed anymore to clone the `ros2_rust` repo, and this section will be modified to reflect that.*
3248

3349
### Using the Docker image
3450

0 commit comments

Comments
 (0)