{"id":24407422,"url":"https://github.com/erio-harrison/ros2_basic","last_synced_at":"2025-04-12T00:53:36.791Z","repository":{"id":227403285,"uuid":"771340522","full_name":"Erio-Harrison/ros2_basic","owner":"Erio-Harrison","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-19T05:02:37.000Z","size":202,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T00:53:31.644Z","etag":null,"topics":["cpp","ros2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erio-Harrison.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-13T05:48:34.000Z","updated_at":"2024-12-17T11:01:50.000Z","dependencies_parsed_at":"2024-03-22T10:04:14.437Z","dependency_job_id":"becf40d8-fcae-4af9-9b90-c028412e0ca0","html_url":"https://github.com/Erio-Harrison/ros2_basic","commit_stats":null,"previous_names":["erio-harrison/ros2_basic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Fros2_basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Fros2_basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Fros2_basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erio-Harrison%2Fros2_basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erio-Harrison","download_url":"https://codeload.github.com/Erio-Harrison/ros2_basic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501882,"owners_count":21114682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","ros2"],"created_at":"2025-01-20T05:05:58.810Z","updated_at":"2025-04-12T00:53:36.769Z","avatar_url":"https://github.com/Erio-Harrison.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS2 Basic\n\nThe project I worked on recently will use ROS2, so I learned the basic usage. This is a project to demonstrate basic ROS2 functionality, including publisher and subscriber nodes\n\n## Table of contents\n\n- [Install](#Install)\n- [Use](#Use)\n- [Contribution](#Contribution)\n\n## Install\n\n[Tutotial Document](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html)\n\nI tried to install it using windows, and another friend tried to install it using mac, but we all encountered problems during the \"build\". Then I finally chose to install Ubuntu on a virtual machine, and then connected it using SSH in VScode for programming. And it is easier to install.\n\n## Use\n\n1. Clone repository: \n\n   ```bash\n   git clone https://github.com/Erio-Harrison/ros2_basic.git\n   ```\n\n   Then: \n\n   ```bash\n   cd ros2_basic\n   ```\n\n2. Install dependencies: \n\n   ```bash\n   rosdep install --from-paths src --ignore-src --rosdistro iron -y\n   ```\n\n   Here I installed the iron version. If use others, please replace \"iron\" with sepcific version name.\n\n3. Build the workspace using \"colcon\": \n\n   ```\n   colcon build\n   ```\n\n   If we wanna build specific folder, use: `colcon build --packages-select \u003cpackages-name\u003e`\n\n   For example: \n\n   ```bash\n   colon build --packages-select node_demo\n   ```\n\n4. In a new terminal session, type this to use the newly built package:\n\n   ```bash\n   source /opt/ros/iron/setup.bash\n   ```\n\n   ```bash\n   source install/setup.bash\n   ```\n\n   Please note that every time we open a new terminal, we need to run this command.\n\n   If you don't want to do so. another way is trying to edit `.bashrc` file:\n\n   **First** \n   \n   type \n\n   ```bash\n   nano ~/.bashrc\n   ```\n\n   in terminal\n\n   **Second**, Add the following lines at the end of the file:\n\n   ```bash\n   source /opt/ros/iron/setup.bash\n   ```\n\n   ```bash\n   source ~/Desktop/ros2_basic/install/setup.bash\n   ```\n\n   In order for these changes to take effect, you have two options:\n\n   **Effective immediately**: Run the following command in the current terminal to apply the changes immediately: `source ~/.bashrc`\n\n   **Reopen the terminal**: Close the current terminal and reopen a new terminal. Changes in `.bashrc` will be applied automatically.\n\n5. Run the sample programs in the project: `ros2 run \u003cyour_package_name\u003e \u003cyour_executable_name\u003e`\n\n   Example: \n\n   ```bash\n   ros2 run node_demo node_02\n   ```\n\n   Then we can see this:\n\n   ![node_demo02](./images/node_demo02.png)\n\n   Others can also be seen on images.\n\n## Contribution\n\nIf anyone wants to add examples based on this, please directly apply for PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferio-harrison%2Fros2_basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferio-harrison%2Fros2_basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferio-harrison%2Fros2_basic/lists"}