{"id":19927522,"url":"https://github.com/vexide/evian","last_synced_at":"2025-05-03T09:32:22.772Z","repository":{"id":197513362,"uuid":"676406274","full_name":"vexide/evian","owner":"vexide","description":"A controls library for vexide.","archived":false,"fork":false,"pushed_at":"2025-04-30T23:03:53.000Z","size":317,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-01T00:19:03.944Z","etag":null,"topics":["autonomous","controls","evian","robotics","rust","vex","vex-robotics","vex-v5"],"latest_commit_sha":null,"homepage":"https://evian.vexide.dev","language":"Rust","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/vexide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2023-08-09T06:08:40.000Z","updated_at":"2025-04-30T23:03:57.000Z","dependencies_parsed_at":"2023-10-11T06:54:56.856Z","dependency_job_id":"5b4d13be-8c73-4fea-acc4-7c324f91633a","html_url":"https://github.com/vexide/evian","commit_stats":null,"previous_names":["tropix126/vexnav","vexide/evian"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fevian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fevian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fevian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fevian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vexide","download_url":"https://codeload.github.com/vexide/evian/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251801763,"owners_count":21646080,"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":["autonomous","controls","evian","robotics","rust","vex","vex-robotics","vex-v5"],"created_at":"2024-11-12T22:33:50.667Z","updated_at":"2025-05-03T09:32:22.764Z","avatar_url":"https://github.com/vexide.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# /ˈeɪviɒn/\n\nA controls library for vexide.\n\nevian is a highly extensible library for controlling mobile robots using the [vexide robotics runtime].\n\n[vexide robotics runtime]: https://vexide.dev/\n\n# Philosophy\n\nMany libraries have been written for competitive robotics in the past. evian isn't the first, and *certainly* isn't the last of its kind. That being said, evian is an attempt to reconcile what we believe to be the best parts of these prior works into something that people can both learn from *and* enjoy using.\n\n## User Friendliness and Extensibility\n\nA common issue that many robotics libraries run into is the complexity that comes with making a library *extensible*. As more and more different robot configurations and features are supported, the user friendliness of such libraries is lost, which makes them much harder to approach and easily learn. Furthermore, libraries that aim to solve *literally everyone's problems* often end up becoming monolithic and impossible to maintain as a result.\n\nOn the opposite end, others have attempted to make libraries as easy to use as possible to the point that they intentionally limit the scope and correctness of their of their features to appeal to new users. While this does succeed in making things more approachable, people actually end up learning *less* in the process, because the highly simplified nature of these types of projects generally discourages any sort of further innovation beyond what \"just works already\". That's no fun.\n\nevian is a *desperate attempt* at a third option—something that people can both extend for their own purposes *and* something that is actually nice to use.\n\n## evian as a Framework\n\nevian is first and foremost built to be *extended*. It is designed in a manner that you can provide your own implementations of many \"building blocks\" while remaining compatible with evian's wider features. You can use your own sensors, your own odometry algorithms and motion control algorithms. You can even write your own drivetrain configuration around evian's [`Drivetrain`] type. The codebase is highly generic with support for this in mind.\n\n```rs\npub struct MyLocalization {}\n\nimpl TracksPosition for MyLocalization {\n    fn position(\u0026mut self) -\u003e Vec2\u003cf64\u003e {\n        // Custom position tracking logic!\n    }\n}\n\n// ...\n\nlet mut drivetrain = Drivetrain::new(\n    Differential::new(left_motors, right_motors),\n    MyLocalization {},\n);\n```\n\nIn short, you are free to use as much or as little of evian as possible, but in doing so you can make your code compatible with the wider ecosystem.\n\n## evian as a Library\n\nevian is of course useable as a general-purpose autonomous library. The [`motion`] module implements many of the commonplace motion control algorithms for autonomous control of your robot. evian makes heavy use of [async rust], as well builder-style modifiers for cleanly composing autonomous routines.\n\n[async rust]: https://vexide.dev/docs/async-introduction/\n\n```rs\nseeking.move_to_point(dt, (24.0, 24.0)) // Move to point (24, 24) on the field...\n    .reverse() // ...backwards\n    .with_angular_kp(0.4) // ...with different PID gains\n    .without_timeout() // ...with no timeout\n    .with_linear_output_limit(Motor::V5_MAX_VOLTAGE * 0.75) // ...at 75% of max speed.\n    .await; // do it!\n```\n\nIn addition, a standard wheeled tracking (odometry) implementation is provided by the [`WheeledTracking`] type in our [`tracking`] module.\n\nMotions in evian are a little \"flipped\" from what you might be used to in other libraries. Rather than calling motion-related methods on our drivetrain, we instead pass the drivetrain *to the motion*.\n\n```rs\nlet mut basic = Basic {\n    linear_controller: LINEAR_PID,\n    angular_controller: ANGULAR_PID,\n    linear_tolerances: LINEAR_TOLERANCES,\n    angular_tolerances: ANGULAR_TOLERANCES,\n    timeout: Some(Duration::from_secs(10)),\n};\n\n// Drive forwards.\nbasic.drive_distance(\u0026mut drivetrain, 24.0).await;\n```\n\nThis is done to allow for an extremely easy way to create custom motions. In fact, \"motions\" in evian are nothing more than simple `async` functions that mutably borrow your drivetrain for a period of time.\n\n```rs\n/// A motion algorithm for differential drivetrains.\n///\n/// Requires a tracking system that records robot position and robot heading (orientation).\npub async fn fly(\n    drivetrain: \u0026mut Drivetrain\u003cDifferential, impl TracksPosition + TracksHeading\u003e,\n) {\n    loop {\n        // ...\n\n        sleep(Duration::from_millis(5)).await;\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexide%2Fevian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvexide%2Fevian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexide%2Fevian/lists"}