{"id":21130630,"url":"https://github.com/choate-robotics/maze_car","last_synced_at":"2026-05-20T03:36:18.964Z","repository":{"id":117935138,"uuid":"178946919","full_name":"Choate-Robotics/Maze_Car","owner":"Choate-Robotics","description":"An Autonomous Robotics Challenge","archived":false,"fork":false,"pushed_at":"2019-04-02T00:03:31.000Z","size":1387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T12:14:09.381Z","etag":null,"topics":["processing","robotics","simulation"],"latest_commit_sha":null,"homepage":null,"language":"Processing","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/Choate-Robotics.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-04-01T21:05:49.000Z","updated_at":"2019-04-02T20:00:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"d12787ac-0f5d-4e23-8c21-0a3178f9c85a","html_url":"https://github.com/Choate-Robotics/Maze_Car","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Choate-Robotics/Maze_Car","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FMaze_Car","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FMaze_Car/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FMaze_Car/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FMaze_Car/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Choate-Robotics","download_url":"https://codeload.github.com/Choate-Robotics/Maze_Car/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Choate-Robotics%2FMaze_Car/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33244783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T03:30:51.439Z","status":"ssl_error","status_checked_at":"2026-05-20T03:30:49.443Z","response_time":356,"last_error":"SSL_read: 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":["processing","robotics","simulation"],"created_at":"2024-11-20T05:35:51.544Z","updated_at":"2026-05-20T03:36:18.949Z","avatar_url":"https://github.com/Choate-Robotics.png","language":"Processing","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maze Car\n\nThe goal of this challenge is to create a drive system that \nwill allow the car to navigate the maze. Use the right or left hand rule \nidea of maze navigation [source](http://arcbotics.com/lessons/maze-solving-home-lessons/). \n\n![GIF of Robot Solving Maze](https://github.com/Choate-Robotics/Maze_Car/blob/master/Maze%20Solver.gif)\n\n### Hints about the DriveSystem\n\nDriveSystem is basically an abstract class that needs to be subclassed to create a strategy for how the car is to move. \n\nYou will want the robot to act differently at different times. To do this you will need some kind of *flag* variable that tells the robot which thing to do. You can set this up by making a class variable ```flag```. Here is an example of where the robot goes forward until it hits a wall and then goes backward.\n\n```\nclass MyDriveSystem extends DriveSystem{\n\n  int approach=0;\n  int svr, svl;\n\n  MyDriveSystem(Car myCar){\n    super(myCar);\n  }\n\n  void drive(){\n\n    svr=myCar.sensorValueRight;\n    svl=myCar.sensorValueLeft;\n\n    if (approach==0){\n      if (svl\u003e100 || svr\u003e100){\n        approach==1;\n      }\n      myCar.setLeftSpeed(20);\n      myCar.setRightSpeed(20);\n    }\n    else\n    {\n      myCar.setLeftSpeed(-20);\n      myCar.setRightSpeed(-20);\n    }\n\n\n\n  }\n}\n```\n\n\nThere is one main method, ```void drive()```. Below is a sample ```drive``` method. In this case we want to have the car move \nforward and then turn to the right, and then repeat those actions.\n\n```\nvoid drive() {\n    //override me.\n    if (noSense==0) {\n      if (approach==0) {\n        myCar.setLeftSpeed(30);\n        myCar.setRightSpeed(30);\n        approach=1;\n        setNoSense(40);        \n      } \n      else if (approach==1) {\n        myCar.setLeftSpeed(5);\n        myCar.setRightSpeed(-5);\n        setNoSense(30);\n        approach=0;\n      }\n    }\n    noSense--;\n  }\n```\n\nThe variable ```approach``` is a class variable that allows you to indicate which settings you would like to employ. \n\nThe ```setNoSense``` method is a way to create a delay before the drive function determines another action. Basically actions are only \ntaken when noSense is equal to 0.\n\nIn general you should use this template for your drive \n\n```\nclass MyDrive extends DriveSystem{\n  \n  MyDrive(Car mCar) {\n    super(mCar);\n  }\n  \n  void drive() {\n    //override me.\n    if (noSense==0) {\n      if (approach==0) {\n        // Put some stuff here for what to do first.\n        \n        // setNoSense to make it so that state continues for some period of time\n        setNoSense(40);        \n      } \n      else if (approach==1) {\n        // Put some stuff here for what to do at another time indicated by approach 0.\n        \n        // setNoSense to make it so that state continues for some period of time\n        setNoSense(30);\n        \n      }\n    }\n    noSense--;\n  }\n}\n```\n\n\n\n## API for the Car object\n\nCar has the following methods that may be useful:\n\n```Car(int x, int y, float theta)```\n\nThis constructor method allows you to place a car on the canvas pointing in the direction of ```angle```. The directions work \nwith 0 as directly up and move in in a clockwise manner.\n\n```void setLeftSpeed(int s)``` \n\nSet the speed of the left motor to an integer from 0 to 255. \n\n```void setRightSpeed(int s)``` \n\nSet the speed of the left motor to an integer from 0 to 255. \n\n```void LEDSense()```\n\nHave the readings of the left and right sensors loaded into ```sensorValueRight``` and ```sensorValueLeft```.\n\n```void show()``` \n\nDraw the car on the canvas.\n\n```void move()```\n\nCompute the new position of the car based on the motor settings.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoate-robotics%2Fmaze_car","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoate-robotics%2Fmaze_car","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoate-robotics%2Fmaze_car/lists"}