From a776e895e8f2e23d57c8e47a23e70733c5178e99 Mon Sep 17 00:00:00 2001 From: Irene Bandera Date: Fri, 24 Nov 2023 11:07:27 +0100 Subject: [PATCH] Apply changes Signed-off-by: Irene Bandera --- ddsrecorder/src/cpp/tool/DdsRecorder.cpp | 18 +++++++++--------- ddsrecorder_participants/CMakeLists.txt | 1 - .../src/cpp/recorder/mcap/McapHandler.cpp | 4 +--- .../src/cpp/replayer/McapReaderParticipant.cpp | 4 ++-- ddsreplayer/src/cpp/tool/DdsReplayer.cpp | 2 -- docs/rst/notes/forthcoming_version.rst | 4 ++-- 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/ddsrecorder/src/cpp/tool/DdsRecorder.cpp b/ddsrecorder/src/cpp/tool/DdsRecorder.cpp index d135a97c8..63ba0aa1e 100644 --- a/ddsrecorder/src/cpp/tool/DdsRecorder.cpp +++ b/ddsrecorder/src/cpp/tool/DdsRecorder.cpp @@ -65,15 +65,15 @@ DdsRecorder::DdsRecorder( // Create MCAP Handler configuration participants::McapHandlerConfiguration handler_config( mcap_output_settings, - configuration.max_pending_samples, - configuration.buffer_size, - configuration.event_window, - configuration.cleanup_period, - configuration.log_publish_time, - configuration.only_with_type, - configuration.mcap_writer_options, - configuration.record_types, - configuration.ros2_types); + configuration_.max_pending_samples, + configuration_.buffer_size, + configuration_.event_window, + configuration_.cleanup_period, + configuration_.log_publish_time, + configuration_.only_with_type, + configuration_.mcap_writer_options, + configuration_.record_types, + configuration_.ros2_types); // Create MCAP Handler mcap_handler_ = std::make_shared( diff --git a/ddsrecorder_participants/CMakeLists.txt b/ddsrecorder_participants/CMakeLists.txt index 59e7972e8..035b6ed38 100644 --- a/ddsrecorder_participants/CMakeLists.txt +++ b/ddsrecorder_participants/CMakeLists.txt @@ -25,7 +25,6 @@ enable_language(CXX) ############################################################################### # Package cmake_utils is required to get every cmake macro needed find_package(cmake_utils REQUIRED) -find_package(cpp_utils REQUIRED) ############################################################################### # Project diff --git a/ddsrecorder_participants/src/cpp/recorder/mcap/McapHandler.cpp b/ddsrecorder_participants/src/cpp/recorder/mcap/McapHandler.cpp index 0d6b0bf3b..29337ea26 100644 --- a/ddsrecorder_participants/src/cpp/recorder/mcap/McapHandler.cpp +++ b/ddsrecorder_participants/src/cpp/recorder/mcap/McapHandler.cpp @@ -861,11 +861,9 @@ mcap::ChannelId McapHandler::create_channel_id_nts_( // Create new channel mcap::KeyValueMap metadata = {}; metadata[QOS_SERIALIZATION_QOS] = serialize_qos_(topic.topic_qos); - metadata[ROS2_TYPES] = - configuration_.ros2_types ? topic.m_topic_name.rfind("rt/", - 0) == 0 ? "true" : "false" : "false"; std::string topic_name = configuration_.ros2_types ? utils::demangle_if_ros_topic(topic.m_topic_name) : topic.m_topic_name; + metadata[ROS2_TYPES] = topic_name.compare(topic.m_topic_name) == 0 ? "true" : "false"; mcap::Channel new_channel(topic_name, "cdr", schema_id, metadata); mcap_writer_.addChannel(new_channel); auto channel_id = new_channel.id; diff --git a/ddsrecorder_participants/src/cpp/replayer/McapReaderParticipant.cpp b/ddsrecorder_participants/src/cpp/replayer/McapReaderParticipant.cpp index 6704f2175..02643e03b 100644 --- a/ddsrecorder_participants/src/cpp/replayer/McapReaderParticipant.cpp +++ b/ddsrecorder_participants/src/cpp/replayer/McapReaderParticipant.cpp @@ -20,10 +20,10 @@ #include #include +#include #include #include #include -#include #include #include @@ -31,8 +31,8 @@ #include #include -#include #include +#include namespace eprosima { namespace ddsrecorder { diff --git a/ddsreplayer/src/cpp/tool/DdsReplayer.cpp b/ddsreplayer/src/cpp/tool/DdsReplayer.cpp index 7c1f11cc9..7f917dd9b 100644 --- a/ddsreplayer/src/cpp/tool/DdsReplayer.cpp +++ b/ddsreplayer/src/cpp/tool/DdsReplayer.cpp @@ -352,8 +352,6 @@ void DdsReplayer::create_dynamic_writer_( "Failed to create " << topic->type_name << " DynamicType, aborting dynamic writer creation..."); return; } - logWarning(DDSREPLAYER_REPLAYER, - "Succesfully create " << topic->type_name << " DynamicType..."); fastdds::dds::TypeSupport type(new fastrtps::types::DynamicPubSubType(dyn_type)); diff --git a/docs/rst/notes/forthcoming_version.rst b/docs/rst/notes/forthcoming_version.rst index 9f4cd0f10..d8916290e 100644 --- a/docs/rst/notes/forthcoming_version.rst +++ b/docs/rst/notes/forthcoming_version.rst @@ -28,11 +28,11 @@ Next release will include the following **DDS Recorder tool configuration featur * New configuration options (``timestamp-format`` and ``local-timestamp``) available for :ref:`output file ` settings. * New configuration option (``topics``) to configure the :ref:`Manual Topics `. * Rename ``max-reception-rate`` to ``max-rx-rate``. -* Record information in either ROS 2 format or the raw DDS format (see :ref:`Topic Type Format `). +* Record data in either ROS 2 format or the raw DDS format (see :ref:`Topic Type Format `). Next release will include the following **DDS Replayer tool configuration features**: * New configuration option (``topics``) to configure the :ref:`Manual Topics `. * New configuration option (``max-tx-rate``) to configure the :ref:`Max transmission rate `. * Remove the support for `Built-in Topics `_. -* Replay information in either ROS 2 format or the raw DDS format. +* Read data in either ROS 2 format or the raw DDS format.