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-14Lines changed: 9 additions & 14 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
-
```
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
-
```
95
+
REPOSITORY TAG IMAGE ID CREATED SIZE
96
+
my/ros app-multi-stage 66c8112b2fb6 4 seconds ago 775MB
97
+
my/ros app-single-stage 6b500239d0d6 2 minutes ago 797MB
100
98
101
99
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.
102
100
@@ -185,14 +183,13 @@ $ docker-compose rm
185
183
186
184
> Note: the auto-generated network, `ros_demos`, will persist until you explicitly remove it using `docker-compose down`.
187
185
188
-
189
186
### Securing ROS
190
187
191
188
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
189
193
190
> 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
201
205
-
206
-
```shell
202
+
```shell
207
203
# Configure ROS Security
208
204
ROS_SECURITY_NODE_DIRECTORY=/keystore
209
205
ROS_SECURITY_STRATEGY=Enforce
@@ -213,7 +209,6 @@ ROS_DOMAIN_ID=0
213
209
214
210
> Use a temporary container to run the keystore bootstrapping script in the keystore directory:
215
211
216
-
217
212
```console
218
213
$ docker run -it --rm \
219
214
--env-file ./config.env \
@@ -247,11 +242,11 @@ services:
247
242
248
243
> Now simply startup docker-compose as before:
249
244
250
-
```command
245
+
```console
251
246
$ docker-compose up
252
247
```
253
248
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/).
249
+
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