{"id":39805,"date":"2025-03-06T09:26:56","date_gmt":"2025-03-06T08:26:56","guid":{"rendered":"https:\/\/genesys-offenburg.de\/?post_type=smart-docs&#038;p=39805"},"modified":"2025-03-06T09:26:58","modified_gmt":"2025-03-06T08:26:58","slug":"ros-additional-tools","status":"publish","type":"smart-docs","link":"https:\/\/genesys-offenburg.de\/zh-hans\/support\/integrationsloesungen\/ros\/ros-additional-tools\/","title":{"rendered":"ROS &#8211; Additional Tools"},"content":{"rendered":"\n<p>Additional Tools can be found in the\u00a0<code>adma_tools<\/code>\u00a0folder and are separated based on their implementation language (<code>adma_tools_cpp<\/code>\/\u00a0<code>adma_tools_py<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ros2csv-converter\">ROS2CSV-Converter<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"371\" src=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1024x371.png\" alt=\"\" class=\"wp-image-39806\" srcset=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1024x371.png 1024w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-300x109.png 300w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-768x278.png 768w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-696x252.png 696w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1068x386.png 1068w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1320x478.png 1320w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image.png 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This tool subscribes to\u00a0<code>\/genesys\/adma\/data_scaled<\/code>\u00a0and\u00a0<code>\/genesys\/adma\/status<\/code>\u00a0and generates a CSV file for postprocessing. It can be used live or e.g. to convert a rosbag to CSV. The tool can be used by executing it in an additional terminal:<\/p>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">\n. ~ros2_ws\/install\/setup.bash\nros2 run adma_tools_py ros2csv<\/code><\/pre>\n<\/div>\n\n<script>\n    document.querySelectorAll('.button_copy').forEach(button => {\n        button.addEventListener('click', function() {\n            const code = this.parentElement.querySelector('pre code').innerText; \/\/ Selects the code inside <pre><code>\n           \n            navigator.clipboard.writeText(code).then(() => {\n                this.textContent = \"Copied!\";\n                setTimeout(() => this.textContent = \"Copy\", 2000);\n            }).catch(err => console.error(\"Copy failed\", err));\n        });\n    });\n<\/script>\n\n\n\n<p>This will create a\u00a0<code>recorded_data.csv<\/code>\u00a0in the destination where the\u00a0<code>ros2 run adma_tools_py ros2csv<\/code>\u00a0command is executed. The .csv file that gets created corresponds to the .gsda format specification of GeneSys. If an individual file naming needs to be used, the\u00a0<code>adma_tools_py\/adma_tools_py\/ros2csv_converter.py<\/code>\u00a0file can be adapted (self.filename = '').<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-bag2gsdb-converter\">BAG2GSDB-Converter<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"324\" src=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-1024x324.png\" alt=\"\" class=\"wp-image-39812\" srcset=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-1024x324.png 1024w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-300x95.png 300w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-768x243.png 768w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-696x220.png 696w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-1068x338.png 1068w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1-1320x417.png 1320w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-1.png 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This tool subscribes to the&nbsp;<code>\/genesys\/adma\/data_raw<\/code>&nbsp;topic and generates a&nbsp;<code>*.gsdb<\/code>. By remapping it is also possible to subscribe to the&nbsp;<code>\/genesys\/adma\/data_recorded<\/code>&nbsp;topic (e.g. if you already have recorded rosbags with the deprecated&nbsp;<code>data_recorded<\/code>&nbsp;topic).<\/p>\n\n\n\n<div class=\"wp-block-smartdocs-notice\"><div class=\"smartdocs-block-notice notice-info\"><p><strong>Note<\/strong>: For converting ROS bags from ADMA ROS2 driver versions &lt;= 2.1.3, the \"adma\/data_recorded\" topic has to be remapped to \"adma\/data_raw\".<\/p><\/div><\/div>\n\n\n\n<figure class=\"wp-block-table is-style-stripes support-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Pssoble Values<\/th><th>Description<\/th><th>Location<\/th><\/tr><\/thead><tbody><tr><td>rosbag_path<\/td><td>File location as String<\/td><td>Rosbag file to convert to GSDB<\/td><td>bag2gsdb.launch.py<\/td><\/tr><tr><td>replay_rate<\/td><td> Rate as Integer<\/td><td>Rate of data replay for increasing the replay speed<\/td><td>bag2gsdb.launch.py<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">. ~\/ros2_ws\/install\/setup.bash\nros2 launch adma_tools_cpp bag2gsdb.launch.py<\/code><\/pre>\n<\/div>\n\n<script>\n    document.querySelectorAll('.button_copy').forEach(button => {\n        button.addEventListener('click', function() {\n            const code = this.parentElement.querySelector('pre code').innerText; \/\/ Selects the code inside <pre><code>\n           \n            navigator.clipboard.writeText(code).then(() => {\n                this.textContent = \"Copied!\";\n                setTimeout(() => this.textContent = \"Copy\", 2000);\n            }).catch(err => console.error(\"Copy failed\", err));\n        });\n    });\n<\/script>\n\n\n\n<p>In the launch-file you have to define the path to the desired ros2 bag directory (the one where the&nbsp;<code>metadata.yaml<\/code>&nbsp;and&nbsp;<code>$FILE.db3<\/code>&nbsp;is located). The tool will create a&nbsp;<code>raw_data.gsdb<\/code>&nbsp;file inside the folder next to these files. The launchfile will start both,&nbsp;<code>ros2 bag play<\/code>&nbsp;and the&nbsp;<code>converter tool<\/code>&nbsp;and stops everything when the replay of the bagfile is finished. Additionally you can inject the&nbsp;<code>replay_rate<\/code>&nbsp;in the launchfile to speed-up the converting process.<\/p>\n\n\n\n<div class=\"wp-block-smartdocs-notice\"><div class=\"smartdocs-block-notice notice-info\"><p><strong>Note<\/strong>: Increasing the replay_rate depends on the computer performance. It might lead to data losses. Therefore at the end of every process a log is output that contains the amount of received messages. This value can be compared with the value that is defined in the\u00a0<code>metadata.yaml<\/code>\u00a0(<code>message_count<\/code>\u00a0entry at the\u00a0<code>\/genesys\/adma\/data_recorded<\/code>\u00a0\/\u00a0<code>\/genesys\/adma\/data_raw<\/code>\u00a0topic).<\/p><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-gsdb-replay\">GSDB Replay<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"291\" src=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-1024x291.png\" alt=\"\" class=\"wp-image-39818\" srcset=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-1024x291.png 1024w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-300x85.png 300w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-768x218.png 768w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-696x198.png 696w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-1068x303.png 1068w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2-1320x375.png 1320w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-2.png 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For reprocessing .gsdb files, the path to the desired .gsdb file has to be configured in the\u00a0<code>gsdb_replay_config.yaml<\/code>\u00a0at the parameter\u00a0<code>gsdb_file<\/code>. After that, the\u00a0<code>gsdb_replay.launch.py<\/code>\u00a0tool can be launched. The tool creates a .db3 file in the location where the tool was launched via terminal.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes support-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Possible values<\/th><th>Description<\/th><th>Location<\/th><\/tr><\/thead><tbody><tr><td>destination_ip<\/td><td>IP as String<\/td><td>Destination IP-address of replayed data stream<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>destination_port<\/td><td>Port as Integer<\/td><td>Destination Port of replayed data stream<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>use_performance_check<\/td><td>BOOL<\/td><td>Enables time measurement for the process of receiving the UDP data until they get published<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>protocol_version<\/td><td>Version as String<\/td><td>version of the ADMANet data stream that is contained in the GSDB file<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>frame_ids<\/td><td>BOOL<\/td><td>Define the ROS topic names<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>ip_address<\/td><td>IP as String<\/td><td>IP-address of the gsdb_server<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>port<\/td><td>Port as Integer<\/td><td>Port of the gsdb_server<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>frequency<\/td><td>Frequency as Integer<\/td><td>Data frequency<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>protocol_version<\/td><td>Version as String<\/td><td>version of the ADMANet data stream that is contained in the GSDB file<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>gsdb_file<\/td><td>File location as String<\/td><td>GSDB Source file to replay<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>log_gsdb<\/td><td>BOOL<\/td><td>Enable creating a new GSDB file<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><tr><td>record_rosbag<\/td><td>BOOL<\/td><td>Enable logging a rosbag file<\/td><td>gsdb_replay_config.yaml<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">. ~\/ros2_ws\/install\/setup.bash\nros2 launch adma_tools_cpp gsdb_replay.launch.py<\/code><\/pre>\n<\/div>\n\n<script>\n    document.querySelectorAll('.button_copy').forEach(button => {\n        button.addEventListener('click', function() {\n            const code = this.parentElement.querySelector('pre code').innerText; \/\/ Selects the code inside <pre><code>\n           \n            navigator.clipboard.writeText(code).then(() => {\n                this.textContent = \"Copied!\";\n                setTimeout(() => this.textContent = \"Copy\", 2000);\n            }).catch(err => console.error(\"Copy failed\", err));\n        });\n    });\n<\/script>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-gsda-replay\">GSDA Replay<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"314\" src=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-1024x314.png\" alt=\"\" class=\"wp-image-39824\" srcset=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-1024x314.png 1024w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-300x92.png 300w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-768x235.png 768w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-696x213.png 696w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-1068x327.png 1068w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3-1320x405.png 1320w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/03\/image-3.png 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For reprocessing .gsda files, the path to the desired .gsda file has to be configured in the&nbsp;<code>gsda_replay_config.yaml<\/code>&nbsp;at the parameter&nbsp;<code>gsda_file<\/code>. After that, the&nbsp;<code>gsda_replay.launch.py<\/code>&nbsp;tool can be launched. The tool creates a .db3 file in the location where the tool was launched via terminal.<\/p>\n\n\n\n<p>This tool was implemented for converting post processed data out of the ADMA PP software back to ROS2 data.<\/p>\n\n\n\n<figure class=\"wp-block-table support-table is-style-stripes\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Possible Values<\/th><th>Description<\/th><th>Location<\/th><\/tr><\/thead><tbody><tr><td>frequency<\/td><td>Frequency as integer<\/td><td>Data frequency<\/td><td>gsda_replay_config.yaml<\/td><\/tr><tr><td>gsda_file<\/td><td>String<\/td><td>GSDA Source file to replay<\/td><td>gsda_replay_config.yaml<\/td><\/tr><tr><td>recorded_topics<\/td><td>Strings of ROS topics<\/td><td>Desired topics<\/td><td>gsda_replay.launch.py<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">. ~\/ros2_ws\/install\/setup.bash\nros2 launch adma_tools_cpp gsda_replay.launch.py<\/code><\/pre>\n<\/div>\n\n<script>\n    document.querySelectorAll('.button_copy').forEach(button => {\n        button.addEventListener('click', function() {\n            const code = this.parentElement.querySelector('pre code').innerText; \/\/ Selects the code inside <pre><code>\n           \n            navigator.clipboard.writeText(code).then(() => {\n                this.textContent = \"Copied!\";\n                setTimeout(() => this.textContent = \"Copy\", 2000);\n            }).catch(err => console.error(\"Copy failed\", err));\n        });\n    });\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Additional Tools can be found in the\u00a0adma_tools\u00a0folder  [&hellip;]<\/p>\n","protected":false},"author":148,"featured_media":30267,"template":"","meta":{"_acf_changed":false,"_links_to":"","_links_to_type":0,"footnotes":""},"smartdocs_category":[812,890],"class_list":{"0":"post-39805","1":"smart-docs","2":"type-smart-docs","3":"status-publish","4":"has-post-thumbnail","6":"smartdocs_category-integrationsloesungen","7":"smartdocs_category-ros"},"acf":[],"_links":{"self":[{"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smart-docs\/39805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smart-docs"}],"about":[{"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/types\/smart-docs"}],"author":[{"embeddable":true,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/users\/148"}],"version-history":[{"count":3,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smart-docs\/39805\/revisions"}],"predecessor-version":[{"id":39828,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smart-docs\/39805\/revisions\/39828"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/media\/30267"}],"wp:attachment":[{"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/media?parent=39805"}],"wp:term":[{"taxonomy":"smartdocs_category","embeddable":true,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smartdocs_category?post=39805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}