{"id":38817,"date":"2025-01-31T08:40:10","date_gmt":"2025-01-31T07:40:10","guid":{"rendered":"https:\/\/genesys-offenburg.de\/?post_type=smart-docs&#038;p=38817"},"modified":"2025-07-18T09:22:59","modified_gmt":"2025-07-18T07:22:59","slug":"ros2-getting-started-with-the-adma","status":"publish","type":"smart-docs","link":"https:\/\/genesys-offenburg.de\/zh-hans\/support\/integrationsloesungen\/ros\/ros2-getting-started-with-the-adma\/","title":{"rendered":"ROS2 &#8211; Getting Started with the ADMA"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-installation\">Installation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-preconditions\">Preconditions<\/h3>\n\n\n\n<p>Before installing and using the ADMA ROS2 driver you have to install ROS2 on your system. Please refer to the relating documentation of the respective<a href=\"https:\/\/wiki.ros.org\/Distributions\" target=\"_blank\" rel=\"noreferrer noopener\"> ROS distribution<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-workspace-and-repository-for-ros2\">Workspace and Repository for ROS2<\/h3>\n\n\n\n<p>Create your ROS2 workspace and clone this repository. The name of your workspace can be chosen freely.<\/p>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">mkdir -p ~\/ros2_ws\/src\ncd ~\/ros2_ws\/src\ngit clone -b ros2_master https:\/\/github.com\/GeneSysElektronik\/adma_ros_driver.git<\/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<div style=\"height:29px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-smartdocs-notice\"><div class=\"smartdocs-block-notice notice-info\"><p><strong>Note<\/strong>: In the example we used the HTTPS Link, you can also use SSH. <\/p><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ros2-dependencies\">ROS2 Dependencies<\/h3>\n\n\n\n<p>Install all needed ROS dependencies. The warning \"ament_cmake_clange_format\" can be ignored.<\/p>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">cd ~\/ros2_ws\n# source ROS\n. \/opt\/ros\/$ROS_DISTRO\/setup.bash\n# initialize rosdep\nsudo rosdep init # only required if not already done for other projects on your system\n# update rosdep\nrosdep update\n# install dependencies\nrosdep install --from-paths src --ignore-src -y<\/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<div style=\"height:26px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-smartdocs-notice\"><div class=\"smartdocs-block-notice notice-info\"><p><strong>Note<\/strong>: If you want to avoid sourcing the ROS distribution manually in every terminal session, add the source command to your <code>.bashrc<\/code> file as follows.<\/p><\/div><\/div>\n\n\n\n<div style=\"height:21px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">#------------------------------------------------------------\n# Add ROS2 Humble\nsource \/opt\/ros\/$ROS_DISTRO\/setup.bash\n#------------------------------------------------------------\n<\/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<h3 class=\"wp-block-heading\" id=\"h-building-the-ros2-workspace\">Building the ROS2 Workspace<\/h3>\n\n\n\n<div class=\"container_code\">\n    <button class=\"button_copy\">Copy<\/button>\n    <pre><code id=\"code_block\">cd ~\/ros2_ws\n. \/opt\/ros\/$ROS_DISTRO\/setup.bash\ncolcon build --symlink-install<\/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<h3 class=\"wp-block-heading\" id=\"h-configuration-of-the-driver\">Configuration of the driver<\/h3>\n\n\n\n<p>Configure the ADMA and the ROS Driver accordingly (see <a href=\"https:\/\/genesys-offenburg.de\/support\/integrationsloesungen\/ros\/ros2-driver-configuration\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configuration Parameters<\/a>).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-starting-the-driver\">Starting the driver<\/h3>\n\n\n\n<p>After sourcing the driver you are able to start it. For adapting the driver configuration to your surrounding please refer to the article <a href=\"https:\/\/genesys-offenburg.de\/support\/uncategorized\/ros2-driver-configuration\/\" target=\"_blank\" rel=\"noreferrer noopener\">ROS2 - Configuration<\/a>.<\/p>\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_ros2_driver adma_driver.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<h3 class=\"wp-block-heading\" id=\"h-watch-ros2-live-data\">Watch ROS2 live data<\/h3>\n\n\n\n<p>When the driver is running it is possible to open up a second terminal and show the current data packet values of the ADMA data stream. <\/p>\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\n. \/opt\/ros\/$ROS_DISTRO\/setup.bash\nros2 topic list\nros2 topic echo \/genesys\/adma\/data_scaled<\/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-open-source-driver\">Open Source Driver<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>The ADMA ROS2 driver is open source, which means you have full access via <a href=\"https:\/\/github.com\/genesyselektronik\" target=\"_blank\" rel=\"noreferrer noopener\">Github<\/a>. We love the opportunity to work hand in hand with the customer, which is why we encourage you to use the \"Pull Request\" tool for bug fixes, feature options or changes in the driver.<\/p>\n\n\n\n<p>Additionally you can describe issues or feature wishes in the <a href=\"https:\/\/github.com\/GeneSysElektronik\/adma_ros_driver\/issues\" target=\"_blank\" rel=\"noreferrer noopener\">issues part<\/a> of the driver. This opens room for discussion and gives us the opportunity to optimize the ROS2 driver to your applications.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-1024x576.jpg\" alt=\"Shows a Laptop with multiple ROS2 terminals opened. \" class=\"wp-image-42455\" srcset=\"https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-1024x576.jpg 1024w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-300x169.jpg 300w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-768x432.jpg 768w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-1536x864.jpg 1536w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-696x392.jpg 696w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-1068x601.jpg 1068w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1-1320x743.jpg 1320w, https:\/\/genesys-offenburg.de\/wp-content\/uploads\/2025\/01\/ROS_v1.1.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-binary-raw-data\">Binary Raw data<\/h2>\n\n\n\n<p>The Driver automatically loggs the .gsdb format, a raw data GeneSys format. This is enabled by default and can be turned of in the launch file. The raw data file makes it possible to use the <a href=\"https:\/\/genesys-offenburg.de\/en\/adma-pp\/\" target=\"_blank\" rel=\"noreferrer noopener\">ADMA PP<\/a> (Post processing) software for fixing some configuration parameters in case of misuse and it enables the support workers to quickly analyze and validate measurement data in support cases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installation Preconditions Before installing and using  [&hellip;]<\/p>\n","protected":false},"author":148,"featured_media":30266,"template":"","meta":{"_acf_changed":false,"_links_to":"","_links_to_type":0,"footnotes":""},"smartdocs_category":[812,890],"class_list":{"0":"post-38817","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\/38817","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\/38817\/revisions"}],"predecessor-version":[{"id":42471,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smart-docs\/38817\/revisions\/42471"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/media\/30266"}],"wp:attachment":[{"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/media?parent=38817"}],"wp:term":[{"taxonomy":"smartdocs_category","embeddable":true,"href":"https:\/\/genesys-offenburg.de\/zh-hans\/wp-json\/wp\/v2\/smartdocs_category?post=38817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}