{"id":20278277,"url":"https://github.com/misprit7/foosbar","last_synced_at":"2025-04-06T20:13:39.180Z","repository":{"id":192311913,"uuid":"685404100","full_name":"misprit7/foosbar","owner":"misprit7","description":"Code to support my autonomous foosball playing robot","archived":false,"fork":false,"pushed_at":"2024-06-06T08:05:11.000Z","size":3687,"stargazers_count":343,"open_issues_count":2,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T18:11:12.475Z","etag":null,"topics":["foosball","qtm","qualisys","robotics","table-football","table-soccer"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=xrwXZXGiP1w","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/misprit7.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":"2023-08-31T06:42:15.000Z","updated_at":"2025-03-29T16:50:14.000Z","dependencies_parsed_at":"2023-09-04T04:45:21.882Z","dependency_job_id":"2e6a5bf1-9ed3-4dcd-9ffd-a3a62ea82a48","html_url":"https://github.com/misprit7/foosbar","commit_stats":null,"previous_names":["misprit7/foosball","misprit7/foosbar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misprit7%2Ffoosbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misprit7%2Ffoosbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misprit7%2Ffoosbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misprit7%2Ffoosbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misprit7","download_url":"https://codeload.github.com/misprit7/foosbar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543595,"owners_count":20955865,"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":["foosball","qtm","qualisys","robotics","table-football","table-soccer"],"created_at":"2024-11-14T13:22:42.252Z","updated_at":"2025-04-06T20:13:39.147Z","avatar_url":"https://github.com/misprit7.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cpicture\u003e\u003cimg src=\"./doc/img/logo-white.png\" height=\"350\"/\u003e\u003c/picture\u003e\n  \u003cbr /\u003e\n  Foosbar\n\u003c/h1\u003e\n\u003ch2 align=\"center\"\u003e\n  The (Unverifiably but Plausibly) World's Best Foosball Robot\n\u003c/h2\u003e\n\u003ch2 align=\"center\"\u003e\n  Video explanation: https://www.youtube.com/watch?v=xrwXZXGiP1w\n\u003c/h2\u003e\n\n# Pitch\n\nAs a very enthusiastic foosball player, I've sunk countless hours into the game. As a programmer though, something about the idea of practice is fundamentally misguided. Repeating the same task over and over, in the hopes of slightly improving your marginal efficiency of it? It sounds ripe for automation. \n\nSo I did that! Foosbar is a completely autonomous foosball table that is robotically controlled on one side of the table, while a human plays on the other. It is capable of defending, passing and taking shots. It has successfully mechanized all my joy out of the game, leaving me free to pursue [more important and deeply fulfilling things](https://github.com/misprit7/computerraria) with my life.\n\n\u003cdiv align=\"center\"\u003e\n\u003cpicture \u003e\u003cimg src=\"./doc/img/motors.jpg\" width=700/\u003e\u003c/picture\u003e\n\u003c/div\u003e\n\n# Setup\n\n## Components\n\nThere are 3 main components of the project that I've dubbed `software`, `firmware` and `frontend`. `software` is the main directory for the code directly controlling the motors. `frontend` is for the 3d webapp enabling control of the table through a remote game controller. `firmware` is obsolete but originally for the teensy 4.1 mounted on the electronics connected to an e-paper display to show score, in the end I got lazy and didn't fully implement this.\n\nGiven that these are all very specific to my setup I don't anticipate anyone actually running any of this, so it's mostly here as reference for someone attempting something similar. Still, if only for my own sake here are some high level build instructions.\n\n## `software`\n\nYou will need to build [uWebSockets](https://github.com/uNetworking/uWebSockets) and make it findable by cmake. Given that basically nobody as far as I can tell actually understands the arcane incantations required by cmake I'll tell you that I just ran `make \u0026\u0026 sudo cp ./uSockets/uSockets.a /usr/local/lib/libusockets.a` from inside the cloned directory. I'm sure that by saying so I'll get someone yelling at me that there's a more proper way though. You'll also need to install the [qualisys realtime sdk](https://github.com/qualisys/qualisys_cpp_sdk) in a similar way.\n\nOnce the requirements are installed, building is straightforward:\n\n```\ncd software\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n./foosbar\n```\n\n## `firmware`\n\nStandard pio project, just run\n```\ncd firmware\npio run -t upload\n```\n\n## `frontend`\n\nJust run\n```\ncd frontend\nnpx vite\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisprit7%2Ffoosbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisprit7%2Ffoosbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisprit7%2Ffoosbar/lists"}