{"id":37064738,"url":"https://github.com/jonysalgado/robot_soccer_python","last_synced_at":"2026-01-14T07:34:07.899Z","repository":{"id":57462477,"uuid":"257133845","full_name":"jonysalgado/robot_soccer_python","owner":"jonysalgado","description":"A robot soccer simulation 2D environment for python.","archived":false,"fork":false,"pushed_at":"2021-08-18T00:21:51.000Z","size":112,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T19:54:33.844Z","etag":null,"topics":["ai","environment","python","robot","simulation","soccer"],"latest_commit_sha":null,"homepage":"","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/jonysalgado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-20T00:44:52.000Z","updated_at":"2025-02-26T10:45:01.000Z","dependencies_parsed_at":"2022-09-12T14:22:17.585Z","dependency_job_id":null,"html_url":"https://github.com/jonysalgado/robot_soccer_python","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jonysalgado/robot_soccer_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonysalgado%2Frobot_soccer_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonysalgado%2Frobot_soccer_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonysalgado%2Frobot_soccer_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonysalgado%2Frobot_soccer_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonysalgado","download_url":"https://codeload.github.com/jonysalgado/robot_soccer_python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonysalgado%2Frobot_soccer_python/sbom","scorecard":{"id":532326,"data":{"date":"2025-08-11","repo":{"name":"github.com/jonysalgado/robot_soccer_python","commit":"c411109eff4f1e35c341c9210b9fc945424582a4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T06:00:07.425Z","repository_id":57462477,"created_at":"2025-08-20T06:00:07.425Z","updated_at":"2025-08-20T06:00:07.425Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","environment","python","robot","simulation","soccer"],"created_at":"2026-01-14T07:34:07.158Z","updated_at":"2026-01-14T07:34:07.885Z","avatar_url":"https://github.com/jonysalgado.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robot soccer Python\n\n![Version](https://img.shields.io/static/v1?label=Version\u0026message=1.0.7\u0026color=7159c1?style=for-the-badge)\n![Version](https://img.shields.io/static/v1?label=Dependence\u0026message=pygame\u0026color=red)\n\n![](https://user-images.githubusercontent.com/50979367/125829618-9f371d88-ff18-4107-8a0d-60ede54bb0e6.PNG)\n\n**robot_soccer_python** is a robot soccer simulation 2D environment for python. I create this project to study AI applied to robot. With this project, you will need only programming the robots' brain. Lets take a look bellow how to install and use this open-source project!\n\n## Installation\n\nTo install this project is very simple, you only need to write the command bellow in your prompt terminal:\n\n```bash\npip install robot_soccer_python\n```\n\nAnd that's it! Very simple, isn't it?\n\n## Usage\n\nTo use, I need to explain the classes and methods that you will need.\n\n#### Pose\n\nThis class is used to write a position on the environment. To import you have to write:\n```python\nfrom robot_soccer_python.agents Pose\n```\nAnd you have to pass the position x, y and rotation in the plane xy for this class, like ```Pose(x,y,rotation)```, remember, rotation is zero when the robot is turn to the positive sense of axis x and π in the negative sense.\n\n#### Player\n\nThis class is used to get and set all the information about the robots. To import this class and initialize a player you have to do:\n```python\nfrom robot_soccer_python.agents import Player\nplayer = Player(Pose(3, 3, 0), 2, 2, 0.2)\n```\n\nThe **first argument** is the initial position of the player, the **second** is maximum linear speed that this player will achieve, the **third** is the maximum angular speed and the **last parameter** is the radius of the robot (because the robots are circles and you can change the size).\n\n#### simulation2D\n\nThis class is the most important class that you will need. In this class you will configure the parameters of the simulation, like the list of players and you will get the information about the sensors of the robots. To configure the simulation, you have to do:\n```python\nfrom robot_soccer_python.simulation2D import simulation2D\nsimulation = simulation2D([\n    Player(Pose(3, 3, 0), 2, 2, 0.2),\n    Player(Pose(6, 3, 0), 2, 2, 0.2)],\n    shockable=True,\n    full_vision=False)\n```\nThe first argument is the list of players, the second is if you want that the robots can shock with each other (Like the Pauli exclusion principle \"two bodies cannot occupy the same space\") or if you don't want this physic principle. The last argument is if you want that the robots will see all in the environment, or if they will see only the the field and players in their field vision. To get the information about the sensors of all the players, you have to do:\n```python\nsimulation.get_sensors()\n```\n\n#### init_simulation\n\nTo pass the frames of the simulation you only need to call this class. Like demonstrad bellow:\n```python\nfrom robot_soccer_python.simulation2D import init_simulation\ninit_simulation(simulation)\n```\n\n# Example\n\nA example of a simple simulation is:\n```python\nfrom robot_soccer_python.simulation2D import simulation2D, init_simulation\nfrom robot_soccer_python.agents import Player, Pose\nimport time\n\nsimulation = simulation2D(\n    [Player(Pose(3, 3, 0), 2, 2, 0.2),\n    Player(Pose(6, 3, 0), 2, 2, 0.2)],\n    shockable=True,\n    full_vision=False)\n\nnow = time.time()\nnow2 = time.time()\ncommand1 = (0, 0)\ncommand2 = (0, 0)\nwhile True:\n    if time.time() - now \u003e 2:\n        command1 = (1 + command1[0], 1 + command1[1])\n        command2 = (1 + command2[0], - 1 + command2[1])\n        now = time.time()\n    if time.time() - now2 \u003c 3:\n        simulation.set_commands([command1, command2])\n    else:\n        simulation.set_commands([command2, command1])\n        if time.time() - now2 \u003e 5:\n            now2 = time.time()\n    init_simulation(simulation)\n    player_sensors = simulation.get_sensors()\n```\n\nJust copy and past after the installation and see what happen!\n\n# Sensors\n\nThere are 40 points in the soccer field in the contour and the robots can calculate the distance between they and those points, that is the sensors. They can calculate the distance beetween they and other players too, if they are in their field od vision, of course.\n\nI draw the line of vision of the robot to explain how they can see. Below I draw black lines for vision of points on the field and write line for vision of other robot. If the robot cannot see, the data will be infinite. \n\nOn the image bellow the red robot cannot see the yellow robot, so there aren't a write line and when you run ```simulation.get_sensors()``` the data for the other player's distance will be infinite.\n![](https://user-images.githubusercontent.com/50979367/125828076-6223c7e9-e41a-411b-9f0d-000c18aa7e79.PNG)\n\nBut on the image bellow the red robot can see the yellow robot and there are write line.\n![](https://user-images.githubusercontent.com/50979367/125828708-9c63c38e-7486-48ab-ad90-ae7c21c122d8.PNG)\n\n\n# Goal\n\nLike the real soccer, if the ball achieve the crossbar, the scoreboard will update and the robots and the ball will replace to the init position.\n\n# Did you have any problem?\n\nIf you get any problem, please contact me:\njonysalgadofilho@gmail.com\n\nIf you like to contribute, please do it! I will like so much, I did this project to help me to study AI and I think that can help you, as well.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonysalgado%2Frobot_soccer_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonysalgado%2Frobot_soccer_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonysalgado%2Frobot_soccer_python/lists"}