{"id":15416963,"url":"https://github.com/blueandi/zumohalwebots","last_synced_at":"2026-01-28T16:32:07.558Z","repository":{"id":240257382,"uuid":"802114143","full_name":"BlueAndi/ZumoHALWebots","owner":"BlueAndi","description":"Zumo C++ hardware abstraction layer for the Webots simulation.","archived":false,"fork":false,"pushed_at":"2024-11-08T15:59:20.000Z","size":363,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:43:35.683Z","etag":null,"topics":["webots","zumo","zumo-robot"],"latest_commit_sha":null,"homepage":"https://blueandi.github.io/ZumoHALWebots/","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/BlueAndi.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-05-17T14:53:48.000Z","updated_at":"2024-11-08T15:57:33.000Z","dependencies_parsed_at":"2024-05-17T16:32:17.866Z","dependency_job_id":"018f6a34-dbb3-433b-8cf2-5de0f4177ea3","html_url":"https://github.com/BlueAndi/ZumoHALWebots","commit_stats":{"total_commits":48,"total_committers":5,"mean_commits":9.6,"dds":"0.39583333333333337","last_synced_commit":"e063de1133ae2b398c575bd6b63f4db00fc9b113"},"previous_names":["blueandi/zumohalwebots"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2FZumoHALWebots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2FZumoHALWebots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2FZumoHALWebots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2FZumoHALWebots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueAndi","download_url":"https://codeload.github.com/BlueAndi/ZumoHALWebots/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249715499,"owners_count":21315055,"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":["webots","zumo","zumo-robot"],"created_at":"2024-10-01T17:14:18.729Z","updated_at":"2026-01-28T16:32:07.551Z","avatar_url":"https://github.com/BlueAndi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZumoHALWebots \u003c!-- omit in toc --\u003e\r\n\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)\r\n[![Repo Status](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\r\n[![Release](https://img.shields.io/github/release/BlueAndi/ZumoHALWebots.svg)](https://github.com/BlueAndi/ZumoHALWebots/releases)\r\n\r\nHardware abstraction layer for the Pololu Zumo robot (see \u003chttps://www.pololu.com/category/129/zumo-robots-and-accessories\u003e) in the Webots simulation.\r\n\r\n## Table of content \u003c!-- omit in toc --\u003e\r\n\r\n- [Architecture](#architecture)\r\n  - [The Principle](#the-principle)\r\n  - [Detail](#detail)\r\n- [How to integrate the library?](#how-to-integrate-the-library)\r\n  - [Example with recommended flow](#example-with-recommended-flow)\r\n- [Interface Description](#interface-description)\r\n- [Requirements to your application](#requirements-to-your-application)\r\n  - [General](#general)\r\n  - [Buttons](#buttons)\r\n  - [Buzzer](#buzzer)\r\n- [Used Libraries](#used-libraries)\r\n- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)\r\n- [License](#license)\r\n- [Contribution](#contribution)\r\n\r\n## Architecture\r\n\r\n### The Principle\r\n\r\n![Principle](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/ZumoHALWebots/master/doc/uml/Principle.plantuml)\r\n\r\n### Detail\r\n\r\n![HAL](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/ZumoHALWebots/master/doc/uml/HAL.plantuml)\r\n\r\nSee details of the Webots library classes in the [Webots reference manual](https://cyberbotics.com/doc/reference/nodes-and-api-functions).\r\n\r\n## How to integrate the library?\r\n\r\n1. Add it to the _platformio.ini_ in your environment to the _lib\\_deps_ section:\r\n\r\n    ```text\r\n    lib_deps =\r\n        BlueAndi/ZumoHALWebots @ ~1.6.0\r\n    ```\r\n\r\n2. Add the header include search directories to the build flags.\r\n\r\n    ```text\r\n    build_flags =\r\n        -I./lib/Webots/include/c\r\n        -I./lib/Webots/include/cpp\r\n        -D _USE_MATH_DEFINES\r\n    ```\r\n\r\n3. Add to your platformio environment the following scripts.\r\n\r\n    ```text\r\n    extra_scripts =\r\n        pre:$PROJECT_LIBDEPS_DIR/$PIOENV/ZumoHALWebots/scripts/create_webots_library.py\r\n        pre:$PROJECT_LIBDEPS_DIR/$PIOENV/ZumoHALWebots/scripts/copy_sounds.py\r\n        post:$PROJECT_LIBDEPS_DIR/$PIOENV/ZumoHALWebots/scripts/copy_webots_shared_libs.py\r\n    ```\r\n\r\n    - ```create_webots_library.py```: Generates the Webots library under the ```/lib``` folder, derived from your local Webots installation.\r\n    - ```copy_sounds.py```: Copies the sound files used for sound generation.\r\n    - ```copy_webots_shared_libs.py```: Copies the Webots shared libraries to the local platformio environment specific build folder ```.pio/build/\u003cenvironment\u003e``` as post-build step. They are required by the exectuable.\r\n4. Integrate the following main flow to your ```main.cpp```.\r\n    ![MainGenericFlow](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/ZumoHALWebots/master/doc/uml/MainGenericFlow.plantuml)\r\n5. Consider the [requirements to your application](#requirements-to-your-application).\r\n\r\n### Example with recommended flow\r\n\r\nSee [minimal example](./examples/example/).\r\n\r\n![ExampleMainFlow](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/ZumoHALWebots/master/doc/uml/ExampleMainFlow.plantuml)\r\n\r\n## Interface Description\r\n\r\nSee [interface description of latest version](https://blueandi.github.io/ZumoHALWebots/).\r\n\r\n## Requirements to your application\r\n\r\n### General\r\n\r\n- **REQ-1** The ```SimTime::step()``` shall be called for one single simulation time step.\r\n- **REQ-2** The ```SimTime::step()``` shall be called once before the ```Arduino::setup()``` is called.\r\n- **REQ-3** The ```SimTime::step()``` shall be called once before the ```Arduino::loop()``` is called periodically.\r\n- **REQ-4** The ```Keyboard::getPressedButtons()``` shall be called once before the ```Arduino::loop()``` is called periodically.\r\n- **REQ-7** The application functions, which are running in the ```Arduino::loop()``` shall not block (cooperative behaviour).\r\n\r\n### Buttons\r\n\r\n- **REQ-5** The application shall never wait in an loop until a button gets released or pressed.\r\n\r\n### Buzzer\r\n\r\n- **REQ-6** If the application waits until ```Buzzer::isPlaying()``` returns true, the application shall call ```Buzzer::process()``` and ```delay(1U)``` in the loop.\r\n  - **INFO**:\r\n    1. The sound is stopped by the ```Buzzer::process()```. Without stopping it, the ```Buzzer::isPlaying()``` will always return true.\r\n    2. The simulation time must be stepped forward, otherwise during ```Buzzer::process()``` the sound won't stop. The workaround is here to use a ```delay()``` which internally ticks the simulation time.\r\n\r\n## Used Libraries\r\n\r\n| Library                                                            | Description                                                      | License    |\r\n| ------------------------------------------------------------------ | ---------------------------------------------------------------- | ---------- |\r\n| [ArduinoNative](https://github.com/BlueAndi/ArduinoNative)         | The Arduino for native environment.                              | MIT        |\r\n| [ArduinoJson](https://github.com/bblanchon/ArduinoJson)            | JSON library for Arduino and embedded C++. Simple and efficient. | MIT        |\r\n| [Webots](https://github.com/cyberbotics/webots)                    | Webots physical simulation C++ API.                              | Apache 2.0 |\r\n| [ZumoHALInterfaces](https://github.com/BlueAndi/ZumoHALInterfaces) | The Zumo C++ HAL interfaces.                                     | MIT        |\r\n\r\n## Issues, Ideas And Bugs\r\n\r\nIf you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/ZumoHALWebots/issues) or if you are able and willing to fix it by yourself, clone the repository and create a pull request.\r\n\r\n## License\r\n\r\nThe whole source code is published under the [MIT license](http://choosealicense.com/licenses/mit/).\r\nConsider the different licenses of the used third party libraries too!\r\n\r\n## Contribution\r\n\r\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any\r\nadditional terms or conditions.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fzumohalwebots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueandi%2Fzumohalwebots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fzumohalwebots/lists"}