{"id":21181583,"url":"https://github.com/ifurusato/krzos","last_synced_at":"2025-12-29T09:00:19.968Z","repository":{"id":260378539,"uuid":"881131968","full_name":"ifurusato/krzos","owner":"ifurusato","description":"Operating System for the KRZ03 Robot","archived":false,"fork":false,"pushed_at":"2024-12-15T00:28:32.000Z","size":739,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T12:23:11.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/ifurusato.png","metadata":{"files":{"readme":"README.rst","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-10-31T00:52:34.000Z","updated_at":"2024-12-15T00:28:36.000Z","dependencies_parsed_at":"2024-10-31T01:29:21.101Z","dependency_job_id":"66640edc-fbcc-44c7-84cc-e74d4d3e46a0","html_url":"https://github.com/ifurusato/krzos","commit_stats":null,"previous_names":["ifurusato/krzos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifurusato%2Fkrzos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifurusato%2Fkrzos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifurusato%2Fkrzos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifurusato%2Fkrzos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifurusato","download_url":"https://codeload.github.com/ifurusato/krzos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243634758,"owners_count":20322822,"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":[],"created_at":"2024-11-20T17:51:26.010Z","updated_at":"2025-12-29T09:00:19.963Z","avatar_url":"https://github.com/ifurusato.png","language":"Python","readme":"*******************************************\nKRZOS: Operating System for the KRZ04 Robot\n*******************************************\n\n**KRZOS** provides the core functionality of the *KRZ04 Robot*, a Raspberry\nPi-based robot OS written in Python 3.\n\n* **Notice**\n    As of 2025-08-30 the KRZ03 project has been retired, with development\n    now focused on its successor, the KRZ04. The earlier repository was \n    previously named \"krzos\" but has been renamed \"krz03-os\", with the KRZ04\n    taking over the krzos repository name.\n\n.. figure:: https://service.robots.org.nz/wiki/attach/KRZ04/krz04-model.png\n   :width: 1200px\n   :align: center\n   :alt: A 3D model of the KRZ04 Robot\n\n   The 3D model of the KRZ04 Robot, used to plan the hardware build.\n\n|\n\nBackground\n**********\n\nThe *KRZOS* library provides essential support designed as the basis of a\n`Behaviour-Based Robot (BBR) \u003chttps://en.wikipedia.org/wiki/Behavior-based_robotics\u003e`_.\nThis library is relatively \"low-level\" and, in theory, could be used for any Python 3\nbased robot.\n\n\nFunctional Description\n**********************\n\nThe basic function is for sensors or other data sources to act as \"Publishers\" in a\n\"Publish-Subscribe\" model, firing messages onto an asynchronous message bus. Messages\ncontain an Event type and a data payload. Subscribers to the message bus can filter\nwhich event types they are interested in. The flow of messages are thus filtered\nby the Subscribers, who pass on to an Arbitrator messages they have consumed. Once all\nSubscribers have acknowledged a message it is passed to a Garbage Collector (a specialised\nSubscriber).\n\nSubscribers can themselves act upon received messages, though generally these types of\nreactions are typically reflected as direct outputs such as lighting and sound effects,\nor used to monitor sensor thresholds, which upon reaching may themselves publish messages\nto that effect, such as low battery warnings, or high-priority bumper events.\n\nThe robot's movement is not controlled by Subscribers but by higher-level Behaviours,\nwhich are all Subscribers and sometimes even Publishers. Some Behaviours are characterised\nas \"servo\", meaning they may execute continually (when active) and their effect on the\nrobot may be intermixed with other Behaviours. Some Behaviours are \"ballistic\", meaning\nthey take over the complete function of the robot during the duration of their activity,\nlike a human reflex action, a hand touching a hot stove.\n\nFor example, a Roam (servo) Behaviour may be running, with the robot moving freely across\nthe landscape. It subscribes to a DistanceSensorsPublisher which publishes proximity and\nbumper events, and also monitors a MotorControllerPublisher for motor change events. If\nRoam receives a message either indicating a bumper has been triggered or the motors have\nstopped (due to being too close to an obstacle), Roam is suppressed and an Avoid (ballistic)\nBehaviour is released. The robot will begin whatever the Avoid Behaviour entails, perhaps\nstopping, backing up while turning clockwise, then suppressing itself and releasing Roam\nto proceed again on a new trajectory.\n\n\nSoftware Features\n*****************\n\n* message and event handling\n* an asynchronous message bus that forms the basis of a `Subsumption Architecture \u003chttps://en.wikipedia.org/wiki/Subsumption_architecture\u003e`_ [#f1]_, with an \"exactly-once' message delivery guarantee\n* YAML-based configuration\n* timestamped, multi-level, colorised [#f2]_ logging\n* written in Python 3 (currently 3.11.2)\n\n.. [#f1] Uses finite state machines, an asynchronous message bus, an arbitrator and controller for task prioritisation.\n.. [#f2] Colorised console output tested only on Unix/Linux operating systems.\n\n\nHardware Features\n*****************\n\n.. figure:: https://service.robots.org.nz/wiki/attach/KRZ04/krz04-initial.jpg\n   :width: 1200px\n   :align: center\n   :alt: The KRZ04 Robot\n\n   The KRZ04 Robot on its first day.\n\nTBD.\n\n\nRequirements\n************\n\nThis library requires Python 3.8.5 or newer. It's currently being written using\nPython 3.11.2. Some portions (modules) of the KRZOS code will only run on a\nRaspberry Pi, though KRZOS Core should function independently of the various Pi\nlibraries.\n\nKRZOS requires installation of a number of dependencies (support libraries).\nThere is currently no dependency management set up for this project.\n\nFirst::\n\n  sudo apt install python3-pip\n\nthen:\n\n* sphinx:       https://www.sphinx-doc.org/en/master/index.html\n    with:         sudo apt-get install python3-sphinx\n     and:         sudo pip3 install sphinx_rtd_theme --break-system-packages\n* pytest:       https://docs.pytest.org/en/stable/getting-started.html\n    with:         sudo apt install python3-pytest\n* numpy:        https://numpy.org/\n    with:         sudo apt install python3-numpy\n* psutil:       https://pypi.org/project/psutil/\n    with:         sudo apt install python3-psutil\n* pyyaml:       https://pypi.org/project/PyYAML/\n    with:         sudo apt install python3-yaml\n* colorama:     https://pypi.org/project/colorama/\n    with:         sudo apt install python3-colorama\n* luma:         https://pypi.org/project/luma.core/\n    with:         sudo pip3 install luma.core --break-system-packages\n    (used only for the Monitor)\n* ina260:       https://pypi.org/project/ina260/\n    with:         sudo pip3 install ina260 --break-system-packages\n* ltr559:       https://pypi.org/project/ltr559/\n    with:         sudo pip3 install ltr559 --break-system-packages\n\nIf a Luxonis OAK-D Lite camera is attached, install:\n\n* depthai:      https://github.com/luxonis/depthai-python\n    with:         sudo pip3 install depthai --break-system-packages\n\nThe Radiozoa board contains eight VL53L0X sensors. This can be connected to the\ndefault I2C bus 1, or configured to operate on the alternate I2C bus 0 (which is\nthe configuration choice set in config.yaml).\n\nIn order to enable I2C bus 0 you must add the following to /boot/firmware/config.txt::\n\n    dtparam=i2c_vc=on\n\nThis line enables I2C bus 0, which by default uses GPIO 0 (SDA) and GPIO 1 (SCL).\nNote that if you are using any HAT with an EEPROM, such as a Raspberry Pi Sense HAT,\nI2C bus 0 is not available. But because this project uses a lot of GPIO pins required\nby the Sense HAT, they cannot be used together in any case.\n\nYou can likely also disable the cups.service, avahi-daemon and other services\nto free up resources:\n\n    #!/bin/bash\n    sudo systemctl disable avahi-daemon\n    sudo systemctl mask avahi-daemon\n    sudo systemctl disable cups.service\n    sudo systemctl mask cups.service\n    sudo systemctl disable triggerhappy.service\n    sudo systemctl mask triggerhappy.service\n    sudo systemctl disable ModemManager.service\n    sudo systemctl mask ModemManager.service\n\nStatus\n******\n\n* 2025-08-30: the KRZ03 project is retired, as development is now focused\n  on its successor, the KRZ04.\n\n* 2025-08-29: the shipment of parts from goBILDA arrives.\n\n* 2024-2025: the design begins as a 3D model in OnShape.\n\n\nSupport \u0026 Liability\n*******************\n\nThis project comes with no promise of support or acceptance of liability. Use at\nyour own risk.\n\n\nCopyright \u0026 License\n*******************\n\nAll contents (including software, documentation and images) Copyright 2020-2025\nby Murray Altheim. All rights reserved.\n\nSoftware and documentation are distributed under the MIT License, see LICENSE\nfile included with project.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifurusato%2Fkrzos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fifurusato%2Fkrzos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifurusato%2Fkrzos/lists"}