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: ros/content.md
+9-12Lines changed: 9 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The Robot Operating System (ROS) is a set of software libraries and tools that h
10
10
11
11
## Creating a `Dockerfile` to install ROS packages
12
12
13
-
To create your own ROS docker images and install custom packages, here's a simple example of installing the C++ and Python client library demos using the official released Debian packages via apt-get.
13
+
To create your own ROS docker images and install custom packages, here's a simple example of installing the C++ and Python client library demos using the official released Debian packages via apt-get.
14
14
15
15
```dockerfile
16
16
FROM %%IMAGE%%:crystal
@@ -41,7 +41,7 @@ $ docker run -it --rm my/ros:app
41
41
42
42
## Creating a `Dockerfile` to build ROS packages
43
43
44
-
To create your own ROS docker images and build custom packages, here's a simple example of installing a package's build dependencies, compiling it from source, and installing the resulting build artifacts into a final multi-stage image layer.
44
+
To create your own ROS docker images and build custom packages, here's a simple example of installing a package's build dependencies, compiling it from source, and installing the resulting build artifacts into a final multi-stage image layer.
Note: `--from-paths` and `--packages-select` are set here as so to only install the dependencies and build for the `demo_nodes_cpp` package, one among many in the demo git repo that was cloned. To install the dependencies and build all the packages in the source workspace, merely change the scope by setting `--from-paths src/` and dropping the `--packages-select` arguments.
94
94
95
95
```
96
-
REPOSITORY TAG IMAGE ID CREATED SIZE
97
-
my/ros app-multi-stage 66c8112b2fb6 4 seconds ago 775MB
98
-
my/ros app-single-stage 6b500239d0d6 2 minutes ago 797MB
96
+
REPOSITORY TAG IMAGE ID CREATED SIZE
97
+
my/ros app-multi-stage 66c8112b2fb6 4 seconds ago 775MB
98
+
my/ros app-single-stage 6b500239d0d6 2 minutes ago 797MB
99
99
```
100
100
101
101
For this particular package, using a multi-stage build didn't shrink the final image by much, but for more complex applications, segmenting build setup from the runtime can help keep image sizes down. Additionally, doing so can also prepare you for releasing your package to the community, helping to reconcile dependency discrepancies you may have otherwise forgotten to declare in your `package.xml` manifest.
@@ -185,14 +185,13 @@ $ docker-compose rm
185
185
186
186
> Note: the auto-generated network, `ros_demos`, will persist until you explicitly remove it using `docker-compose down`.
187
187
188
-
189
188
### Securing ROS
190
189
191
190
Lets build upon the example above by adding authenticated encryption to the message transport. This is done by leveraging [Secure DDS](https://www.omg.org/spec/DDS-SECURITY). We'll use the same ROS docker image to bootstrap the PKI, CAs, and Digitally Signed files.
192
191
193
192
> Create a script at `~/ros_demos/keystore/bootstrap_keystore.bash` to bootstrap a keystore and add entries for each node:
> Create a enforcement file at `~/ros_demos/config.env` to configure ROS Security:
204
203
205
-
206
-
```shell
204
+
```shell
207
205
# Configure ROS Security
208
206
ROS_SECURITY_NODE_DIRECTORY=/keystore
209
207
ROS_SECURITY_STRATEGY=Enforce
@@ -213,7 +211,6 @@ ROS_DOMAIN_ID=0
213
211
214
212
> Use a temporary container to run the keystore bootstrapping script in the keystore directory:
215
213
216
-
217
214
```console
218
215
$ docker run -it --rm \
219
216
--env-file ./config.env \
@@ -247,11 +244,11 @@ services:
247
244
248
245
> Now simply startup docker-compose as before:
249
246
250
-
```command
247
+
```console
251
248
$ docker-compose up
252
249
```
253
250
254
-
Note: So far this has only added authenticated encryption, i.e. only participants with public certificates signed by a trusted CA may join the domain. To enable access control within the secure domain, i.e. restrict which and how topics may be used by participants, more such details can be found [here](https://github.com/ros2/sros2/).
251
+
Note: So far this has only added authenticated encryption, i.e. only participants with public certificates signed by a trusted CA may join the domain. To enable access control within the secure domain, i.e. restrict which and how topics may be used by participants, more such details can be found [here](https://github.com/ros2/sros2/).
0 commit comments