-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved new developer experience: documentation & environment setup #34317
Changes from all commits
00cf4a8
eff3308
6f61325
d66aa66
7576f3e
7f7c1af
e8e7c52
a4c43e9
79950d3
1d256b7
c99f0f0
7c45c05
4121a1b
68f3e84
ba4acc7
fc4c60b
84026b4
9d2dc29
d2800bf
d7f394b
63e06be
113fbb2
a1672d1
e10936f
31ad649
8a92a1f
963ba65
9816116
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,14 @@ | |
|
||
## System Requirements | ||
|
||
openpilot is developed and tested on **Ubuntu 24.04**, which is the primary development target aside from the [supported embedded hardware](https://github.com/commaai/openpilot#running-on-a-dedicated-device-in-a-car). | ||
openpilot is developed and tested on **Ubuntu 24.04** with [modern hardware](https://github.com/commaai/openpilot/wiki/Requirements#hardware), which is the primary development target aside from the [supported embedded hardware](https://comma.ai/shop/comma-3x). | ||
|
||
Most of openpilot should work natively on macOS. On Windows you can use WSL for a nearly native Ubuntu experience. Running natively on any other system is not currently recommended and will likely require modifications. | ||
Most of openpilot should work natively on macOS. On Windows you can use WSL2 for a nearly native Ubuntu experience [with some exceptions](https://github.com/commaai/openpilot/wiki/WSL). Running natively on any other system is not currently recommended and will likely require modifications. | ||
|
||
## Native setup on Ubuntu 24.04 and macOS | ||
|
||
**1. Clone openpilot** | ||
|
||
NOTE: This repository uses Git LFS for large files. Ensure you have [Git LFS](https://git-lfs.com/) installed and set up before cloning or working with it. | ||
|
||
Either do a partial clone for faster download: | ||
``` bash | ||
git clone --filter=blob:none --recurse-submodules --also-filter-submodules https://github.com/commaai/openpilot.git | ||
|
@@ -29,12 +27,6 @@ cd openpilot | |
tools/op.sh setup | ||
``` | ||
|
||
**3. Git LFS** | ||
|
||
``` bash | ||
git lfs pull | ||
``` | ||
|
||
**4. Activate a python shell** | ||
|
||
Activate a shell with the Python dependencies installed: | ||
|
@@ -48,16 +40,8 @@ source .venv/bin/activate | |
scons -u -j$(nproc) | ||
``` | ||
|
||
## WSL on Windows | ||
|
||
[Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about) should provide a similar experience to native Ubuntu. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) specifically has been reported by several users to be a seamless experience. | ||
|
||
Follow [these instructions](https://docs.microsoft.com/en-us/windows/wsl/install) to setup the WSL and install the `Ubuntu-24.04` distribution. Once your Ubuntu WSL environment is setup, follow the Linux setup instructions to finish setting up your environment. See [these instructions](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) for running GUI apps. | ||
|
||
**NOTE**: If you are running WSL and any GUIs are failing (segfaulting or other strange issues) even after following the steps above, you may need to enable software rendering with `LIBGL_ALWAYS_SOFTWARE=1`, e.g. `LIBGL_ALWAYS_SOFTWARE=1 selfdrive/ui/ui`. | ||
|
||
Comment on lines
-51
to
-58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm neutral on moving the WSL stuff to Wiki, but if we're going to move it, we need to preserve the explicit instruction to use Ubuntu 24.04 as the distribution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but I think it's pretty explicit both here and on the WSL wiki. Do you think it needs to be made more explicit? |
||
## CTF | ||
Learn about the openpilot ecosystem and tools by playing our [CTF](/tools/CTF.md). | ||
Learn about the openpilot ecosystem and tools by playing our [CTF](/tools/CTF.md) and [reading the wiki](https://github.com/commaai/openpilot/wiki/Introduction-to-openpilot). | ||
|
||
## Directory Structure | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,8 @@ function install_ubuntu_common_requirements() { | |
libbz2-dev \ | ||
libeigen3-dev \ | ||
libffi-dev \ | ||
libfreeimage-dev \ | ||
libfreeimage3 \ | ||
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. required for rerun There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's leave these out for now, I'm not sure rerun is moving forward. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok sure. I'll put them in the WSL docs |
||
libglew-dev \ | ||
libgles2-mesa-dev \ | ||
libglfw3-dev \ | ||
|
@@ -57,7 +59,9 @@ function install_ubuntu_common_requirements() { | |
opencl-headers \ | ||
ocl-icd-libopencl1 \ | ||
ocl-icd-opencl-dev \ | ||
pocl-opencl-icd \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. required for OpenCL There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required for webcam only, which is a relatively rare need. I just checked on my machine, it wants to drag in 22 dependencies and 845MB of disk. Let's leave it as manual for webcam users. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI it's also required for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please be very mindful before adding packages to this list since it makes everything big and slow. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's good to know Max, I wasn't aware, I'll remove it from here and add it to some documentation elsewhere |
||
portaudio19-dev \ | ||
pulseaudio \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. required for audio on WSL2 (ie. in sumulator) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is a good idea. Native Ubuntu 24.04 is using pipewire instead of pulseaudio; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ya that's fair. I'll try pipewire instead on WSL and make sure that behaves nicely |
||
qttools5-dev-tools \ | ||
libqt5svg5-dev \ | ||
libqt5serialbus5-dev \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
op.sh takes care of Git LFS (which is now installed with git on Ubuntu 24.04)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should replace 1-3 with
bash <(curl -fsSL openpilot.comma.ai)
.