You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/building.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This is a more detailed guide on how to build ROS 2 packages written in Rust that expands on the minimal steps in the README.
4
4
5
-
In this guide, the Foxy distribution of ROS 2 is used, but newer distributions can be used by simply replacing 'foxy' with the distribution name everywhere.
5
+
In this guide, the Humble distribution of ROS 2 is used, but newer distributions can be used by simply replacing 'humble' with the distribution name everywhere.
6
6
7
7
8
8
## Choosing a workspace directory and cloning `ros2_rust`
Building `rclrs` requires a standard [ROS 2 installation](https://docs.ros.org/en/foxy/Installation.html), and a few extensions.
27
+
Building `rclrs` requires a standard [ROS 2 installation](https://docs.ros.org/en/humble/Installation.html), and a few extensions.
28
28
These extensions are: `colcon-cargo`, `colcon-ros-cargo`, `cargo-ament-build`. The first two are `colcon` plugins, and the third is a `cargo` plugin.
29
29
30
30
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.
@@ -41,7 +41,7 @@ The exact steps may differ between platforms, but as an example, here is how you
41
41
<!--- These steps should be kept in sync with README.md --->
42
42
```shell
43
43
# Install Rust, e.g. as described in https://rustup.rs/
44
-
# Install ROS 2 as described in https://docs.ros.org/en/foxy/Installation.html
44
+
# Install ROS 2 as described in https://docs.ros.org/en/humble/Installation.html
45
45
# Assuming you installed the minimal version of ROS 2, you need these additional packages:
46
46
sudo apt install -y git libclang-dev python3-pip python3-vcstool # libclang-dev is required by bindgen
47
47
# Install these plugins for cargo and colcon:
@@ -75,7 +75,7 @@ As you can see, this maps the workspace directory to `/workspace` inside the con
75
75
76
76
```shell
77
77
# Make sure to run this in the workspace directory
This uses the [`vcs` tool](https://github.com/dirk-thomas/vcstool), which is preinstalled in the Docker image.
@@ -87,13 +87,13 @@ The list of needed repositories should very rarely change, so you typically only
87
87
### Sourcing the ROS 2 installation
88
88
89
89
Before building, the ROS 2 installation, and ideally _only_ the ROS 2 installation, should be sourced.
90
-
Sourcing an installation populates a few environment variables such as `$AMENT_PREFIX_PATH`, so if you are not sure, you can check that the `$AMENT_PREFIX_PATH` environment variable contains the ROS 2 installation, e.g. `/opt/ros/foxy`.
90
+
Sourcing an installation populates a few environment variables such as `$AMENT_PREFIX_PATH`, so if you are not sure, you can check that the `$AMENT_PREFIX_PATH` environment variable contains the ROS 2 installation, e.g. `/opt/ros/humble`.
91
91
92
92
In the pre-made Docker image, sourcing is already done for you. Otherwise, if `$AMENT_PREFIX_PATH` is empty, you need to source the ROS 2 installation yourself:
93
93
94
94
```shell
95
-
# You can also do `source /opt/ros/foxy/setup.bash` in bash
96
-
. /opt/ros/foxy/setup.sh
95
+
# You can also do `source /opt/ros/humble/setup.bash` in bash
96
+
. /opt/ros/humble/setup.sh
97
97
````
98
98
99
99
If `$AMENT_PREFIX_PATH` contains undesired paths, exit and reopen your shell. If the problem persists, it's probably because of a sourcing command in your `~/.bashrc` or similar.
0 commit comments