├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yaml │ ├── config.yml │ ├── documentation-report.yaml │ ├── error-report.yaml │ ├── feature-report.yaml │ └── help-question-report.yaml ├── labeler.yml ├── pull_request_template.md └── workflows │ ├── humble.yaml │ ├── humble_devel.yaml │ └── labeler.yml ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── dependencies.repos └── package.xml /.github/ISSUE_TEMPLATE/bug-report.yaml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Bug that does not affect normal operation 3 | type: BUG 🐞 4 | assignees: 5 | - Juancams 6 | body: 7 | - type: checkboxes 8 | id: pre-check 9 | attributes: 10 | label: Check this before filling out 11 | description: Please note that you have reviewed the following 12 | options: 13 | - label: "I have verified that this error has not been reported by another user." 14 | - label: "I have tried to perform the installation again, following the steps." 15 | - type: dropdown 16 | id: problem 17 | attributes: 18 | label: Problem location 19 | description: Where are you finding the problem or where are you launching the system? 20 | options: 21 | - Robot 22 | - My Computer 23 | default: 0 24 | validations: 25 | required: true 26 | - type: dropdown 27 | id: version 28 | attributes: 29 | label: ROS 2 Version 30 | description: What version of ros 2 are you using? 31 | options: 32 | - Foxy 🦊 33 | - Humble 🐢 34 | - Jazzy 🎺 35 | default: 0 36 | validations: 37 | required: true 38 | - type: checkboxes 39 | id: packages 40 | attributes: 41 | label: Package error 42 | description: Package where I think the error is located 43 | options: 44 | - label: go2_bringup 45 | - label: go2_description 46 | - label: go2_driver 47 | - label: go2_hardware 48 | - label: go2_interfaces 49 | - label: go2_navigation 50 | - label: go2_robot 51 | - label: go2_rviz 52 | - label: go2_simulation 53 | - label: go2_tts 54 | - label: go2_tts_interfaces 55 | - label: go2_voxel_map 56 | - label: unitree_api 57 | - label: unitree_go 58 | - type: textarea 59 | id: what-happened 60 | attributes: 61 | label: What happened? 62 | description: Also tell us, what did you expect to happen? 63 | placeholder: Tell us what you see! 64 | value: "A bug happened!" 65 | validations: 66 | required: true 67 | - type: textarea 68 | id: logs 69 | attributes: 70 | label: Relevant log output 71 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 72 | render: shell 73 | - type: textarea 74 | id: repro 75 | attributes: 76 | label: Reproduction steps 77 | description: "How do you trigger this bug? Please walk us through it step by step." 78 | value: | 79 | 1. 80 | 2. 81 | 3. 82 | ... 83 | render: bash 84 | validations: 85 | required: true 86 | - type: textarea 87 | id: proposal 88 | attributes: 89 | label: Do you propose any way to solve this? 90 | description: "Please indicate, if you know, how you would solve the bug. If not, leave it blank. Thank you very much!!" 91 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-report.yaml: -------------------------------------------------------------------------------- 1 | name: Documentation Report 2 | description: Errors or suggestions you have for the documentation 3 | type: DOCS 📚 4 | assignees: 5 | - Juancams 6 | body: 7 | - type: checkboxes 8 | id: pre-check 9 | attributes: 10 | label: Check this before filling out 11 | description: Please note that you have reviewed the following 12 | options: 13 | - label: "I have verified that this has not been reported by another user." 14 | - type: dropdown 15 | id: version 16 | attributes: 17 | label: Where? 18 | description: Where should I make the change, on the web or in the readme? 19 | options: 20 | - Web 🌐 21 | - README.md 📖 22 | default: 0 23 | validations: 24 | required: true 25 | - type: input 26 | id: section-locaion 27 | attributes: 28 | label: Section Location 29 | description: In which specific section should the change be made? 30 | - type: textarea 31 | id: error 32 | attributes: 33 | label: Tell us what you saw and your proposal 34 | validations: 35 | required: true 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/error-report.yaml: -------------------------------------------------------------------------------- 1 | name: Error Report 2 | description: Errors that prevent the robot from working 3 | type: ERROR 🛠️ 4 | assignees: 5 | - Juancams 6 | body: 7 | - type: checkboxes 8 | id: pre-check 9 | attributes: 10 | label: Check this before filling out 11 | description: Please note that you have reviewed the following 12 | options: 13 | - label: "I have verified that this error has not been reported by another user." 14 | - label: "I have tried to perform the installation again, following the steps." 15 | - label: "This error prevents the robot from operating under normal conditions." 16 | - type: dropdown 17 | id: problem 18 | attributes: 19 | label: Problem location 20 | description: Where are you finding the problem or where are you launching the system? 21 | options: 22 | - Robot 23 | - My Computer 24 | default: 0 25 | validations: 26 | required: true 27 | - type: dropdown 28 | id: version 29 | attributes: 30 | label: ROS 2 Version 31 | description: What version of ros 2 are you using? 32 | options: 33 | - Foxy 🦊 34 | - Humble 🐢 35 | - Jazzy 🎺 36 | default: 0 37 | validations: 38 | required: true 39 | - type: checkboxes 40 | id: packages 41 | attributes: 42 | label: Package error 43 | description: Package where I think the error is located 44 | options: 45 | - label: go2_bringup 46 | - label: go2_description 47 | - label: go2_driver 48 | - label: go2_hardware 49 | - label: go2_interfaces 50 | - label: go2_navigation 51 | - label: go2_robot 52 | - label: go2_rviz 53 | - label: go2_simulation 54 | - label: go2_tts 55 | - label: go2_tts_interfaces 56 | - label: go2_voxel_map 57 | - label: unitree_api 58 | - label: unitree_go 59 | - type: textarea 60 | id: what-happened 61 | attributes: 62 | label: What happened? 63 | description: Also tell us, what did you expect to happen? 64 | placeholder: Tell us what you see! 65 | value: "A bug happened!" 66 | validations: 67 | required: true 68 | - type: textarea 69 | id: logs 70 | attributes: 71 | label: Relevant log output 72 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 73 | render: shell 74 | - type: textarea 75 | id: repro 76 | attributes: 77 | label: Reproduction steps 78 | description: "How do you trigger this bug? Please walk us through it step by step." 79 | value: | 80 | 1. 81 | 2. 82 | 3. 83 | ... 84 | render: bash 85 | validations: 86 | required: true 87 | - type: textarea 88 | id: proposal 89 | attributes: 90 | label: Do you propose any way to solve this? 91 | description: "Please indicate, if you know, how you would solve the bug. If not, leave it blank. Thank you very much!!" 92 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-report.yaml: -------------------------------------------------------------------------------- 1 | name: New Feature 2 | description: Bug that does not affect normal operation 3 | type: FEATURE 🚀 4 | assignees: 5 | - Juancams 6 | body: 7 | - type: checkboxes 8 | id: pre-check 9 | attributes: 10 | label: Check this before filling out 11 | description: Please note that you have reviewed the following 12 | options: 13 | - label: "I have checked that the feature I propose is not proposed by someone else." 14 | - label: "I have checked that the feature I propose is not already implemented." 15 | - label: "I confirm that the feature is my own." 16 | - type: checkboxes 17 | id: version 18 | attributes: 19 | label: ROS 2 Version 20 | description: Indicate for which versions this feature is 21 | options: 22 | - label: Foxy 🦊 23 | - label: Humble 🐢 24 | - label: Jazzy 🎺 25 | - type: checkboxes 26 | id: packages 27 | attributes: 28 | label: Packages involved in the feature 29 | description: 30 | options: 31 | - label: go2_bringup 32 | - label: go2_description 33 | - label: go2_driver 34 | - label: go2_hardware 35 | - label: go2_interfaces 36 | - label: go2_navigation 37 | - label: go2_robot 38 | - label: go2_rviz 39 | - label: go2_simulation 40 | - label: go2_tts 41 | - label: go2_tts_interfaces 42 | - label: go2_voxel_map 43 | - label: unitree_api 44 | - label: unitree_go 45 | - label: new_package 46 | - type: input 47 | id: new-packages 48 | attributes: 49 | label: New packages involved 50 | description: Would it be necessary to create any new packages? Please specify the names of these 51 | - type: textarea 52 | id: new-feature 53 | attributes: 54 | label: New Feature 55 | description: Tell us all about the new feature 56 | validations: 57 | required: true 58 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/help-question-report.yaml: -------------------------------------------------------------------------------- 1 | name: Help / Question 2 | description: Any questions or if you need help 3 | type: HELP 🙋 4 | assignees: 5 | - Juancams 6 | body: 7 | - type: checkboxes 8 | id: pre-check 9 | attributes: 10 | label: Check this before filling out 11 | description: Please note that you have reviewed the following 12 | options: 13 | - label: "I have checked that this question has not been previously resolved." 14 | - type: textarea 15 | id: what-happened 16 | attributes: 17 | label: What is your question? What do you need help with? 18 | validations: 19 | required: true 20 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | go2_bringup: 2 | - '- \[x\] go2_bringup' 3 | go2_description: 4 | - '- \[x\] go2_description' 5 | go2_driver: 6 | - '- \[x\] go2_driver' 7 | go2_hardware: 8 | - '- \[x\] go2_hardware' 9 | go2_interfaces: 10 | - '- \[x\] go2_interfaces' 11 | go2_navigation: 12 | - '- \[x\] go2_navigation' 13 | go2_robot: 14 | - '- \[x\] go2_robot' 15 | go2_rviz: 16 | - '- \[x\] go2_rviz' 17 | go2_simulation: 18 | - '- \[x\] go2_simulation' 19 | go2_tts: 20 | - '- \[x\] go2_tts' 21 | go2_tts_interfaces: 22 | - '- \[x\] go2_tts_interfaces' 23 | go2_voxel_map: 24 | - '- \[x\] go2_voxel_map' 25 | unitree_api: 26 | - '- \[x\] unitree_api' 27 | unitree_go: 28 | - '- \[x\] unitree_go' 29 | 🦊 foxy 🦊: 30 | - 'Foxy 🦊' 31 | 🐢 humble 🐢: 32 | - 'Humble 🐢' 33 | 🎺 jazzy 🎺: 34 | - 'Jazyy 🎺' 35 | new_package: 36 | - '- \[x\] new_package' 37 | 🌐 web 🌐: 38 | - 'Web 🌐' 39 | 📖 README.md 📖: 40 | - 'README.md 📖' 41 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | Please explain the changes you made, including a reference to the related issue if applicable. 4 | 5 | ### Checklist 6 | - [ ] I have formatted the code to pass the CI. 7 | - [ ] Extend the documentation. 8 | - [ ] Extend the test. 9 | 10 | ### Screenshots / Images / Cideos 11 | Please add here all the media that shows the system in operation. 12 | 13 | ### People involved 14 | Please use @mentions to name people who have contributed to this PR. 15 | -------------------------------------------------------------------------------- /.github/workflows/humble.yaml: -------------------------------------------------------------------------------- 1 | name: humble 2 | 3 | on: 4 | push: 5 | branches: 6 | - humble 7 | 8 | jobs: 9 | ROS2: 10 | runs-on: ubuntu-22.04 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | 15 | - name: Install nlohmann 16 | run: sudo apt -y install nlohmann-json3-dev 17 | 18 | - name: Setup ROS 2 environment 19 | uses: ros-tooling/setup-ros@0.7.0 20 | with: 21 | ros-distro: humble 22 | 23 | - name: Build ROS 2 package 24 | uses: ros-tooling/action-ros-ci@v0.3 25 | with: 26 | package-name: go2_robot go2_description go2_bringup go2_driver unitree_api unitree_go go2_interfaces 27 | target-ros2-distro: humble 28 | vcs-repo-file-url: https://raw.githubusercontent.com/Unitree-Go2-Robot/go2_robot/refs/heads/humble/dependencies.repos 29 | colcon-defaults: | 30 | { 31 | "build": { 32 | "mixin": ["coverage-gcc"] 33 | } 34 | } 35 | colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml 36 | -------------------------------------------------------------------------------- /.github/workflows/humble_devel.yaml: -------------------------------------------------------------------------------- 1 | name: humble-devel 2 | 3 | on: 4 | push: 5 | branches: 6 | - humble-devel 7 | 8 | jobs: 9 | ROS2: 10 | runs-on: ubuntu-22.04 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | 15 | - name: Install nlohmann 16 | run: sudo apt -y install nlohmann-json3-dev 17 | 18 | - name: Setup ROS 2 environment 19 | uses: ros-tooling/setup-ros@0.7.0 20 | with: 21 | ros-distro: humble 22 | 23 | - name: Build ROS 2 package 24 | uses: ros-tooling/action-ros-ci@v0.3 25 | with: 26 | package-name: go2_robot go2_description go2_bringup go2_driver unitree_api unitree_go go2_interfaces 27 | target-ros2-distro: humble 28 | vcs-repo-file-url: https://raw.githubusercontent.com/Unitree-Go2-Robot/go2_robot/refs/heads/humble-devel/dependencies.repos 29 | colcon-defaults: | 30 | { 31 | "build": { 32 | "mixin": ["coverage-gcc"] 33 | } 34 | } 35 | colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Issue Labeler" 2 | on: 3 | issues: 4 | types: [opened, edited] 5 | 6 | permissions: 7 | issues: write 8 | contents: read 9 | 10 | jobs: 11 | triage: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: github/issue-labeler@v3.4 #May not be the latest version 15 | with: 16 | configuration-path: .github/labeler.yml 17 | enable-versioned-regex: 0 18 | repo-token: ${{ secrets.UNITREE_TOKEN }} 19 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(go2_robot) 3 | find_package(ament_cmake REQUIRED) 4 | ament_package() -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Any contribution that you make to this repository will 2 | be under the Apache 2 License, as dictated by that 3 | [license](http://www.apache.org/licenses/LICENSE-2.0.html): 4 | 5 | ~~~ 6 | 5. Submission of Contributions. Unless You explicitly state otherwise, 7 | any Contribution intentionally submitted for inclusion in the Work 8 | by You to the Licensor shall be under the terms and conditions of 9 | this License, without any additional terms or conditions. 10 | Notwithstanding the above, nothing herein shall supersede or modify 11 | the terms of any separate license agreement you may have executed 12 | with Licensor regarding such Contributions. 13 | ~~~ 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2025, Intelligent Robotics Labs 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unitree GO2 Robot ROS 2 2 | 3 |

4 | Holi 5 |

6 | 7 | [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 8 | ![distro](https://img.shields.io/badge/Ubuntu%2022-Jammy%20Jellyfish-green) 9 | ![distro](https://img.shields.io/badge/ROS2-Humble-blue) 10 | [![humble](https://github.com/IntelligentRoboticsLabs/go2_robot/actions/workflows/humble.yaml/badge.svg)](https://github.com/IntelligentRoboticsLabs/go2_robot/actions/workflows/humble.yaml) 11 | [![humble-devel](https://github.com/IntelligentRoboticsLabs/go2_robot/actions/workflows/humble_devel.yaml/badge.svg)](https://github.com/IntelligentRoboticsLabs/go2_robot/actions/workflows/humble_devel.yaml) 12 | 13 | In this package is our integration for the Unitee Go2 robot. 14 | 15 | ## Checklist 16 | 17 | - [x] robot description 18 | - [x] odom 19 | - [x] pointcloud 20 | - [x] joint_states 21 | - [x] Visualization in rviz 22 | - [x] cmd_vel 23 | - [x] go2_interfaces 24 | - [x] Change modes 25 | - [x] Change configuration for robot 26 | - [x] SLAM 27 | - [x] Nav2 28 | - [ ] Ros2cli (working in progress) 29 | - [ ] Hardware interface 30 | - [ ] Gazebo simulation 31 | 32 | ## Installation 33 | You need to have previously installed ROS2. Please follow this [guide](https://docs.ros.org/en/humble/Installation.html) if you don't have it. 34 | 35 | ```bash 36 | source /opt/ros/humble/setup.bash 37 | ``` 38 | 39 | Create workspace and clone the repository 40 | 41 | ```bash 42 | mkdir ~/go2_ws/src 43 | cd ~/go2_ws/src 44 | git clone https://github.com/Unitree-Go2-Robot/go2_robot.git -b humble 45 | ``` 46 | 47 | Prepare your thirparty repos: 48 | ```bash 49 | sudo apt update && sudo apt install ros-dev-tools -y 50 | vcs import < go2_robot/dependencies.repos 51 | ``` 52 | 53 | Install dependencies and build workspace 54 | ```bash 55 | cd ~/go2_ws 56 | sudo rosdep init 57 | rosdep update 58 | rosdep install --from-paths src --ignore-src -r -y 59 | colcon build --symlink-install 60 | ``` 61 | 62 | Setup the workspace 63 | ```bash 64 | source ~/ros2_ws/install/setup.bash 65 | ``` 66 | 67 | ## Sensor installation 68 | If you have purchased a hesai lidar 3d, or a realsense d435i, follow the following steps inside the robot. 69 | 70 | ### Hesai Lidar 71 | 72 | ```bash 73 | sudo apt-get install libboost-all-dev 74 | sudo apt-get install -y libyaml-cpp-dev 75 | git clone --recurse-submodules https://github.com/HesaiTechnology/HesaiLidar_ROS_2.0.git 76 | cd .. 77 | source /opt/ros/$ROS_DISTRO/setup.bash 78 | rosdep install --from-paths src --ignore-src -r -y 79 | colcon build --symlink-install 80 | source install/setup.bash 81 | ``` 82 | 83 | Set the lidar IP to `config/config.yaml` 84 | ```yaml 85 | lidar: 86 | - driver: 87 | udp_port: 2368 #UDP port of lidar 88 | ptc_port: 9347 #PTC port of lidar 89 | device_ip_address: #IP address of lidar 90 | pcap_path: "" #The path of pcap file (set during offline playback) 91 | correction_file_path: "" #LiDAR angle file, required for offline playback of pcap/packet rosbag 92 | firetimes_path: "" #The path of firetimes file 93 | source_type: 2 #The type of data source, 1: real-time lidar connection, 2: pcap, 3: packet rosbag 94 | pcap_play_synchronization: true #Pcap play rate synchronize with the host time 95 | x: 0 #Calibration parameter 96 | y: 0 #Calibration parameter 97 | z: 0 #Calibration parameter 98 | roll: 0 #Calibration parameter 99 | pitch: 0 #Calibration parameter 100 | yaw: 0 #Calibration parameter 101 | ros: 102 | ros_frame_id: hesai_lidar #Frame id of packet message and point cloud message 103 | ros_recv_packet_topic: /lidar_packets #Topic used to receive lidar packets from ROS 104 | ros_send_packet_topic: /lidar_packets #Topic used to send lidar packets through ROS 105 | ros_send_point_cloud_topic: /lidar_points #Topic used to send point cloud through ROS 106 | send_packet_ros: true #true: Send packets through ROS 107 | send_point_cloud_ros: true #true: Send point cloud through ROS 108 | ``` 109 | 110 | ### Realsense d435i 111 | 112 | ```bash 113 | sudo apt install ros-humble-realsense2-camera 114 | ``` 115 | 116 | ## Usage 117 | ### Bringup the robot 118 | Either from your computer, or from inside the robot, execute the following: 119 | ```bash 120 | ros2 launch go2_bringup go2.launch.py 121 | ``` 122 | > If you have a realsense and a lidar inside the robot, use the lidar or realsense parameters. 123 | > It will only work if you throw everything inside the robot 124 | 125 | If you want to see your robot through rviz, do it as follows: 126 | ```bash 127 | ros2 launch go2_bringup go2.launch.py rviz:=True 128 | ``` 129 | 130 | ### Change modes 131 | If what you want is for your robot to be able to change modes, thus performing the movements predefined by the controller, use the following service: 132 | ```bash 133 | ros2 service call /mode go2_interfaces/srv/Mode "mode: 'hello'" 134 | ``` 135 | 136 |
137 | Available modes 138 | ``` 139 | damp 140 | balance_stand 141 | stop_move 142 | stand_up 143 | stand_down 144 | sit 145 | rise_sit 146 | hello 147 | stretch 148 | wallow 149 | scrape 150 | front_flip 151 | front_jump 152 | front_pounce 153 | dance1 154 | dance2 155 | finger_heart 156 | ``` 157 |
158 | 159 | ### Change configurations for robot 160 | If you want, you can modify the ways the robot walks, the height of the base, the height of the legs when walking... I show you the different parameters that can be modified: 161 | 162 | - BodyHeight: Set the relative height of the body above the ground when standing and walking. [0.3 ~ 0.5] 163 | ```bash 164 | ros2 service call /body_height go2_interfaces/srv/BodyHeight "height: 0.0" 165 | ``` 166 | - ContinuousGait: Continuous movement 167 | ```bash 168 | ros2 service call /continuous_gait go2_interfaces/srv/ContinuousGait "flag: false" 169 | ``` 170 | - Euler: Posture when standing and walking. [-0.75 ~ 0.75] [-0.75 ~ 0.75] [-1.5 ~ 1.5] 171 | ```bash 172 | ros2 service call /euler go2_interfaces/srv/Euler "roll: 0.0 pitch: 0.0 yaw: 0.0" 173 | ``` 174 | - FootRaiseHeight: Set the relative height of foot lift during movement [-0.06 ~ 0.03] 175 | ```bash 176 | ros2 service call /foot_raise_height go2_interfaces/srv/FootRaiseHeight "height: 0.0" 177 | ``` 178 | - Pose: Set true to pose and false to restore 179 | ```bash 180 | ros2 service call /pose go2_interfaces/srv/Pose "flag: false" 181 | ``` 182 | - SpeedLevel: Set the speed range [-1 ~ 1] 183 | ```bash 184 | ros2 service call /speed_level go2_interfaces/srv/SpeedLevel "level: 0" 185 | ``` 186 | - SwitchGait: Switch gait [0 - 4] 187 | ```bash 188 | ros2 service call /switch_gait go2_interfaces/srv/SwitchGait "d: 0" 189 | ``` 190 | - SwitchJoystick: Native remote control response switch 191 | ```bash 192 | ros2 service call /switch_joystick go2_interfaces/srv/SwitchJoystick "flag: false" 193 | ``` 194 | 195 | ## SLAM 196 | In the future, work in progress. 197 | 198 | ## NAVIGATION 199 | In the future, work in progress. 200 | 201 | ## Demos 202 | ### Robot description 203 | 204 | [go2_tf.webm](https://github.com/IntelligentRoboticsLabs/go2_robot/assets/44479765/b019e6fc-875f-4870-a510-afa6e1353e08) 205 | 206 | ### Robot PointCloud 207 | 208 | https://github.com/IntelligentRoboticsLabs/go2_robot/assets/44479765/c164840a-6857-4d95-a50e-023c5bb44edb 209 | 210 | ## Acknowledgment 211 | Thanks to [unitree](https://github.com/unitreerobotics/unitree_ros2) for providing the support and communication interfaces with the robot. 212 | 213 | ## About 214 | This is a project made by the [Intelligent Robotics Lab](https://intelligentroboticslab.gsyc.urjc.es/), a research group from the [Universidad Rey Juan Carlos](https://www.urjc.es/). 215 | Copyright © 2025. 216 | 217 | Maintainers: 218 | 219 | * [Juan Carlos Manzanares Serrano](https://github.com/Juancams) 220 | * [Juan S. Cely](https://github.com/juanscelyg) 221 | 222 | ## License 223 | 224 | This project is licensed under the Apache License, Version 2 - see the [LICENSE](https://github.com/Unitree-Go2-Robot/go2_robot/blob/humble/LICENSE) file for details. 225 | -------------------------------------------------------------------------------- /dependencies.repos: -------------------------------------------------------------------------------- 1 | repositories: 2 | go2_bringup: 3 | type: git 4 | url: https://github.com/Unitree-Go2-Robot/go2_bringup.git 5 | version: humble 6 | go2_description: 7 | type: git 8 | url: https://github.com/Unitree-Go2-Robot/go2_description.git 9 | version: humble 10 | go2_driver: 11 | type: git 12 | url: https://github.com/Unitree-Go2-Robot/go2_driver.git 13 | version: humble 14 | go2_interfaces: 15 | type: git 16 | url: https://github.com/Unitree-Go2-Robot/go2_interfaces.git 17 | version: humble 18 | go2_rviz: 19 | type: git 20 | url: https://github.com/Unitree-Go2-Robot/go2_rviz.git 21 | version: humble 22 | unitree_api: 23 | type: git 24 | url: https://github.com/Unitree-Go2-Robot/unitree_api.git 25 | version: main 26 | unitree_go: 27 | type: git 28 | url: https://github.com/Unitree-Go2-Robot/unitree_go.git 29 | version: main -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | go2_robot 4 | 1.0.0 5 | The unitree go2 robot package 6 | Juan Carlos Manzanares Serrano 7 | Apache License, Version 2.0 8 | 9 | ament_cmake 10 | 11 | go2_bringup 12 | go2_description 13 | go2_driver 14 | go2_interfaces 15 | go2_rviz 16 | unitree_api 17 | unitree_go 18 | 19 | 20 | ament_cmake 21 | 22 | --------------------------------------------------------------------------------