{"id":13757908,"url":"https://github.com/makerforgetech/modular-biped","last_synced_at":"2025-05-10T06:30:47.341Z","repository":{"id":40328041,"uuid":"189879727","full_name":"makerforgetech/modular-biped","owner":"makerforgetech","description":"An open source framework for creating a bipedal modular companion robot. ","archived":false,"fork":false,"pushed_at":"2025-04-27T15:43:09.000Z","size":71550,"stargazers_count":378,"open_issues_count":5,"forks_count":61,"subscribers_count":30,"default_branch":"main","last_synced_at":"2025-05-07T14:02:13.594Z","etag":null,"topics":["arduino","braillespeak","companion-bot","modular","opencv","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"https://www.instagram.com/dan.makes.things/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makerforgetech.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":"2019-06-02T18:14:08.000Z","updated_at":"2025-05-06T10:19:54.000Z","dependencies_parsed_at":"2023-01-21T04:18:26.335Z","dependency_job_id":"dd013d81-5e64-4c53-95bf-1aba81cc444a","html_url":"https://github.com/makerforgetech/modular-biped","commit_stats":null,"previous_names":["makerforgetech/modular-biped"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerforgetech%2Fmodular-biped","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerforgetech%2Fmodular-biped/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerforgetech%2Fmodular-biped/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerforgetech%2Fmodular-biped/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makerforgetech","download_url":"https://codeload.github.com/makerforgetech/modular-biped/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253376515,"owners_count":21898929,"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":["arduino","braillespeak","companion-bot","modular","opencv","python","raspberry-pi"],"created_at":"2024-08-03T12:00:52.984Z","updated_at":"2025-05-10T06:30:42.324Z","avatar_url":"https://github.com/makerforgetech.png","language":"Python","readme":"[![Companion Robot](https://circleci.com/gh/danic85/companion-robot.svg?style=shield)](https://app.circleci.com/pipelines/github/danic85/companion-robot)\n\n# Robotics Development Framework\nThis platform has been created to allow modular development and experimentation of robotics in python / C++ using the Raspberry Pi and Arduino.\n\n## Coral TPU Accelerator\n\nTo use the Googla Coral USB Accelerator, first flash the Pi SD card with the image found in the [AIY Maker Kit](https://aiyprojects.withgoogle.com/maker/)\n([Download as of 2022-08-05](https://github.com/google-coral/aiy-maker-kit-tools/releases/download/v20220518/aiy-maker-kit-2022-05-18.img.xz))\n\n(I attempted to install the required software from the coral [getting started guide](https://coral.ai/docs/accelerator/get-started#1-install-the-edge-tpu-runtime) but I was unable to get past an error relating to grpico \"GLIBC_2.29' not found\")\n\nAlternatively, set Config.vision.tech to `opencv` for the original (slower) facial recognition. I am not updating this anymore so you may find some integration issues.\n\n## Installation\n```\nchmod 777 install.sh\n./install.sh\n```\n\nDisable audio (see Neopixels section below)\n\n## Running\n```\n./startup.sh\n```\nTo execute manual control via keyboard:\n```\n./manual_startup.sh\n```\nTo execute startup including a preview of the video feed (not available via SSH):\n```\n./preview_startup.sh\n```\n\n###Testing\n```\npython3 -m pytest --cov=modules --cov-report term-missing\n```\n\n## Run on Startup\n\nExecute `sudo vim /etc/rc/local` and add the following lines before the `exit 0` statement:\n```\npython3 /home/archie/companion-robot/shutdown_pi.py\n/home/archie/companion-robot/startup.sh\n```\n\n### Auto shutdown\nGPIO 26 is wired to allow shutdown when brought to ground via a switch. \n\nThe script `shutdown_pi.py` manages this.\n\nGuide:\nhttps://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi\n\n## Features\n\n### Facial detection and tracking\nUsing the Raspberry Pi camera\n\n### Servo control\nControl of up to 9 servos via an arduino serial connection\n\n### Battery monitor\nBoth external and software integrated via the arduino serial connection\n\n### Buzzer\nA buzzer is connected to GPIO 27 to allow for tones to be played in absence of audio output (see Neopixel below).\nhttps://github.com/gumslone/raspi_buzzer_player.git\n\n### Motion Sensor\nAn RCWL-0516 microwave radar sensor is equipped on GPIO 13\n\n### Stereo MEMS Mics\nGPIO 18, 19 and 20 allow stereo MEMS microphones as audio input\n```\nMic 3V to Pi 3.3V\nMic GND to Pi GND\nMic SEL to Pi GND (this is used for channel selection, connect to either 3.3V or GND)\nMic BCLK to BCM 18 (pin 12)\nMic DOUT to BCM 20 (pin 38)\nMic LRCL to BCM 19 (pin 35)\n```\nhttps://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-test\n\n\n```\ncd ~\nsudo pip3 install --upgrade adafruit-python-shell\nwget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2smic.py\nsudo python3 i2smic.py\n```\n\n####Test\n`arecord -l`\n`arecord -D plughw:0 -c2 -r 48000 -f S32_LE -t wav -V stereo -v file_stereo.wav`\n\n_Note:_ See below for additional configuration to support voice recognition\n\n### Speech Recognition\nTrigger word for voice recognition (currently not used):\nhttps://snowboy.kitt.ai/\n\nSpeech recognition is enabled whenever a face is visible. \nEnsure that the `device_index` specified in `modules/speechinput.py` matches your microphone. \n\nSee `scripts/speech.py` to list input devices and test. See below for MEMS microphone configuration\n\n### MEMS Microphone configuration for speech recognition\n\nBy default the Adafruit I2S MEMS Microphone Breakout does not work with speech recognition. \n\nTo support voice recognition on the MEMS microphone(s) the following configuration changes are needed.\n\n`sudo apt-get install ladspa-sdk`\n\nCreate `/etc/asound.conf` with the following content:\n\n``` \npcm.pluglp {\n    type ladspa\n    slave.pcm \"plughw:0\"\n    path \"/usr/lib/ladspa\"\n    capture_plugins [\n   {   \n      label hpf\n      id 1042\n   }\n        {\n                label amp_mono\n                id 1048\n                input {\n                    controls [ 30 ]\n                }\n        }\n    ]\n}\n\npcm.lp {\n    type plug\n    slave.pcm pluglp\n}\n```\n\nThis enables the device 'lp' to be referenced in voice recognition. Shown with index `18` in the example below.\n\nSample rate should also be set to `16000`\n\n`mic = sr.Microphone(device_index=18, sample_rate=16000)`\n\nReferences: \n\n* [MEMS Microphone Installation Guide](https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-test)\n\n* [Adafruit Support discussing issue](https://forums.adafruit.com/viewtopic.php?f=50\u0026t=181675\u0026p=883853\u0026hilit=MEMS#p883853)\n\n* [Referenced documentation of fix](https://github.com/mpromonet/v4l2rtspserver/issues/94)\n\n### Serial communication with Arduino\n\nIn order to use the Raspberry Pi’s serial port, we need to disable getty (the program that displays login screen)\n\n`sudo raspi-config -\u003e  Interfacing Options -\u003e Serial -\u003e \"Would you like a login shell to be accessible over serial\" = 'No'. Restart`\n\n#### Connection via serial pins\nConnect the Pi GPIO 14 \u0026 15 (tx \u0026 rx) to the arduino tx \u0026 rx (tx -\u003e rx in both directions!) via a logic level shifter, as the Pi is 3v3 and the arduino is (most likely) 5v.\n\n####Upload to Arduino over serial pins\nTo upload over serial pins, press the reset button on the Arduino at the point that the IDE starts 'uploading' (after compile), otherwise a sync error will display.\n\n### Neopixel\n\nWS1820B support is included via the Pi GPIO pin 12. Unfortunately to support this you must disable audio on the Pi.\n\n```\nsudo vim /boot/config.txt\n#dtparam=audio=on\n```\n\nThis is also why the application must be executed with `sudo`\n\nhttps://learn.adafruit.com/neopixels-on-raspberry-pi/python-usage\n\n## PCBs\nPrefabricated PCBs are available for this project in the `circuits` folder. This allows the connection between the core components as described above.\n\n![Top](circuits/v2/Upper/Top%20Feb%202021_pcb.png)\n\n![Bottom](circuits/v2/Lower/Lower%20Feb%202021_pcb.png)\n","funding_links":[],"categories":["[Robots](#robots)"],"sub_categories":["[Open-Source Robots](#open-robots)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerforgetech%2Fmodular-biped","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerforgetech%2Fmodular-biped","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerforgetech%2Fmodular-biped/lists"}