mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-20 09:12:05 +08:00
219 lines
12 KiB
HTML
219 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html class="writer-html5" lang="en" >
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><link rel="canonical" href="https://docs.comma.ai/CONTRIBUTING/" />
|
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
|
<title>How to contribute - openpilot docs</title>
|
|
<link rel="stylesheet" href="../css/theme.css" />
|
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
|
|
<link href="../css/tooltip.css" rel="stylesheet" />
|
|
|
|
<script>
|
|
// Current page data
|
|
var mkdocs_page_name = "How to contribute";
|
|
var mkdocs_page_input_path = "CONTRIBUTING.md";
|
|
var mkdocs_page_url = "/CONTRIBUTING/";
|
|
</script>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="../js/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
|
|
<script>hljs.highlightAll();</script>
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
<a href=".." class="icon icon-home"> openpilot docs
|
|
</a><div role="search">
|
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|
<p class="caption"><span class="caption-text">Getting Started</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../getting-started/what-is-openpilot/">What is openpilot?</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">How-to</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../how-to/turn-the-speed-blue/">Turn the speed blue</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../how-to/connect-to-comma/">Connect to a comma 3X</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Concepts</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../concepts/logs/">Logs</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../concepts/safety/">Safety</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../concepts/glossary/">Glossary</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Car Porting</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../car-porting/what-is-a-car-port/">What is a car port?</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../car-porting/brand-port/">Porting a car brand</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../car-porting/model-port/">Porting a car model</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Contributing</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../contributing/roadmap/">Roadmap</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md">Contributing Guide →</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Links</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="" href="https://blog.comma.ai">Blog →</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://comma.ai/bounties">Bounties →</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://github.com/commaai">GitHub →</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://discord.comma.ai">Discord →</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="" href="https://x.com/comma_ai">X →</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="..">openpilot docs</a>
|
|
|
|
</nav>
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href=".." class="icon icon-home" aria-label="Docs"></a></li>
|
|
<li class="breadcrumb-item active">How to contribute</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
<a href="https://github.com/commaai/openpilot/edit/master/docs/CONTRIBUTING.md" class="icon icon-github"> Edit on GitHub</a>
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div class="section" itemprop="articleBody">
|
|
|
|
<h1 id="how-to-contribute">How to contribute</h1>
|
|
<p>Our software is open source so you can solve your own problems without needing help from others. And if you solve a problem and are so kind, you can upstream it for the rest of the world to use. Check out our <a href="https://blog.comma.ai/a-2020-theme-externalization/">post about externalization</a>.</p>
|
|
<p>Development is coordinated through <a href="https://discord.comma.ai">Discord</a> and GitHub.</p>
|
|
<h3 id="getting-started">Getting Started</h3>
|
|
<ul>
|
|
<li>Set up your <a href="/tools/">development environment</a></li>
|
|
<li>Join our <a href="https://discord.comma.ai">Discord</a></li>
|
|
<li>Docs are at https://docs.comma.ai and https://blog.comma.ai</li>
|
|
</ul>
|
|
<h2 id="what-contributions-are-we-looking-for">What contributions are we looking for?</h2>
|
|
<p><strong>openpilot's priorities are <a href="../SAFETY/">safety</a>, stability, quality, and features, in that order.</strong>
|
|
openpilot is part of comma's mission to <em>solve self-driving cars while delivering shippable intermediaries</em>, and all development is towards that goal. </p>
|
|
<h3 id="what-gets-merged">What gets merged?</h3>
|
|
<p>The probability of a pull request being merged is a function of its value to the project and the effort it will take us to get it merged.
|
|
If a PR offers <em>some</em> value but will take lots of time to get merged, it will be closed.
|
|
Simple, well-tested bug fixes are the easiest to merge, and new features are the hardest to get merged. </p>
|
|
<p>All of these are examples of good PRs:
|
|
* typo fix: https://github.com/commaai/openpilot/pull/30678
|
|
* removing unused code: https://github.com/commaai/openpilot/pull/30573
|
|
* simple car model port: https://github.com/commaai/openpilot/pull/30245
|
|
* car brand port: https://github.com/commaai/openpilot/pull/23331</p>
|
|
<h3 id="what-doesnt-get-merged">What doesn't get merged?</h3>
|
|
<ul>
|
|
<li><strong>style changes</strong>: code is art, and it's up to the author to make it beautiful </li>
|
|
<li><strong>500+ line PRs</strong>: clean it up, break it up into smaller PRs, or both</li>
|
|
<li><strong>PRs without a clear goal</strong>: every PR must have a singular and clear goal</li>
|
|
<li><strong>UI design</strong>: we do not have a good review process for this yet</li>
|
|
<li><strong>New features</strong>: We believe openpilot is mostly feature-complete, and the rest is a matter of refinement and fixing bugs. As a result of this, most feature PRs will be immediately closed, however the beauty of open source is that forks can and do offer features that upstream openpilot doesn't.</li>
|
|
<li><strong>Negative expected value</strong>: This a class of PRs that makes an improvement, but the risk or validation costs more than the improvement. The risk can be mitigated by first getting a failing test merged.</li>
|
|
</ul>
|
|
<h3 id="first-contribution">First contribution</h3>
|
|
<p><a href="https://github.com/orgs/commaai/projects/26/views/1?pane=info">Projects / openpilot bounties</a> is the best place to get started and goes in-depth on what's expected when working on a bounty.
|
|
There's lot of bounties that don't require a comma 3X or a car.</p>
|
|
<h2 id="pull-requests">Pull Requests</h2>
|
|
<p>Pull requests should be against the master branch.</p>
|
|
<p>A good pull request has all of the following:
|
|
* a clearly stated purpose
|
|
* every line changed directly contributes to the stated purpose
|
|
* verification, i.e. how did you test your PR?
|
|
* justification
|
|
* if you've optimized something, post benchmarks to prove it's better
|
|
* if you've improved your car's tuning, post before and after plots
|
|
* passes the CI tests</p>
|
|
<h2 id="contributing-without-code">Contributing without Code</h2>
|
|
<ul>
|
|
<li>Report bugs in GitHub issues.</li>
|
|
<li>Report driving issues in the <code>#driving-feedback</code> Discord channel.</li>
|
|
<li>Consider opting into driver camera uploads to improve the driver monitoring model.</li>
|
|
<li>Connect your device to Wi-Fi regularly, so that we can pull data for training better driving models.</li>
|
|
<li>Run the <code>nightly</code> branch and report issues. This branch is like <code>master</code> but it's built just like a release.</li>
|
|
<li>Annotate images in the <a href="https://github.com/commaai/comma10k">comma10k dataset</a>.</li>
|
|
</ul>
|
|
<h2 id="contributing-training-data">Contributing Training Data</h2>
|
|
<h3 id="a-guide-for-forks">A guide for forks</h3>
|
|
<p>In order for your fork's data to be eligible for the training set:
|
|
* <strong>Your cereal messaging structs must be <a href="../cereal#custom-forks">compatible</a></strong>
|
|
* <strong>The definitions of all the stock messaging structs must not change</strong>: Do not change how any of the fields are set, including everything from <code>selfdriveState.enabled</code> to <code>carState.steeringAngleDeg</code>. Instead, create your own structs and set them however you'd like.
|
|
* <strong>Do not include cars that are not supported in upstream platforms</strong>: Instead, create new opendbc platforms for cars that you'd like to support outside of upstream, even if it's just a trim-level difference.</p>
|
|
|
|
</div>
|
|
</div><footer>
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
</div>
|
|
|
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="rst-versions" role="note" aria-label="Versions">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
<span>
|
|
<a href="https://github.com/commaai/openpilot/" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
|
|
</span>
|
|
|
|
|
|
|
|
</span>
|
|
</div>
|
|
<script src="../js/jquery-3.6.0.min.js"></script>
|
|
<script>var base_url = "..";</script>
|
|
<script src="../js/theme_extra.js"></script>
|
|
<script src="../js/theme.js"></script>
|
|
<script src="../search/main.js"></script>
|
|
<script>
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|