{"id":25948771,"url":"https://github.com/chinmay-esp/pub_microros_idf","last_synced_at":"2026-05-28T13:31:22.082Z","repository":{"id":279199955,"uuid":"938022179","full_name":"Chinmay-ESP/PUB_MicroRos_IDF","owner":"Chinmay-ESP","description":"Developed a Micro-ROS publisher on ESP32 using ESP-IDF, publishing a counter to `/count_pub` at 10 Hz. It integrates [micro_ros_espidf_component](https://github.com/micro-ROS/micro_ros_espidf_component.git) and a custom [urosHandler](https://github.com/gawar55/urosHandler.git), communicating with a Micro-ROS Agent for real-time ROS2 applications.","archived":false,"fork":false,"pushed_at":"2025-02-24T10:04:17.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T10:40:30.175Z","etag":null,"topics":["cpp","espidf","espidf-component","microros","ros2-humble"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chinmay-ESP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-24T09:49:42.000Z","updated_at":"2025-02-24T10:09:09.000Z","dependencies_parsed_at":"2025-02-24T10:50:41.706Z","dependency_job_id":null,"html_url":"https://github.com/Chinmay-ESP/PUB_MicroRos_IDF","commit_stats":null,"previous_names":["chinmay-esp/pub_microros_idf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chinmay-ESP%2FPUB_MicroRos_IDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chinmay-ESP%2FPUB_MicroRos_IDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chinmay-ESP%2FPUB_MicroRos_IDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chinmay-ESP%2FPUB_MicroRos_IDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chinmay-ESP","download_url":"https://codeload.github.com/Chinmay-ESP/PUB_MicroRos_IDF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241836958,"owners_count":20028282,"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","espidf","espidf-component","microros","ros2-humble"],"created_at":"2025-03-04T11:22:16.481Z","updated_at":"2026-05-28T13:31:22.050Z","avatar_url":"https://github.com/Chinmay-ESP.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Micro-ROS Publisher on ESP-IDF(ESP32)\n\nThis repository contains an implementation of a simple ROS2 Micro-ROS publisher using ESP32. The project publishes an integer counter to the `/count_pub` topic.\n\n## Project Structure\n\n- `sim_pub.hpp`: Header file defining the `simPub` class, which handles the ROS2 publisher.\n- `sim_pub.cpp`: Implementation of the `simPub` class, including initialization and timer callback function.\n- `main.cpp`: Entry point of the program, initializing the ROS2 Micro-ROS node and adding the publisher component.\n\n## Dependencies\n\nTo run this project, you need:\n- **ESP-IDF** with Micro-ROS support\n- **Micro-ROS Agent** running on a host system\n- **ROS2 (Humble or newer)** installed on the host\n- **Micro-ROS ESP32 Component**: [micro_ros_espidf_component](https://github.com/micro-ROS/micro_ros_espidf_component.git)\n- **Custom Micro Handler**: [urosHandler](https://github.com/gawar55/urosHandler.git)\n\n## Installation \u0026 Setup\n\n### 1. Clone the Repository\n```sh\ngit clone https://github.com/Chinmay-ESP/PUB_MicroRos_IDF.git\ncd PUB_MicroRos_IDF\n```\n\n### 2. Install ESP-IDF \u0026 Micro-ROS\nFollow the official [Micro-ROS on ESP32](https://micro.ros.org/docs/tutorials/core/first_application_esp32/) guide to set up ESP-IDF and Micro-ROS.\n\n### 3. Add Required Components\n```sh\ngit clone https://github.com/micro-ROS/micro_ros_espidf_component.git components/micro_ros_espidf_component\ngit clone https://github.com/gawar55/urosHandler.git components/urosHandler\n```\n\n### 4. Build \u0026 Flash the Code\n```sh\nidf.py set-target esp32\nidf.py build\nidf.py flash\n```\n\n### 5. Run the Micro-ROS Agent\nOn your host machine, start the Micro-ROS Agent:\n```sh\ndocker run -it --rm --ipc host --network host --privileged microros/micro-ros-agent:humble serial -b 115200 --dev /dev/ttyUSB0\n```\n\n## How It Works\n\n1. **`simPub` Class**:\n   - Creates a publisher on the `/count_pub` topic.\n   - Uses a timer callback to publish an increasing integer value.\n   - Publishes data at a frequency of **10 Hz**.\n\n2. **Main Execution (`app_main`)**:\n   - Initializes the `uros_master_node`.\n   - Registers the `simPub` publisher.\n\n## Expected Output\nOnce the ESP32 is running and the Micro-ROS Agent is active, you should see messages being published in ROS2:\n```sh\nros2 topic echo /count_pub\n```\nOutput:\n```\ndata: 0\ndata: 1\ndata: 2\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmay-esp%2Fpub_microros_idf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinmay-esp%2Fpub_microros_idf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmay-esp%2Fpub_microros_idf/lists"}