From 922dfed11b6b8d5467ad2b28866210080c1789cd Mon Sep 17 00:00:00 2001 From: jparisu Date: Wed, 18 Jan 2023 13:05:01 +0100 Subject: [PATCH 1/4] Add a Dockerfile and instructions on how to build it and how to use it Signed-off-by: jparisu --- docker/Dockerfile | 50 ++++++++++ docker/README.md | 86 ++++++++++++++++++ docker/__internal_info__.md | 23 +++++ docker/recorder.repos | 17 ++++ docker/resources/complete_configuration.yaml | 16 ++++ docker/resources/share_configuration.yaml | 17 ++++ docker/resources/simple_configuration.yaml | 7 ++ .../output_Europe_2023-01-18_11-14-50.mcap | Bin 0 -> 173 bytes 8 files changed, 216 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md create mode 100644 docker/__internal_info__.md create mode 100644 docker/recorder.repos create mode 100644 docker/resources/complete_configuration.yaml create mode 100644 docker/resources/share_configuration.yaml create mode 100644 docker/resources/simple_configuration.yaml create mode 100644 docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..4da2cea8e --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,50 @@ +######################################################################################### +# DDS Recorder Demos Dockerfile +######################################################################################### + +FROM ubuntu:jammy + +# Avoids using interactions during building +ENV DEBIAN_FRONTEND=noninteractive + +# Use a bash shell so it is possigle to run things like `source` (required for colcon builds) +SHELL ["/bin/bash", "-c"] + +# Avoid interactuation with installation of some package that needs the locale. +ENV TZ=Europe/Madrid +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +################################ +# Download system dependencies # +################################ +RUN apt update && \ + apt install -y cmake g++ pip wget git && \ + apt install -y libasio-dev libtinyxml2-dev && \ + apt install -y libssl-dev && \ + apt install -y libyaml-cpp-dev liblz4-dev libzstd-dev && \ + pip3 install -U colcon-common-extensions vcstool + +########################### +# Download eProsima repos # +########################### +# Download all dependencies for dds recorder (except the recorder) +RUN mkdir -p /home/recorder/src +COPY recorder.repos /home/recorder/recorder.repos +RUN cd /home/recorder && \ + vcs import src < recorder.repos +# Copy DDS Recorder private repo +COPY ddsrecorder /home/recorder/src + +######################## +# Build eProsima repos # +######################## +RUN cd /home/recorder && \ + colcon build --cmake-args "-DCOMPILE_EXAMPLES=ON" + +################# +# Add resources # +################# +COPY resources/ /home/configurations + +# Source built workspace +RUN echo "source /home/recorder/install/setup.bash" >> ~/.bashrc diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..63e852b68 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,86 @@ +# eProsima DDS Recorder docker Image + +This image is installed with a DDS Recorder Prototype that is able to run a `DDS Recorder` application +Fast DDS, DDS Recorder and all dependencies are already installed in the image. +In order to run the image use the following command. + +--- + +## DDS Recorder Tool + +This tool is a CLI tool with several arguments and configured by a `.yaml` file. +This tool subscribes to allowed DDS Topics and record the data received in a `.mcap` file. +The schemas to deserialize this data in FoxGlove are also written in the `.mcap` file in `.msg` ROS 2 format. +Those schemas are generated when the tool has access to the Type Object or Type Identifier of the Data Type used. + +### How to retrieve Data Type to the tool + +Fast DDS does not send the Data Type information by default, it must be configured to do so. +First of all, when generating the Types using Fast DDS Gen, it must be added the option `-typeobject` in order to generate the needed code to fill the TypeObject data. + +For native types (Data Types that does not rely in other Data Types) this is enough, as Fast DDS will send the TypeObject by default. +However, for more complex types, it is required to use `TypeInformation` mechanism. +In the Fast DDS `DomainParticipant` set the following QoS in order to send this information: + +```cpp +DomainParticipantQos pqos; +pqos.wire_protocol().builtin.typelookup_config.use_server = true; +``` + +--- + +## Run DDS Recorder + +There are some configurations already available in the container under directory `/home/configurations/` + +- `simple_configuration.yaml` Configuration with just the basics to run the executable. +- `complete_configuration.yaml` Configuration with all the possible configurations available. +- `share_configuration.yaml` Ccondifureonfiguration to store the result files in a shared volume directory. + +In order to execute the `DDS Recorder` use the following command: +> `ddsrecorder --config-path configurations/.yaml` + +In order to know all the possible arguments supported by this tool, use the command: +> `ddsrecorder --help` or `ddsrecorder -h` + +In order to see further information and debugging info about what the tool is executing, use the argument `--debug`: +> `ddsrecorder --config-path configurations/.yaml --debug` + +### Use Custom Configurations + +There are 2 ways to write a custom configuration: + +1. Using a text editor (e.g. nano) inside the container and modifying a `.yaml` file. +2. Using Docker volumes and adding a `.yaml` file inside a container when running it. + +### Run with shared volume + +In order to automatically retrieve every `.mcap` file generated inside the container, use a docker volume. +First, have a folder `share_volume` in your current workspace (if not in this workspace, add the absolute path in the docjer call). +Then run the following command: +> `docker run --rm --interactive -t --workdir /home --net=host --volume $(PWD)/share_volume/:/home/share_volume ddsrecorder:figure` + +Once inside the docker, using configuration `share_configuration` the `.mcap` result files will be stored in the `share_volume` directory inside the container, and thus they will be accessible from the host. + +Launch the `DDS Recorder` with the following command +> `ddsrecorder --config-path configurations/share_configuration.yaml` + +--- + +## Configuration + +This first version does support the following configurations: + +| | Description | Type | Default | +|---------------|-------------------------------------------------------------|----------------|-----------| +| allowlist | List of topics that are going to be recorded | List of topics | Empty | +| blocklist | List of topics that are **not** going to be recorded | List of topics | Empty | +| domain | DDS Domain to discover and subscribe to topics allowed | integer | 0 | +| extension | File extension for the result file | string | .mcap | +| filename | File name for the result file | string | MANDATORY | +| path | Path to result file | string | ./ | +| use-timestamp | Whether to add or not the timestamp to the result file name | bool | true | + +The topics in `allowlist` and `blocklist` are filled with elements with field `name` referring to the Topic name. +Optionally each element can have the element `type` referring to the Topic Data Type name. +Both name and allow wildcards (`*`). diff --git a/docker/__internal_info__.md b/docker/__internal_info__.md new file mode 100644 index 000000000..a8b7c86f5 --- /dev/null +++ b/docker/__internal_info__.md @@ -0,0 +1,23 @@ +# Instructions to build the Docker image + +## Branches + +- Fast DDS (``) + - Modify `recorder.repos` file + - IntrospectionExample + DynamicTypes fixes : `experimental/filthy/complex-dynamic-data` +- dev-utils + - Modify `recorder.repos` file + - Tree + File + TimeToString : `feature/time_to_string` +- DDS Recorder + - Checkout in `ddsrecorder` directory + - Requires access to private repository + - Tool : `feature/tool` + +## Commands + +Before building the Dockerfile, the DDS Recorder directory must be in directory `./ddsrecorder` + +```sh +# Build docker image +docker build --rm -t ddsrecorder:figure -f Dockerfile . +``` diff --git a/docker/recorder.repos b/docker/recorder.repos new file mode 100644 index 000000000..e508fd21c --- /dev/null +++ b/docker/recorder.repos @@ -0,0 +1,17 @@ +repositories: + foonathan_memory_vendor: + type: git + url: https://github.com/eProsima/foonathan_memory_vendor.git + version: master + fastcdr: + type: git + url: https://github.com/eProsima/Fast-CDR.git + version: master + fastdds: + type: git + url: https://github.com/eProsima/Fast-DDS.git + version: experimental/filthy/complex-dynamic-data + dev-utils: + type: git + url: https://github.com/eProsima/dev-utils.git + version: feature/time_to_string diff --git a/docker/resources/complete_configuration.yaml b/docker/resources/complete_configuration.yaml new file mode 100644 index 000000000..6756e9db5 --- /dev/null +++ b/docker/resources/complete_configuration.yaml @@ -0,0 +1,16 @@ + +# Allowed topics +allowlist: + - name: "*" # Allow all topics + +# Blocked topics +blocklist: + - name: "add_blocked_topics_list_here" + +# Simple Participant domain +domain: 0 + +# Recorder output file +extension: ".mcap" +filename: "output" +use-timestamp: true diff --git a/docker/resources/share_configuration.yaml b/docker/resources/share_configuration.yaml new file mode 100644 index 000000000..7b4dced55 --- /dev/null +++ b/docker/resources/share_configuration.yaml @@ -0,0 +1,17 @@ + +# Allowed topics +allowlist: + - name: "*" # Allow all topics + +# Blocked topics +blocklist: + - name: "add_blocked_topics_list_here" + +# Simple Participant domain +domain: 0 + +# Recorder output file +extension: ".mcap" +path: "/home/share_volume/" +filename: "output" +use-timestamp: true diff --git a/docker/resources/simple_configuration.yaml b/docker/resources/simple_configuration.yaml new file mode 100644 index 000000000..cdde4db7a --- /dev/null +++ b/docker/resources/simple_configuration.yaml @@ -0,0 +1,7 @@ + +# Simple Participant domain +domain: 0 + +# Recorder output file +filename: "output" +use-timestamp: false diff --git a/docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap b/docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap new file mode 100644 index 0000000000000000000000000000000000000000..753233db6d175fe4e8021348d36bde734cb4a2ad GIT binary patch literal 173 zcmeD5b#@Fe;N@bJWPkt`AXSuKY{Uzsb25{1lM@RR4D>AY4ERAZFu<(`W06Gj2||@~ Xn?o5enn?srAP>qHyyg3%6Y59+<8}={ literal 0 HcmV?d00001 From 7b53b9e2162b0c0c4e197032053a7abfee8f3385 Mon Sep 17 00:00:00 2001 From: jparisu Date: Mon, 23 Jan 2023 11:07:03 +0100 Subject: [PATCH 2/4] Fix docker issues Signed-off-by: jparisu --- .../recorder/RecorderWriter.cpp | 2 +- .../recorder/TypeObjectWriter.cpp | 3 +++ docker/README.md | 17 +++++++++++++---- docker/recorder.repos | 2 +- .../output_Europe_2023-01-18_11-14-50.mcap | Bin 173 -> 0 bytes 5 files changed, 18 insertions(+), 6 deletions(-) delete mode 100644 docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap diff --git a/ddsrecorder/src/cpp/writer/implementations/recorder/RecorderWriter.cpp b/ddsrecorder/src/cpp/writer/implementations/recorder/RecorderWriter.cpp index 1efd745de..056c6d934 100644 --- a/ddsrecorder/src/cpp/writer/implementations/recorder/RecorderWriter.cpp +++ b/ddsrecorder/src/cpp/writer/implementations/recorder/RecorderWriter.cpp @@ -54,7 +54,7 @@ utils::ReturnCode RecorderWriter::write_( } catch(const utils::Exception& e) { - logError( + logWarning( DDSRECORDER_RECORDER_WRITER, "Error storing data: <" << e.what() << ">.\nContinue recording..."); } diff --git a/ddsrecorder/src/cpp/writer/implementations/recorder/TypeObjectWriter.cpp b/ddsrecorder/src/cpp/writer/implementations/recorder/TypeObjectWriter.cpp index 28c23c5ff..15fe2cec5 100644 --- a/ddsrecorder/src/cpp/writer/implementations/recorder/TypeObjectWriter.cpp +++ b/ddsrecorder/src/cpp/writer/implementations/recorder/TypeObjectWriter.cpp @@ -61,6 +61,9 @@ utils::ReturnCode TypeObjectWriter::write_( // TODO: this will call multiple times to generate_type_object_schema unnecesary // Add this type object as a new schema mcap_handler_->add_schema(type_name, recorder::generate_dyn_type_schema(dyn_type)); + + logUser(DDSRECORDER_RECORDER_WRITER, + "Type Object " << type_name << " stored."); } catch(const utils::Exception& e) { diff --git a/docker/README.md b/docker/README.md index 63e852b68..f8b2dd376 100644 --- a/docker/README.md +++ b/docker/README.md @@ -56,15 +56,24 @@ There are 2 ways to write a custom configuration: ### Run with shared volume In order to automatically retrieve every `.mcap` file generated inside the container, use a docker volume. -First, have a folder `share_volume` in your current workspace (if not in this workspace, add the absolute path in the docjer call). +First, have a folder `share_volume` in your current workspace (if not in this workspace, add the absolute path in the docker call). Then run the following command: -> `docker run --rm --interactive -t --workdir /home --net=host --volume $(PWD)/share_volume/:/home/share_volume ddsrecorder:figure` - -Once inside the docker, using configuration `share_configuration` the `.mcap` result files will be stored in the `share_volume` directory inside the container, and thus they will be accessible from the host. +> `docker run --rm --interactive -t --workdir /home --net=host --ipc=host --privileged --volume $(pwd)/share_volume/:/home/share_volume ddsrecorder:figure` Launch the `DDS Recorder` with the following command > `ddsrecorder --config-path configurations/share_configuration.yaml` +### Connectivity issues + +- `--net=host` allow the DDS Recorder to connect with external (different device) participants. +- `--ipc=host` allow the DDS Recorder to use Shared Memory Transport with the participants in the same host. + +If local Participants (same host) are unable to connect with the DDS Recorder inside a Docker, it may be because they try to use Shared Memory, but the docker has no access to the same shared segment. +To avoid this, run the other participants as `root` or change the docker image user name to be the same as the external participants one. +Other option may be to not using Shared Memory by disabling it by Fast DDS configuration (by XML or QoS in code) or by CMake option when compiling `-DSHM_TRANSPORT_DEFAULT=ON`. + +Once inside the docker, using configuration `share_configuration` the `.mcap` result files will be stored in the `share_volume` directory inside the container, and thus they will be accessible from the host. + --- ## Configuration diff --git a/docker/recorder.repos b/docker/recorder.repos index e508fd21c..e41f983d2 100644 --- a/docker/recorder.repos +++ b/docker/recorder.repos @@ -14,4 +14,4 @@ repositories: dev-utils: type: git url: https://github.com/eProsima/dev-utils.git - version: feature/time_to_string + version: main diff --git a/docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap b/docker/share_volume/output_Europe_2023-01-18_11-14-50.mcap deleted file mode 100644 index 753233db6d175fe4e8021348d36bde734cb4a2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 173 zcmeD5b#@Fe;N@bJWPkt`AXSuKY{Uzsb25{1lM@RR4D>AY4ERAZFu<(`W06Gj2||@~ Xn?o5enn?srAP>qHyyg3%6Y59+<8}={ From 3c24cc8e4f2dea478c27d2f52dcaad9b974eb38c Mon Sep 17 00:00:00 2001 From: RaulSanchez Date: Tue, 24 Jan 2023 16:58:36 +0100 Subject: [PATCH 3/4] Update Dockerfile to download DDS Recorder repository Signed-off-by: RaulSanchez --- docker/Dockerfile | 60 +++++++++++--------- docker/README.md | 21 +++---- docker/__internal_info__.md | 15 +---- docker/ddsrecorder | 1 + docker/recorder.repos | 6 +- docker/resources/complete_configuration.yaml | 16 +++--- docker/resources/share_configuration.yaml | 17 ------ docker/resources/simple_configuration.yaml | 7 +-- 8 files changed, 63 insertions(+), 80 deletions(-) create mode 160000 docker/ddsrecorder delete mode 100644 docker/resources/share_configuration.yaml diff --git a/docker/Dockerfile b/docker/Dockerfile index 4da2cea8e..b02112245 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,37 +14,45 @@ SHELL ["/bin/bash", "-c"] ENV TZ=Europe/Madrid RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -################################ -# Download system dependencies # -################################ +# Download DDS Recorder dependencies RUN apt update && \ - apt install -y cmake g++ pip wget git && \ - apt install -y libasio-dev libtinyxml2-dev && \ - apt install -y libssl-dev && \ - apt install -y libyaml-cpp-dev liblz4-dev libzstd-dev && \ + apt install -y \ + cmake \ + g++ \ + pip \ + wget \ + git \ + libasio-dev \ + libtinyxml2-dev \ + libssl-dev \ + libyaml-cpp-dev \ + liblz4-dev \ + libzstd-dev && \ pip3 install -U colcon-common-extensions vcstool -########################### -# Download eProsima repos # -########################### -# Download all dependencies for dds recorder (except the recorder) -RUN mkdir -p /home/recorder/src -COPY recorder.repos /home/recorder/recorder.repos -RUN cd /home/recorder && \ +# Download eProsima dependencies +WORKDIR /ddsrecorder +RUN wget https://raw.githubusercontent.com/eProsima/DDS-Recorder/feature/docker/docker/recorder.repos && \ + mkdir src && \ vcs import src < recorder.repos -# Copy DDS Recorder private repo -COPY ddsrecorder /home/recorder/src -######################## -# Build eProsima repos # -######################## -RUN cd /home/recorder && \ - colcon build --cmake-args "-DCOMPILE_EXAMPLES=ON" +# Build DDS Recorder +RUN colcon build -################# -# Add resources # -################# -COPY resources/ /home/configurations +# Add DDS Recorder configuration files +COPY resources resources + +# Build TypeIntrospection example +WORKDIR /dyn_types_example +RUN cp -r /ddsrecorder/src/fastdds/examples/cpp/dds/TypeIntrospectionExample/* . && \ + source /ddsrecorder/install/setup.bash && \ + mkdir build && \ + cd build && \ + cmake .. && \ + make # Source built workspace -RUN echo "source /home/recorder/install/setup.bash" >> ~/.bashrc +RUN echo "source /ddsrecorder/install/setup.bash" >> ~/.bashrc + +# Restore working directory to default +WORKDIR / diff --git a/docker/README.md b/docker/README.md index f8b2dd376..a0bfe2231 100644 --- a/docker/README.md +++ b/docker/README.md @@ -16,7 +16,7 @@ Those schemas are generated when the tool has access to the Type Object or Type ### How to retrieve Data Type to the tool Fast DDS does not send the Data Type information by default, it must be configured to do so. -First of all, when generating the Types using Fast DDS Gen, it must be added the option `-typeobject` in order to generate the needed code to fill the TypeObject data. +First of all, when generating the Types using Fast DDS Gen, the option `-typeobject` must be added in order to generate the needed code to fill the TypeObject data. For native types (Data Types that does not rely in other Data Types) this is enough, as Fast DDS will send the TypeObject by default. However, for more complex types, it is required to use `TypeInformation` mechanism. @@ -31,37 +31,36 @@ pqos.wire_protocol().builtin.typelookup_config.use_server = true; ## Run DDS Recorder -There are some configurations already available in the container under directory `/home/configurations/` +There are some configurations already available in the container under directory `/ddsrecorder/resources/` - `simple_configuration.yaml` Configuration with just the basics to run the executable. - `complete_configuration.yaml` Configuration with all the possible configurations available. -- `share_configuration.yaml` Ccondifureonfiguration to store the result files in a shared volume directory. In order to execute the `DDS Recorder` use the following command: -> `ddsrecorder --config-path configurations/.yaml` +> `ddsrecorder --config-path resources/.yaml` In order to know all the possible arguments supported by this tool, use the command: > `ddsrecorder --help` or `ddsrecorder -h` In order to see further information and debugging info about what the tool is executing, use the argument `--debug`: -> `ddsrecorder --config-path configurations/.yaml --debug` +> `ddsrecorder --config-path resources/.yaml --debug` ### Use Custom Configurations There are 2 ways to write a custom configuration: -1. Using a text editor (e.g. nano) inside the container and modifying a `.yaml` file. -2. Using Docker volumes and adding a `.yaml` file inside a container when running it. +1. Modify a `.yaml` file within the container instance. +2. Using shared volumes to share the `.yaml` configuration file. ### Run with shared volume In order to automatically retrieve every `.mcap` file generated inside the container, use a docker volume. -First, have a folder `share_volume` in your current workspace (if not in this workspace, add the absolute path in the docker call). +First, have a folder `shared_volume` in your current workspace (if not in this workspace, add the absolute path in the docker call). Then run the following command: -> `docker run --rm --interactive -t --workdir /home --net=host --ipc=host --privileged --volume $(pwd)/share_volume/:/home/share_volume ddsrecorder:figure` +> `docker run -it --net=host --ipc=host --privileged --volume $(pwd)/shared_volume/:/shared_volume ddsrecorder:v0.1.0` Launch the `DDS Recorder` with the following command -> `ddsrecorder --config-path configurations/share_configuration.yaml` +> `ddsrecorder --config-path resources/share_configuration.yaml` ### Connectivity issues @@ -72,8 +71,6 @@ If local Participants (same host) are unable to connect with the DDS Recorder in To avoid this, run the other participants as `root` or change the docker image user name to be the same as the external participants one. Other option may be to not using Shared Memory by disabling it by Fast DDS configuration (by XML or QoS in code) or by CMake option when compiling `-DSHM_TRANSPORT_DEFAULT=ON`. -Once inside the docker, using configuration `share_configuration` the `.mcap` result files will be stored in the `share_volume` directory inside the container, and thus they will be accessible from the host. - --- ## Configuration diff --git a/docker/__internal_info__.md b/docker/__internal_info__.md index a8b7c86f5..dc3317150 100644 --- a/docker/__internal_info__.md +++ b/docker/__internal_info__.md @@ -2,21 +2,12 @@ ## Branches -- Fast DDS (``) - - Modify `recorder.repos` file - - IntrospectionExample + DynamicTypes fixes : `experimental/filthy/complex-dynamic-data` -- dev-utils - - Modify `recorder.repos` file - - Tree + File + TimeToString : `feature/time_to_string` -- DDS Recorder - - Checkout in `ddsrecorder` directory - - Requires access to private repository - - Tool : `feature/tool` +- Fast DDS: `bugfix/complex-dynamic-types` +- DDS Recorder: `prototype` ## Commands -Before building the Dockerfile, the DDS Recorder directory must be in directory `./ddsrecorder` - +build ```sh # Build docker image docker build --rm -t ddsrecorder:figure -f Dockerfile . diff --git a/docker/ddsrecorder b/docker/ddsrecorder new file mode 160000 index 000000000..e6519c976 --- /dev/null +++ b/docker/ddsrecorder @@ -0,0 +1 @@ +Subproject commit e6519c9762e8bb2a80f91b61d235f6dea3ad4684 diff --git a/docker/recorder.repos b/docker/recorder.repos index e41f983d2..c45dc9da9 100644 --- a/docker/recorder.repos +++ b/docker/recorder.repos @@ -10,8 +10,12 @@ repositories: fastdds: type: git url: https://github.com/eProsima/Fast-DDS.git - version: experimental/filthy/complex-dynamic-data + version: bugfix/complex-dynamic-types dev-utils: type: git url: https://github.com/eProsima/dev-utils.git version: main + ddsrecorder: + type: git + url: https://github.com/eProsima/DDS-Recorder.git + version: prototype diff --git a/docker/resources/complete_configuration.yaml b/docker/resources/complete_configuration.yaml index 6756e9db5..86576ba3a 100644 --- a/docker/resources/complete_configuration.yaml +++ b/docker/resources/complete_configuration.yaml @@ -1,16 +1,16 @@ - -# Allowed topics +# Allowed topics - Optional (Default: "*") allowlist: - - name: "*" # Allow all topics + - name: "*" -# Blocked topics +# Blocked topics - Optional (Default: empty) blocklist: - name: "add_blocked_topics_list_here" -# Simple Participant domain +# DDS Domain - Optional (Default: 0) domain: 0 # Recorder output file -extension: ".mcap" -filename: "output" -use-timestamp: true +extension: ".mcap" # Optional (Default: ".mcap") +path: "." # Optional (Default: ".") +filename: "output" # Required +use-timestamp: true # Optional (Default: true) diff --git a/docker/resources/share_configuration.yaml b/docker/resources/share_configuration.yaml deleted file mode 100644 index 7b4dced55..000000000 --- a/docker/resources/share_configuration.yaml +++ /dev/null @@ -1,17 +0,0 @@ - -# Allowed topics -allowlist: - - name: "*" # Allow all topics - -# Blocked topics -blocklist: - - name: "add_blocked_topics_list_here" - -# Simple Participant domain -domain: 0 - -# Recorder output file -extension: ".mcap" -path: "/home/share_volume/" -filename: "output" -use-timestamp: true diff --git a/docker/resources/simple_configuration.yaml b/docker/resources/simple_configuration.yaml index cdde4db7a..fd3c65fea 100644 --- a/docker/resources/simple_configuration.yaml +++ b/docker/resources/simple_configuration.yaml @@ -1,7 +1,6 @@ - -# Simple Participant domain +# DDS Domain - Optional (Default: 0) domain: 0 # Recorder output file -filename: "output" -use-timestamp: false +filename: "output" # Required +use-timestamp: false # Optional (Default: true) From 87308cacbfd91a1ca8de2b46646010ece5c49c2f Mon Sep 17 00:00:00 2001 From: RaulSanchez Date: Tue, 24 Jan 2023 18:23:02 +0100 Subject: [PATCH 4/4] Update README.md Signed-off-by: RaulSanchez --- docker/README.md | 22 ++++++++++++++-------- docker/ddsrecorder | 1 - 2 files changed, 14 insertions(+), 9 deletions(-) delete mode 160000 docker/ddsrecorder diff --git a/docker/README.md b/docker/README.md index a0bfe2231..915c9080b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -37,13 +37,19 @@ There are some configurations already available in the container under directory - `complete_configuration.yaml` Configuration with all the possible configurations available. In order to execute the `DDS Recorder` use the following command: -> `ddsrecorder --config-path resources/.yaml` +```bash +ddsrecorder --config-path /ddsrecorder/resources/.yaml +``` In order to know all the possible arguments supported by this tool, use the command: -> `ddsrecorder --help` or `ddsrecorder -h` +```bash +ddsrecorder --help` or `ddsrecorder -h +``` In order to see further information and debugging info about what the tool is executing, use the argument `--debug`: -> `ddsrecorder --config-path resources/.yaml --debug` +```bash +ddsrecorder --config-path /ddsrecorder/resources/.yaml --debug +``` ### Use Custom Configurations @@ -55,12 +61,12 @@ There are 2 ways to write a custom configuration: ### Run with shared volume In order to automatically retrieve every `.mcap` file generated inside the container, use a docker volume. -First, have a folder `shared_volume` in your current workspace (if not in this workspace, add the absolute path in the docker call). -Then run the following command: -> `docker run -it --net=host --ipc=host --privileged --volume $(pwd)/shared_volume/:/shared_volume ddsrecorder:v0.1.0` +Run the following command to share your local ` and container ``. + +```bash +docker run -it --net=host --ipc=host --privileged --volume $(pwd)//: ddsrecorder:v0.1.0 +``` -Launch the `DDS Recorder` with the following command -> `ddsrecorder --config-path resources/share_configuration.yaml` ### Connectivity issues diff --git a/docker/ddsrecorder b/docker/ddsrecorder deleted file mode 160000 index e6519c976..000000000 --- a/docker/ddsrecorder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e6519c9762e8bb2a80f91b61d235f6dea3ad4684