├── .clang-tidy ├── .dir-locals.el ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── car_bug_report.yml │ ├── config.yml │ ├── enhancement.md │ └── pc_bug_report.yml ├── PULL_REQUEST_TEMPLATE │ ├── bugfix.md │ ├── car_bugfix.md │ ├── car_port.md │ ├── fingerprint.md │ ├── refactor.md │ └── tuning.md ├── pull_request_template.md └── workflows │ ├── badges.yaml │ ├── prebuilt.yaml │ ├── release.yaml │ ├── selfdrive_tests.yaml │ ├── setup │ └── action.yaml │ └── tools_tests.yaml ├── .gitignore ├── .gitmodules ├── .lfsconfig ├── .pre-commit-config.yaml ├── .pylintrc ├── .python-version ├── Dockerfile.openpilot ├── Dockerfile.openpilot_base ├── Dockerfile.openpilot_base_cl ├── Jenkinsfile ├── LICENSE ├── README.md ├── RELEASES.md ├── SConstruct ├── SECURITY.md ├── codecov.yml ├── common ├── .gitignore ├── SConscript ├── __init__.py ├── api │ └── __init__.py ├── basedir.py ├── clock.pyx ├── clutil.cc ├── clutil.h ├── conversions.py ├── dict_helpers.py ├── ffi_wrapper.py ├── file_helpers.py ├── filter_simple.py ├── gpio.cc ├── gpio.h ├── gpio.py ├── i2c.cc ├── i2c.h ├── kalman │ ├── .gitignore │ ├── SConscript │ ├── __init__.py │ ├── simple_kalman.py │ ├── simple_kalman_impl.pxd │ ├── simple_kalman_impl.pyx │ ├── simple_kalman_old.py │ └── tests │ │ ├── __init__.py │ │ └── test_simple_kalman.py ├── lazy_property.py ├── logging_extra.py ├── mat.h ├── modeldata.h ├── numpy_fast.py ├── numpy_helpers.py ├── params.cc ├── params.h ├── params.py ├── params_pyx.pyx ├── prefix.h ├── profiler.py ├── queue.h ├── realtime.py ├── spinner.py ├── stat_live.py ├── statlog.cc ├── statlog.h ├── swaglog.cc ├── swaglog.h ├── tests │ ├── .gitignore │ ├── __init__.py │ ├── test_file_helpers.py │ ├── test_numpy_fast.py │ ├── test_params.py │ ├── test_swaglog.cc │ └── test_util.cc ├── text_window.py ├── timeout.py ├── timing.h ├── transformations │ ├── .gitignore │ ├── README.md │ ├── SConscript │ ├── __init__.py │ ├── camera.py │ ├── coordinates.cc │ ├── coordinates.hpp │ ├── coordinates.py │ ├── model.py │ ├── orientation.cc │ ├── orientation.hpp │ ├── orientation.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_coordinates.py │ │ └── test_orientation.py │ ├── transformations.pxd │ └── transformations.pyx ├── util.cc ├── util.h ├── version.h ├── watchdog.cc ├── watchdog.h ├── window.py └── xattr.py ├── docs ├── CARS.md ├── CONTRIBUTING.md ├── INTEGRATION.md ├── LIMITATIONS.md ├── Makefile ├── SAFETY.md ├── _static │ ├── favicon.ico │ ├── logo.png │ └── robots.txt ├── assets │ ├── icon-star-empty.svg │ ├── icon-star-full.svg │ └── icon-star-half.svg ├── c_docs.rst ├── conf.py ├── docker │ ├── Dockerfile │ └── nginx.conf ├── index.md └── overview.rst ├── laika ├── launch_chffrplus.sh ├── launch_env.sh ├── launch_openpilot.sh ├── lgtm.yml ├── mypy.ini ├── poetry.lock ├── pyextra ├── .gitignore └── acados_template │ ├── .gitignore │ ├── __init__.py │ ├── acados_layout.json │ ├── acados_model.py │ ├── acados_ocp.py │ ├── acados_ocp_solver.py │ ├── acados_ocp_solver_pyx.pyx │ ├── acados_sim.py │ ├── acados_sim_layout.json │ ├── acados_sim_solver.py │ ├── acados_solver_common.pxd │ ├── builders.py │ ├── c_templates_tera │ ├── CMakeLists.in.txt │ ├── CPPLINT.cfg │ ├── Makefile.in │ ├── acados_mex_create.in.c │ ├── acados_mex_free.in.c │ ├── acados_mex_set.in.c │ ├── acados_mex_solve.in.c │ ├── acados_sim_solver.in.c │ ├── acados_sim_solver.in.h │ ├── acados_sim_solver_sfun.in.c │ ├── acados_solver.in.c │ ├── acados_solver.in.h │ ├── acados_solver.in.pxd │ ├── acados_solver_sfun.in.c │ ├── cost_y_0_fun.in.h │ ├── cost_y_e_fun.in.h │ ├── cost_y_fun.in.h │ ├── external_cost.in.h │ ├── external_cost_0.in.h │ ├── external_cost_e.in.h │ ├── h_constraint.in.h │ ├── h_e_constraint.in.h │ ├── main.in.c │ ├── main_mex.in.c │ ├── main_sim.in.c │ ├── make_main_mex.in.m │ ├── make_mex.in.m │ ├── make_sfun.in.m │ ├── make_sfun_sim.in.m │ ├── mex_solver.in.m │ ├── model.in.h │ ├── phi_constraint.in.h │ └── phi_e_constraint.in.h │ ├── generate_c_code_constraint.py │ ├── generate_c_code_discrete_dynamics.py │ ├── generate_c_code_explicit_ode.py │ ├── generate_c_code_external_cost.py │ ├── generate_c_code_gnsf.py │ ├── generate_c_code_implicit_ode.py │ ├── generate_c_code_nls_cost.py │ ├── simulink_default_opts.json │ └── utils.py ├── pyproject.toml ├── rednose ├── release ├── build_devel.sh ├── build_release.sh ├── check-dirty.sh ├── check-submodules.sh ├── files_common ├── files_pc ├── files_tici ├── identity.sh └── verify.sh ├── scripts ├── __init__.py ├── apply-pr.sh ├── cell.sh ├── code_stats.py ├── count_cars.py ├── disable-powersave.py ├── dump_pll.c ├── launch_corolla.sh ├── pyqt_demo.py ├── stop_updater.sh ├── update_now.sh ├── waste.c └── waste.py ├── selfdrive ├── __init__.py ├── assets │ ├── .gitignore │ ├── assets.qrc │ ├── body │ │ ├── awake.gif │ │ └── sleep.gif │ ├── compress-images.sh │ ├── fonts │ │ ├── Inter-Black.ttf │ │ ├── Inter-Bold.ttf │ │ ├── Inter-ExtraBold.ttf │ │ ├── Inter-ExtraLight.ttf │ │ ├── Inter-Light.ttf │ │ ├── Inter-Medium.ttf │ │ ├── Inter-Regular.ttf │ │ ├── Inter-SemiBold.ttf │ │ ├── Inter-Thin.ttf │ │ └── JetBrainsMono-Medium.ttf │ ├── icons │ │ └── close.svg │ ├── images │ │ ├── button_flag.png │ │ ├── button_home.png │ │ ├── button_settings.png │ │ └── triangle.svg │ ├── img_chffr_wheel.png │ ├── img_circled_check.svg │ ├── img_circled_slash.svg │ ├── img_continue_triangle.svg │ ├── img_couch.svg │ ├── img_driver_face.png │ ├── img_experimental.svg │ ├── img_experimental_grey.svg │ ├── img_experimental_white.svg │ ├── img_eye_closed.svg │ ├── img_eye_open.svg │ ├── img_map.png │ ├── img_spinner_comma.png │ ├── img_spinner_track.png │ ├── navigation │ │ ├── direction_arrive.png │ │ ├── direction_arrive_left.png │ │ ├── direction_arrive_right.png │ │ ├── direction_arrive_straight.png │ │ ├── direction_close.png │ │ ├── direction_continue.png │ │ ├── direction_continue_left.png │ │ ├── direction_continue_right.png │ │ ├── direction_continue_slight_left.png │ │ ├── direction_continue_slight_right.png │ │ ├── direction_continue_straight.png │ │ ├── direction_continue_uturn.png │ │ ├── direction_depart.png │ │ ├── direction_depart_left.png │ │ ├── direction_depart_right.png │ │ ├── direction_depart_straight.png │ │ ├── direction_end_of_road_left.png │ │ ├── direction_end_of_road_right.png │ │ ├── direction_flag.png │ │ ├── direction_fork.png │ │ ├── direction_fork_left.png │ │ ├── direction_fork_right.png │ │ ├── direction_fork_slight_left.png │ │ ├── direction_fork_slight_right.png │ │ ├── direction_fork_straight.png │ │ ├── direction_invalid.png │ │ ├── direction_invalid_left.png │ │ ├── direction_invalid_right.png │ │ ├── direction_invalid_slight_left.png │ │ ├── direction_invalid_slight_right.png │ │ ├── direction_invalid_straight.png │ │ ├── direction_invalid_uturn.png │ │ ├── direction_merge_left.png │ │ ├── direction_merge_right.png │ │ ├── direction_merge_slight_left.png │ │ ├── direction_merge_slight_right.png │ │ ├── direction_merge_straight.png │ │ ├── direction_new_name_left.png │ │ ├── direction_new_name_right.png │ │ ├── direction_new_name_sharp_left.png │ │ ├── direction_new_name_sharp_right.png │ │ ├── direction_new_name_slight_left.png │ │ ├── direction_new_name_slight_right.png │ │ ├── direction_new_name_straight.png │ │ ├── direction_notificaiton_right.png │ │ ├── direction_notificaiton_sharp_right.png │ │ ├── direction_notification_left.png │ │ ├── direction_notification_sharp_left.png │ │ ├── direction_notification_slight_left.png │ │ ├── direction_notification_slight_right.png │ │ ├── direction_notification_straight.png │ │ ├── direction_off_ramp_left.png │ │ ├── direction_off_ramp_right.png │ │ ├── direction_off_ramp_slight_left.png │ │ ├── direction_off_ramp_slight_right.png │ │ ├── direction_on_ramp_left.png │ │ ├── direction_on_ramp_right.png │ │ ├── direction_on_ramp_sharp_left.png │ │ ├── direction_on_ramp_sharp_right.png │ │ ├── direction_on_ramp_slight_left.png │ │ ├── direction_on_ramp_slight_right.png │ │ ├── direction_on_ramp_straight.png │ │ ├── direction_rotary.png │ │ ├── direction_rotary_left.png │ │ ├── direction_rotary_right.png │ │ ├── direction_rotary_sharp_left.png │ │ ├── direction_rotary_sharp_right.png │ │ ├── direction_rotary_slight_left.png │ │ ├── direction_rotary_slight_right.png │ │ ├── direction_rotary_straight.png │ │ ├── direction_roundabout.png │ │ ├── direction_roundabout_left.png │ │ ├── direction_roundabout_right.png │ │ ├── direction_roundabout_sharp_left.png │ │ ├── direction_roundabout_sharp_right.png │ │ ├── direction_roundabout_slight_left.png │ │ ├── direction_roundabout_slight_right.png │ │ ├── direction_roundabout_straight.png │ │ ├── direction_turn_left.png │ │ ├── direction_turn_left_inactive.png │ │ ├── direction_turn_right.png │ │ ├── direction_turn_right_inactive.png │ │ ├── direction_turn_sharp_left.png │ │ ├── direction_turn_sharp_right.png │ │ ├── direction_turn_slight_left.png │ │ ├── direction_turn_slight_right.png │ │ ├── direction_turn_straight.png │ │ ├── direction_turn_straight_inactive.png │ │ ├── direction_turn_uturn.png │ │ ├── direction_updown.png │ │ ├── home.png │ │ ├── home.svg │ │ ├── home_inactive.png │ │ ├── screenshot.png │ │ ├── work.png │ │ ├── work.svg │ │ └── work_inactive.png │ ├── offroad │ │ ├── fcc.html │ │ ├── icon_calibration.png │ │ ├── icon_checkmark.svg │ │ ├── icon_chevron_right.png │ │ ├── icon_close.svg │ │ ├── icon_disengage_on_accelerator.svg │ │ ├── icon_lock_closed.svg │ │ ├── icon_map.png │ │ ├── icon_map_speed.png │ │ ├── icon_menu.png │ │ ├── icon_metric.png │ │ ├── icon_minus.png │ │ ├── icon_monitoring.png │ │ ├── icon_network.png │ │ ├── icon_openpilot.png │ │ ├── icon_plus.png │ │ ├── icon_road.png │ │ ├── icon_settings.png │ │ ├── icon_shell.png │ │ ├── icon_speed_limit.png │ │ ├── icon_warning.png │ │ ├── icon_wifi_strength_full.svg │ │ ├── icon_wifi_strength_high.svg │ │ ├── icon_wifi_strength_low.svg │ │ ├── icon_wifi_strength_medium.svg │ │ └── tc.html │ ├── sounds │ │ ├── disengage.wav │ │ ├── engage.wav │ │ ├── prompt.wav │ │ ├── prompt_distracted.wav │ │ ├── refuse.wav │ │ ├── warning_immediate.wav │ │ └── warning_soft.wav │ ├── strip-svg-metadata.sh │ ├── training │ │ ├── step0.png │ │ ├── step1.png │ │ ├── step10.png │ │ ├── step11.png │ │ ├── step12.png │ │ ├── step13.png │ │ ├── step14.png │ │ ├── step15.png │ │ ├── step16.png │ │ ├── step17.png │ │ ├── step18.png │ │ ├── step2.png │ │ ├── step3.png │ │ ├── step4.png │ │ ├── step5.png │ │ ├── step6.png │ │ ├── step7.png │ │ ├── step8.png │ │ └── step9.png │ └── training_wide │ │ ├── step0.png │ │ ├── step1.png │ │ ├── step10.png │ │ ├── step11.png │ │ ├── step12.png │ │ ├── step13.png │ │ ├── step14.png │ │ ├── step15.png │ │ ├── step16.png │ │ ├── step17.png │ │ ├── step18.png │ │ ├── step2.png │ │ ├── step3.png │ │ ├── step4.png │ │ ├── step5.png │ │ ├── step6.png │ │ ├── step7.png │ │ ├── step8.png │ │ └── step9.png ├── athena │ ├── __init__.py │ ├── athenad.py │ ├── manage_athenad.py │ ├── registration.py │ └── tests │ │ ├── __init__.py │ │ ├── helpers.py │ │ ├── test_athenad.py │ │ └── test_registration.py ├── boardd │ ├── .gitignore │ ├── SConscript │ ├── __init__.py │ ├── boardd.cc │ ├── boardd.h │ ├── boardd.py │ ├── boardd_api_impl.pyx │ ├── can_list_to_can_capnp.cc │ ├── main.cc │ ├── panda.cc │ ├── panda.h │ ├── panda_comms.cc │ ├── panda_comms.h │ ├── pandad.py │ ├── set_time.py │ ├── spi.cc │ └── tests │ │ ├── __init__.py │ │ ├── test_boardd │ │ ├── test_boardd_loopback.py │ │ └── test_boardd_usbprotocol.cc ├── car │ ├── CARS_template.md │ ├── README.MD │ ├── __init__.py │ ├── body │ │ ├── __init__.py │ │ ├── bodycan.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── car_helpers.py │ ├── chrysler │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── chryslercan.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── disable_ecu.py │ ├── docs.py │ ├── docs_definitions.py │ ├── ecu_addrs.py │ ├── fingerprints.py │ ├── ford │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── fordcan.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── fw_query_definitions.py │ ├── fw_versions.py │ ├── gm │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── gmcan.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── honda │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── hondacan.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── hyundai │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── hyundaican.py │ │ ├── hyundaicanfd.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ ├── tests │ │ │ └── test_hyundai.py │ │ └── values.py │ ├── interfaces.py │ ├── isotp_parallel_query.py │ ├── mazda │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── mazdacan.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── mock │ │ ├── __init__.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── nissan │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── nissancan.py │ │ ├── radar_interface.py │ │ └── values.py │ ├── subaru │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ ├── subarucan.py │ │ └── values.py │ ├── tesla │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ ├── teslacan.py │ │ └── values.py │ ├── tests │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── routes.py │ │ ├── test_car_interfaces.py │ │ ├── test_docs.py │ │ ├── test_fingerprints.py │ │ ├── test_fw_fingerprint.py │ │ └── test_models.py │ ├── torque_data │ │ ├── override.yaml │ │ ├── params.yaml │ │ └── substitute.yaml │ ├── toyota │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── radar_interface.py │ │ ├── toyotacan.py │ │ └── values.py │ ├── vin.py │ └── volkswagen │ │ ├── __init__.py │ │ ├── carcontroller.py │ │ ├── carstate.py │ │ ├── interface.py │ │ ├── mqbcan.py │ │ ├── pqcan.py │ │ ├── radar_interface.py │ │ └── values.py ├── controls │ ├── .gitignore │ ├── __init__.py │ ├── controlsd.py │ ├── lib │ │ ├── __init__.py │ │ ├── alertmanager.py │ │ ├── alerts_offroad.json │ │ ├── cluster │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── SConscript │ │ │ ├── __init__.py │ │ │ ├── fastcluster.cpp │ │ │ ├── fastcluster.h │ │ │ ├── fastcluster_R_dm.cpp │ │ │ ├── fastcluster_dm.cpp │ │ │ ├── fastcluster_py.py │ │ │ └── test.cpp │ │ ├── desire_helper.py │ │ ├── drive_helpers.py │ │ ├── events.py │ │ ├── latcontrol.py │ │ ├── latcontrol_angle.py │ │ ├── latcontrol_indi.py │ │ ├── latcontrol_pid.py │ │ ├── latcontrol_torque.py │ │ ├── lateral_mpc_lib │ │ │ ├── .gitignore │ │ │ ├── SConscript │ │ │ ├── __init__.py │ │ │ └── lat_mpc.py │ │ ├── lateral_planner.py │ │ ├── longcontrol.py │ │ ├── longitudinal_mpc_lib │ │ │ ├── .gitignore │ │ │ ├── SConscript │ │ │ ├── __init__.py │ │ │ └── long_mpc.py │ │ ├── longitudinal_planner.py │ │ ├── pid.py │ │ ├── radar_helpers.py │ │ ├── tests │ │ │ ├── test_alertmanager.py │ │ │ ├── test_latcontrol.py │ │ │ └── test_vehicle_model.py │ │ └── vehicle_model.py │ ├── plannerd.py │ ├── radard.py │ └── tests │ │ ├── __init__.py │ │ ├── test_alerts.py │ │ ├── test_clustering.py │ │ ├── test_cruise_speed.py │ │ ├── test_following_distance.py │ │ ├── test_lateral_mpc.py │ │ ├── test_startup.py │ │ └── test_state_machine.py ├── debug │ ├── README.md │ ├── __init__.py │ ├── adb.sh │ ├── can_print_changes.py │ ├── can_printer.py │ ├── can_table.py │ ├── check_freq.py │ ├── check_lag.py │ ├── check_timings.py │ ├── clear_dtc.py │ ├── count_events.py │ ├── cpu_usage_stat.py │ ├── cycle_alerts.py │ ├── dump.py │ ├── dump_car_info.py │ ├── filter_log_message.py │ ├── fingerprint_from_route.py │ ├── get_fingerprint.py │ ├── hyundai_enable_radar_points.py │ ├── internal │ │ ├── __init__.py │ │ ├── check_alive_valid.py │ │ ├── design_lqr.py │ │ ├── fuzz_fw_fingerprint.py │ │ ├── measure_modeld_packet_drop.py │ │ ├── measure_torque_time_to_max.py │ │ ├── power_monitor.py │ │ ├── qlog_size.py │ │ ├── run_paramsd_on_route.py │ │ └── test_paramsd.py │ ├── live_cpu_and_temp.py │ ├── print_docs_diff.py │ ├── profiling │ │ ├── clpeak │ │ │ ├── .gitignore │ │ │ ├── build.sh │ │ │ ├── clpeak3 │ │ │ ├── no_print.patch │ │ │ └── run_continuously.patch │ │ ├── ftrace.sh │ │ ├── palanteer │ │ │ ├── .gitignore │ │ │ └── setup.sh │ │ ├── perfetto │ │ │ ├── .gitignore │ │ │ ├── build.sh │ │ │ ├── copy.sh │ │ │ ├── record.sh │ │ │ ├── server.sh │ │ │ └── traces.sh │ │ ├── py-spy │ │ │ └── profile.sh │ │ ├── simpleperf │ │ │ ├── bin │ │ │ │ └── android │ │ │ │ │ └── arm64 │ │ │ │ │ └── simpleperf │ │ │ ├── eon_perf.sh │ │ │ └── get.txt │ │ └── snapdragon │ │ │ ├── .gitignore │ │ │ ├── README │ │ │ └── setup-agnos.sh │ ├── read_dtc_status.py │ ├── run_process_on_route.py │ ├── sensor_data_to_hist.py │ ├── set_car_params.py │ ├── show_matching_cars.py │ ├── test_car_model.py │ ├── test_fw_query_on_routes.py │ ├── toyota_eps_factor.py │ ├── uiview.py │ └── vw_mqb_config.py ├── hardware ├── locationd │ ├── .gitignore │ ├── SConscript │ ├── __init__.py │ ├── calibrationd.py │ ├── generated │ │ ├── gps.cpp │ │ ├── gps.h │ │ ├── ubx.cpp │ │ └── ubx.h │ ├── gps.ksy │ ├── laikad.py │ ├── laikad_helpers.py │ ├── liblocationd.cc │ ├── locationd.cc │ ├── locationd.h │ ├── models │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── car_kf.py │ │ ├── constants.py │ │ ├── gnss_helpers.py │ │ ├── gnss_kf.py │ │ ├── live_kf.cc │ │ ├── live_kf.h │ │ ├── live_kf.py │ │ └── loc_kf.py │ ├── paramsd.py │ ├── test │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── _test_locationd_lib.py │ │ ├── print_gps_stats.py │ │ ├── test_calibrationd.py │ │ ├── test_laikad.py │ │ ├── test_locationd.py │ │ ├── test_ublox_processing.py │ │ ├── ublox.py │ │ └── ubloxd.py │ ├── torqued.py │ ├── ublox_msg.cc │ ├── ublox_msg.h │ ├── ubloxd.cc │ └── ubx.ksy ├── loggerd │ ├── .gitignore │ ├── README.md │ ├── SConscript │ ├── __init__.py │ ├── bootlog.cc │ ├── config.py │ ├── deleter.py │ ├── encoder │ │ ├── encoder.cc │ │ ├── encoder.h │ │ ├── ffmpeg_encoder.cc │ │ ├── ffmpeg_encoder.h │ │ ├── v4l_encoder.cc │ │ └── v4l_encoder.h │ ├── encoderd.cc │ ├── logger.cc │ ├── logger.h │ ├── loggerd.cc │ ├── loggerd.h │ ├── tests │ │ ├── __init__.py │ │ ├── fill_eon.py │ │ ├── loggerd_tests_common.py │ │ ├── test_deleter.py │ │ ├── test_encoder.py │ │ ├── test_logger.cc │ │ ├── test_loggerd.py │ │ ├── test_runner.cc │ │ └── test_uploader.py │ ├── tools │ │ ├── mark_all_uploaded.py │ │ └── mark_unuploaded.py │ ├── uploader.py │ ├── video_writer.cc │ ├── video_writer.h │ └── xattr_cache.py ├── manager │ ├── __init__.py │ ├── build.py │ ├── helpers.py │ ├── manager.py │ ├── process.py │ ├── process_config.py │ └── test │ │ ├── __init__.py │ │ └── test_manager.py ├── modeld │ ├── SConscript │ ├── __init__.py │ ├── constants.py │ ├── dmonitoringmodeld │ ├── dmonitoringmodeld.cc │ ├── modeld │ ├── modeld.cc │ ├── models │ │ ├── README.md │ │ ├── commonmodel.cc │ │ ├── commonmodel.h │ │ ├── dmonitoring.cc │ │ ├── dmonitoring.h │ │ ├── dmonitoring_model.current │ │ ├── dmonitoring_model.onnx │ │ ├── dmonitoring_model_q.dlc │ │ ├── driving.cc │ │ ├── driving.h │ │ ├── nav.cc │ │ ├── nav.h │ │ ├── navmodel.onnx │ │ ├── navmodel_q.dlc │ │ └── supercombo.onnx │ ├── navmodeld │ ├── navmodeld.cc │ ├── runners │ │ ├── onnx_runner.py │ │ ├── onnxmodel.cc │ │ ├── onnxmodel.h │ │ ├── run.h │ │ ├── runmodel.h │ │ ├── snpemodel.cc │ │ ├── snpemodel.h │ │ ├── thneedmodel.cc │ │ └── thneedmodel.h │ ├── tests │ │ ├── __init__.py │ │ ├── dmon_lag │ │ │ └── repro.cc │ │ ├── snpe_benchmark │ │ │ ├── .gitignore │ │ │ ├── benchmark.cc │ │ │ └── benchmark.sh │ │ ├── test_modeld.py │ │ ├── tf_test │ │ │ ├── build.sh │ │ │ ├── main.cc │ │ │ └── pb_loader.py │ │ └── timing │ │ │ └── benchmark.py │ ├── thneed │ │ ├── README │ │ ├── __init__.py │ │ ├── include │ │ │ └── msm_kgsl.h │ │ ├── lib.py │ │ ├── serialize.cc │ │ ├── thneed.h │ │ ├── thneed_common.cc │ │ ├── thneed_pc.cc │ │ └── thneed_qcom2.cc │ └── transforms │ │ ├── loadyuv.cc │ │ ├── loadyuv.cl │ │ ├── loadyuv.h │ │ ├── transform.cc │ │ ├── transform.cl │ │ └── transform.h ├── monitoring │ ├── README.md │ ├── dmonitoringd.py │ ├── driver_monitor.py │ └── test_monitoring.py ├── navd │ ├── .gitignore │ ├── README.md │ ├── SConscript │ ├── __init__.py │ ├── helpers.py │ ├── main.cc │ ├── map_renderer.cc │ ├── map_renderer.h │ ├── map_renderer.py │ ├── navd.py │ ├── set_destination.py │ └── style.json ├── rtshield.py ├── sensord │ ├── SConscript │ ├── __init__.py │ ├── libdiag.h │ ├── pigeond.py │ ├── rawgps │ │ ├── compare.py │ │ ├── modemdiag.py │ │ ├── rawgpsd.py │ │ ├── structs.py │ │ └── test_rawgps.py │ ├── sensord │ ├── sensors │ │ ├── bmx055_accel.cc │ │ ├── bmx055_accel.h │ │ ├── bmx055_gyro.cc │ │ ├── bmx055_gyro.h │ │ ├── bmx055_magn.cc │ │ ├── bmx055_magn.h │ │ ├── bmx055_temp.cc │ │ ├── bmx055_temp.h │ │ ├── constants.h │ │ ├── file_sensor.cc │ │ ├── file_sensor.h │ │ ├── i2c_sensor.cc │ │ ├── i2c_sensor.h │ │ ├── light_sensor.cc │ │ ├── light_sensor.h │ │ ├── lsm6ds3_accel.cc │ │ ├── lsm6ds3_accel.h │ │ ├── lsm6ds3_gyro.cc │ │ ├── lsm6ds3_gyro.h │ │ ├── lsm6ds3_temp.cc │ │ ├── lsm6ds3_temp.h │ │ ├── mmc5603nj_magn.cc │ │ ├── mmc5603nj_magn.h │ │ └── sensor.h │ ├── sensors_qcom2.cc │ └── tests │ │ ├── __init__.py │ │ ├── test_pigeond.py │ │ ├── test_sensord.py │ │ └── ttff_test.py ├── sentry.py ├── statsd.py ├── test │ ├── .gitignore │ ├── __init__.py │ ├── ci_shell.sh │ ├── helpers.py │ ├── longitudinal_maneuvers │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── maneuver.py │ │ ├── plant.py │ │ └── test_longitudinal.py │ ├── openpilotci.py │ ├── process_replay │ │ ├── .gitignore │ │ ├── README.md │ │ ├── __init__.py │ │ ├── compare_logs.py │ │ ├── debayer_replay_ref_commit │ │ ├── helpers.py │ │ ├── model_replay.py │ │ ├── model_replay_ref_commit │ │ ├── process_replay.py │ │ ├── ref_commit │ │ ├── regen.py │ │ ├── regen_all.py │ │ ├── test_debayer.py │ │ ├── test_fuzzy.py │ │ └── test_processes.py │ ├── profiling │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── lib.py │ │ └── profiler.py │ ├── setup_device_ci.sh │ ├── test_onroad.py │ ├── test_updated.py │ ├── test_valgrind_replay.py │ └── update_ci_routes.py ├── thermald │ ├── __init__.py │ ├── fan_controller.py │ ├── power_monitoring.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_fan_controller.py │ │ └── test_power_monitoring.py │ └── thermald.py ├── tombstoned.py ├── ui │ ├── .gitignore │ ├── SConscript │ ├── installer │ │ ├── continue_dashcam.sh │ │ ├── continue_openpilot.sh │ │ ├── installer.cc │ │ └── installer.h │ ├── main.cc │ ├── mui.cc │ ├── qt │ │ ├── api.cc │ │ ├── api.h │ │ ├── body.cc │ │ ├── body.h │ │ ├── home.cc │ │ ├── home.h │ │ ├── maps │ │ │ ├── map.cc │ │ │ ├── map.h │ │ │ ├── map_helpers.cc │ │ │ ├── map_helpers.h │ │ │ ├── map_settings.cc │ │ │ └── map_settings.h │ │ ├── offroad │ │ │ ├── driverview.cc │ │ │ ├── driverview.h │ │ │ ├── experimental_mode.cc │ │ │ ├── experimental_mode.h │ │ │ ├── networking.cc │ │ │ ├── networking.h │ │ │ ├── networkmanager.h │ │ │ ├── onboarding.cc │ │ │ ├── onboarding.h │ │ │ ├── settings.cc │ │ │ ├── settings.h │ │ │ ├── software_settings.cc │ │ │ ├── text_view.qml │ │ │ ├── wifiManager.cc │ │ │ └── wifiManager.h │ │ ├── onroad.cc │ │ ├── onroad.h │ │ ├── python_helpers.py │ │ ├── qt_window.cc │ │ ├── qt_window.h │ │ ├── request_repeater.cc │ │ ├── request_repeater.h │ │ ├── setup │ │ │ ├── reset.cc │ │ │ ├── reset.h │ │ │ ├── setup.cc │ │ │ ├── setup.h │ │ │ ├── updater.cc │ │ │ └── updater.h │ │ ├── sidebar.cc │ │ ├── sidebar.h │ │ ├── spinner.cc │ │ ├── spinner.h │ │ ├── spinner_larch64 │ │ ├── text.cc │ │ ├── text_larch64 │ │ ├── util.cc │ │ ├── util.h │ │ ├── widgets │ │ │ ├── cameraview.cc │ │ │ ├── cameraview.h │ │ │ ├── controls.cc │ │ │ ├── controls.h │ │ │ ├── drive_stats.cc │ │ │ ├── drive_stats.h │ │ │ ├── input.cc │ │ │ ├── input.h │ │ │ ├── keyboard.cc │ │ │ ├── keyboard.h │ │ │ ├── offroad_alerts.cc │ │ │ ├── offroad_alerts.h │ │ │ ├── prime.cc │ │ │ ├── prime.h │ │ │ ├── scrollview.cc │ │ │ ├── scrollview.h │ │ │ ├── ssh_keys.cc │ │ │ ├── ssh_keys.h │ │ │ ├── toggle.cc │ │ │ └── toggle.h │ │ ├── window.cc │ │ └── window.h │ ├── soundd │ │ ├── .gitignore │ │ ├── main.cc │ │ ├── sound.cc │ │ ├── sound.h │ │ └── soundd │ ├── spinner │ ├── tests │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── body.py │ │ ├── create_test_translations.sh │ │ ├── cycle_offroad_alerts.py │ │ ├── playsound.cc │ │ ├── test_runner.cc │ │ ├── test_sound.cc │ │ ├── test_sound_stability.py │ │ ├── test_soundd.py │ │ ├── test_translations.cc │ │ └── test_translations.py │ ├── text │ ├── translations │ │ ├── README.md │ │ ├── create_badges.py │ │ ├── languages.json │ │ ├── main_ar.ts │ │ ├── main_de.ts │ │ ├── main_en.ts │ │ ├── main_ja.ts │ │ ├── main_ko.ts │ │ ├── main_nl.ts │ │ ├── main_pl.ts │ │ ├── main_pt-BR.ts │ │ ├── main_th.ts │ │ ├── main_zh-CHS.ts │ │ └── main_zh-CHT.ts │ ├── ui │ ├── ui.cc │ ├── ui.h │ ├── update_translations.py │ └── watch3.cc └── updated.py ├── site_scons └── site_tools │ └── cython.py ├── system ├── __init__.py ├── camerad │ ├── SConscript │ ├── __init__.py │ ├── cameras │ │ ├── camera_common.cc │ │ ├── camera_common.h │ │ ├── camera_qcom2.cc │ │ ├── camera_qcom2.h │ │ ├── camera_util.cc │ │ ├── camera_util.h │ │ ├── real_debayer.cl │ │ └── sensor2_i2c.h │ ├── imgproc │ │ ├── conv.cl │ │ ├── pool.cl │ │ ├── utils.cc │ │ └── utils.h │ ├── include │ │ ├── media │ │ │ ├── cam_cpas.h │ │ │ ├── cam_defs.h │ │ │ ├── cam_fd.h │ │ │ ├── cam_icp.h │ │ │ ├── cam_isp.h │ │ │ ├── cam_isp_ife.h │ │ │ ├── cam_isp_vfe.h │ │ │ ├── cam_jpeg.h │ │ │ ├── cam_lrme.h │ │ │ ├── cam_req_mgr.h │ │ │ ├── cam_sensor.h │ │ │ ├── cam_sensor_cmn_header.h │ │ │ └── cam_sync.h │ │ ├── msm_cam_sensor.h │ │ ├── msm_camsensor_sdk.h │ │ ├── msmb_camera.h │ │ ├── msmb_isp.h │ │ └── msmb_ispif.h │ ├── main.cc │ ├── snapshot │ │ ├── __init__.py │ │ └── snapshot.py │ └── test │ │ ├── .gitignore │ │ ├── ae_gray_test.cc │ │ ├── ae_gray_test.h │ │ ├── check_skips.py │ │ ├── frame_test.py │ │ ├── get_thumbnails_for_segment.py │ │ ├── stress_restart.sh │ │ ├── test_camerad.py │ │ └── test_exposure.py ├── clocksd │ ├── .gitignore │ ├── SConscript │ └── clocksd.cc ├── hardware │ ├── .gitignore │ ├── __init__.py │ ├── base.h │ ├── base.py │ ├── hw.h │ ├── pc │ │ ├── __init__.py │ │ ├── hardware.h │ │ └── hardware.py │ └── tici │ │ ├── __init__.py │ │ ├── agnos.json │ │ ├── agnos.py │ │ ├── amplifier.py │ │ ├── casync.py │ │ ├── hardware.h │ │ ├── hardware.py │ │ ├── iwlist.py │ │ ├── pins.py │ │ ├── power_draw_test.py │ │ ├── power_monitor.py │ │ ├── precise_power_measure.py │ │ ├── restart_modem.sh │ │ ├── test_agnos_updater.py │ │ ├── test_power_draw.py │ │ ├── tests │ │ ├── __init__.py │ │ ├── compare_casync_manifest.py │ │ └── test_casync.py │ │ └── updater ├── logcatd │ ├── .gitignore │ ├── SConscript │ └── logcatd_systemd.cc ├── logmessaged.py ├── micd.py ├── proclogd │ ├── SConscript │ ├── main.cc │ ├── proclog.cc │ ├── proclog.h │ └── tests │ │ ├── .gitignore │ │ └── test_proclog.cc ├── swaglog.py ├── timezoned.py └── version.py ├── third_party ├── SConscript ├── acados │ ├── .gitignore │ ├── Darwin │ │ ├── lib │ │ │ ├── libacados.dylib │ │ │ ├── libblasfeo.dylib │ │ │ ├── libhpipm.dylib │ │ │ ├── libqpOASES_e.3.1.dylib │ │ │ └── libqpOASES_e.dylib │ │ └── t_renderer │ ├── build.sh │ ├── include │ │ ├── acados │ │ │ ├── dense_qp │ │ │ │ ├── dense_qp_common.h │ │ │ │ ├── dense_qp_hpipm.h │ │ │ │ ├── dense_qp_ooqp.h │ │ │ │ ├── dense_qp_qore.h │ │ │ │ └── dense_qp_qpoases.h │ │ │ ├── ocp_nlp │ │ │ │ ├── ocp_nlp_common.h │ │ │ │ ├── ocp_nlp_constraints_bgh.h │ │ │ │ ├── ocp_nlp_constraints_bgp.h │ │ │ │ ├── ocp_nlp_constraints_common.h │ │ │ │ ├── ocp_nlp_cost_common.h │ │ │ │ ├── ocp_nlp_cost_external.h │ │ │ │ ├── ocp_nlp_cost_ls.h │ │ │ │ ├── ocp_nlp_cost_nls.h │ │ │ │ ├── ocp_nlp_dynamics_common.h │ │ │ │ ├── ocp_nlp_dynamics_cont.h │ │ │ │ ├── ocp_nlp_dynamics_disc.h │ │ │ │ ├── ocp_nlp_reg_common.h │ │ │ │ ├── ocp_nlp_reg_convexify.h │ │ │ │ ├── ocp_nlp_reg_mirror.h │ │ │ │ ├── ocp_nlp_reg_noreg.h │ │ │ │ ├── ocp_nlp_reg_project.h │ │ │ │ ├── ocp_nlp_reg_project_reduc_hess.h │ │ │ │ ├── ocp_nlp_sqp.h │ │ │ │ └── ocp_nlp_sqp_rti.h │ │ │ ├── ocp_qp │ │ │ │ ├── ocp_qp_common.h │ │ │ │ ├── ocp_qp_common_frontend.h │ │ │ │ ├── ocp_qp_full_condensing.h │ │ │ │ ├── ocp_qp_hpipm.h │ │ │ │ ├── ocp_qp_hpmpc.h │ │ │ │ ├── ocp_qp_ooqp.h │ │ │ │ ├── ocp_qp_osqp.h │ │ │ │ ├── ocp_qp_partial_condensing.h │ │ │ │ ├── ocp_qp_qpdunes.h │ │ │ │ └── ocp_qp_xcond_solver.h │ │ │ ├── sim │ │ │ │ ├── sim_collocation_utils.h │ │ │ │ ├── sim_common.h │ │ │ │ ├── sim_erk_integrator.h │ │ │ │ ├── sim_gnsf.h │ │ │ │ ├── sim_irk_integrator.h │ │ │ │ └── sim_lifted_irk_integrator.h │ │ │ └── utils │ │ │ │ ├── external_function_generic.h │ │ │ │ ├── math.h │ │ │ │ ├── mem.h │ │ │ │ ├── print.h │ │ │ │ ├── strsep.h │ │ │ │ ├── timing.h │ │ │ │ └── types.h │ │ ├── acados_c │ │ │ ├── condensing_interface.h │ │ │ ├── dense_qp_interface.h │ │ │ ├── external_function_interface.h │ │ │ ├── ocp_nlp_interface.h │ │ │ ├── ocp_qp_interface.h │ │ │ └── sim_interface.h │ │ ├── blasfeo │ │ │ └── include │ │ │ │ ├── blasfeo.h │ │ │ │ ├── blasfeo_block_size.h │ │ │ │ ├── blasfeo_common.h │ │ │ │ ├── blasfeo_d_aux.h │ │ │ │ ├── blasfeo_d_aux_ext_dep.h │ │ │ │ ├── blasfeo_d_aux_ext_dep_ref.h │ │ │ │ ├── blasfeo_d_aux_old.h │ │ │ │ ├── blasfeo_d_aux_ref.h │ │ │ │ ├── blasfeo_d_aux_test.h │ │ │ │ ├── blasfeo_d_blas.h │ │ │ │ ├── blasfeo_d_blas_api.h │ │ │ │ ├── blasfeo_d_blasfeo_api.h │ │ │ │ ├── blasfeo_d_blasfeo_api_ref.h │ │ │ │ ├── blasfeo_d_blasfeo_hp_api.h │ │ │ │ ├── blasfeo_d_blasfeo_ref_api.h │ │ │ │ ├── blasfeo_d_kernel.h │ │ │ │ ├── blasfeo_i_aux_ext_dep.h │ │ │ │ ├── blasfeo_m_aux.h │ │ │ │ ├── blasfeo_memory.h │ │ │ │ ├── blasfeo_naming.h │ │ │ │ ├── blasfeo_processor_features.h │ │ │ │ ├── blasfeo_s_aux.h │ │ │ │ ├── blasfeo_s_aux_ext_dep.h │ │ │ │ ├── blasfeo_s_aux_ext_dep_ref.h │ │ │ │ ├── blasfeo_s_aux_old.h │ │ │ │ ├── blasfeo_s_aux_ref.h │ │ │ │ ├── blasfeo_s_aux_test.h │ │ │ │ ├── blasfeo_s_blas.h │ │ │ │ ├── blasfeo_s_blas_api.h │ │ │ │ ├── blasfeo_s_blasfeo_api.h │ │ │ │ ├── blasfeo_s_blasfeo_api_ref.h │ │ │ │ ├── blasfeo_s_blasfeo_ref_api.h │ │ │ │ ├── blasfeo_s_kernel.h │ │ │ │ ├── blasfeo_stdlib.h │ │ │ │ ├── blasfeo_target.h │ │ │ │ ├── blasfeo_timing.h │ │ │ │ ├── blasfeo_v_aux_ext_dep.h │ │ │ │ ├── d_blas.h │ │ │ │ ├── d_blas_64.h │ │ │ │ ├── s_blas.h │ │ │ │ └── s_blas_64.h │ │ ├── hpipm │ │ │ └── include │ │ │ │ ├── hpipm_aux_mem.h │ │ │ │ ├── hpipm_aux_string.h │ │ │ │ ├── hpipm_common.h │ │ │ │ ├── hpipm_d_cast_qcqp.h │ │ │ │ ├── hpipm_d_cond.h │ │ │ │ ├── hpipm_d_cond_aux.h │ │ │ │ ├── hpipm_d_cond_qcqp.h │ │ │ │ ├── hpipm_d_core_qp_ipm.h │ │ │ │ ├── hpipm_d_core_qp_ipm_aux.h │ │ │ │ ├── hpipm_d_dense_qcqp.h │ │ │ │ ├── hpipm_d_dense_qcqp_dim.h │ │ │ │ ├── hpipm_d_dense_qcqp_ipm.h │ │ │ │ ├── hpipm_d_dense_qcqp_res.h │ │ │ │ ├── hpipm_d_dense_qcqp_sol.h │ │ │ │ ├── hpipm_d_dense_qcqp_utils.h │ │ │ │ ├── hpipm_d_dense_qp.h │ │ │ │ ├── hpipm_d_dense_qp_dim.h │ │ │ │ ├── hpipm_d_dense_qp_ipm.h │ │ │ │ ├── hpipm_d_dense_qp_kkt.h │ │ │ │ ├── hpipm_d_dense_qp_res.h │ │ │ │ ├── hpipm_d_dense_qp_sol.h │ │ │ │ ├── hpipm_d_dense_qp_utils.h │ │ │ │ ├── hpipm_d_ocp_qcqp.h │ │ │ │ ├── hpipm_d_ocp_qcqp_dim.h │ │ │ │ ├── hpipm_d_ocp_qcqp_ipm.h │ │ │ │ ├── hpipm_d_ocp_qcqp_res.h │ │ │ │ ├── hpipm_d_ocp_qcqp_sol.h │ │ │ │ ├── hpipm_d_ocp_qcqp_utils.h │ │ │ │ ├── hpipm_d_ocp_qp.h │ │ │ │ ├── hpipm_d_ocp_qp_dim.h │ │ │ │ ├── hpipm_d_ocp_qp_ipm.h │ │ │ │ ├── hpipm_d_ocp_qp_kkt.h │ │ │ │ ├── hpipm_d_ocp_qp_red.h │ │ │ │ ├── hpipm_d_ocp_qp_res.h │ │ │ │ ├── hpipm_d_ocp_qp_sol.h │ │ │ │ ├── hpipm_d_ocp_qp_utils.h │ │ │ │ ├── hpipm_d_part_cond.h │ │ │ │ ├── hpipm_d_part_cond_qcqp.h │ │ │ │ ├── hpipm_d_sim_erk.h │ │ │ │ ├── hpipm_d_sim_rk.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp_dim.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp_ipm.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp_res.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp_sol.h │ │ │ │ ├── hpipm_d_tree_ocp_qcqp_utils.h │ │ │ │ ├── hpipm_d_tree_ocp_qp.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_dim.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_ipm.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_kkt.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_res.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_sol.h │ │ │ │ ├── hpipm_d_tree_ocp_qp_utils.h │ │ │ │ ├── hpipm_m_dense_qp.h │ │ │ │ ├── hpipm_m_dense_qp_dim.h │ │ │ │ ├── hpipm_m_ocp_qp.h │ │ │ │ ├── hpipm_m_ocp_qp_ipm_hard.h │ │ │ │ ├── hpipm_m_ocp_qp_kkt.h │ │ │ │ ├── hpipm_s_cast_qcqp.h │ │ │ │ ├── hpipm_s_cond.h │ │ │ │ ├── hpipm_s_cond_aux.h │ │ │ │ ├── hpipm_s_cond_qcqp.h │ │ │ │ ├── hpipm_s_core_qp_ipm.h │ │ │ │ ├── hpipm_s_core_qp_ipm_aux.h │ │ │ │ ├── hpipm_s_dense_qcqp.h │ │ │ │ ├── hpipm_s_dense_qcqp_dim.h │ │ │ │ ├── hpipm_s_dense_qcqp_ipm.h │ │ │ │ ├── hpipm_s_dense_qcqp_res.h │ │ │ │ ├── hpipm_s_dense_qcqp_sol.h │ │ │ │ ├── hpipm_s_dense_qcqp_utils.h │ │ │ │ ├── hpipm_s_dense_qp.h │ │ │ │ ├── hpipm_s_dense_qp_dim.h │ │ │ │ ├── hpipm_s_dense_qp_ipm.h │ │ │ │ ├── hpipm_s_dense_qp_kkt.h │ │ │ │ ├── hpipm_s_dense_qp_res.h │ │ │ │ ├── hpipm_s_dense_qp_sol.h │ │ │ │ ├── hpipm_s_dense_qp_utils.h │ │ │ │ ├── hpipm_s_ocp_qcqp.h │ │ │ │ ├── hpipm_s_ocp_qcqp_dim.h │ │ │ │ ├── hpipm_s_ocp_qcqp_ipm.h │ │ │ │ ├── hpipm_s_ocp_qcqp_res.h │ │ │ │ ├── hpipm_s_ocp_qcqp_sol.h │ │ │ │ ├── hpipm_s_ocp_qcqp_utils.h │ │ │ │ ├── hpipm_s_ocp_qp.h │ │ │ │ ├── hpipm_s_ocp_qp_dim.h │ │ │ │ ├── hpipm_s_ocp_qp_ipm.h │ │ │ │ ├── hpipm_s_ocp_qp_kkt.h │ │ │ │ ├── hpipm_s_ocp_qp_red.h │ │ │ │ ├── hpipm_s_ocp_qp_res.h │ │ │ │ ├── hpipm_s_ocp_qp_sol.h │ │ │ │ ├── hpipm_s_ocp_qp_utils.h │ │ │ │ ├── hpipm_s_part_cond.h │ │ │ │ ├── hpipm_s_part_cond_qcqp.h │ │ │ │ ├── hpipm_s_sim_erk.h │ │ │ │ ├── hpipm_s_sim_rk.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp_dim.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp_ipm.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp_res.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp_sol.h │ │ │ │ ├── hpipm_s_tree_ocp_qcqp_utils.h │ │ │ │ ├── hpipm_s_tree_ocp_qp.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_dim.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_ipm.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_kkt.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_res.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_sol.h │ │ │ │ ├── hpipm_s_tree_ocp_qp_utils.h │ │ │ │ ├── hpipm_scenario_tree.h │ │ │ │ ├── hpipm_timing.h │ │ │ │ └── hpipm_tree.h │ │ └── qpOASES_e │ │ │ ├── Bounds.h │ │ │ ├── Constants.h │ │ │ ├── ConstraintProduct.h │ │ │ ├── Constraints.h │ │ │ ├── Flipper.h │ │ │ ├── Indexlist.h │ │ │ ├── Matrices.h │ │ │ ├── MessageHandling.h │ │ │ ├── Options.h │ │ │ ├── QProblem.h │ │ │ ├── QProblemB.h │ │ │ ├── Types.h │ │ │ ├── UnitTesting.h │ │ │ ├── Utils.h │ │ │ └── extras │ │ │ └── OQPinterface.h │ ├── larch64 │ │ ├── lib │ │ │ ├── libacados.so │ │ │ ├── libblasfeo.so │ │ │ ├── libhpipm.so │ │ │ ├── libqpOASES_e.so │ │ │ └── libqpOASES_e.so.3.1 │ │ └── t_renderer │ └── x86_64 │ │ ├── lib │ │ ├── libacados.so │ │ ├── libblasfeo.so │ │ ├── libhpipm.so │ │ ├── libqpOASES_e.so │ │ └── libqpOASES_e.so.3.1 │ │ └── t_renderer ├── catch2 │ └── include │ │ └── catch2 │ │ ├── catch.hpp │ │ ├── catch_reporter_automake.hpp │ │ ├── catch_reporter_sonarqube.hpp │ │ ├── catch_reporter_tap.hpp │ │ └── catch_reporter_teamcity.hpp ├── curl │ ├── build.txt │ ├── include │ │ ├── Makefile.am │ │ ├── README │ │ └── curl │ │ │ ├── .gitignore │ │ │ ├── Makefile.am │ │ │ ├── curl.h │ │ │ ├── curlbuild.h │ │ │ ├── curlbuild.h.cmake │ │ │ ├── curlbuild.h.dist │ │ │ ├── curlbuild.h.in │ │ │ ├── curlrules.h │ │ │ ├── curlver.h │ │ │ ├── easy.h │ │ │ ├── mprintf.h │ │ │ ├── multi.h │ │ │ ├── stdcheaders.h │ │ │ └── typecheck-gcc.h │ └── lib │ │ └── libcurl.a ├── json11 │ ├── json11.cpp │ └── json11.hpp ├── kaitai │ ├── custom_decoder.h │ ├── exceptions.h │ ├── kaitaistream.cpp │ ├── kaitaistream.h │ └── kaitaistruct.h ├── libyuv │ ├── LICENSE │ ├── LICENSE.libyuv │ ├── build.txt │ ├── include │ │ ├── libyuv.h │ │ └── libyuv │ │ │ ├── basic_types.h │ │ │ ├── compare.h │ │ │ ├── compare_row.h │ │ │ ├── convert.h │ │ │ ├── convert_argb.h │ │ │ ├── convert_from.h │ │ │ ├── convert_from_argb.h │ │ │ ├── cpu_id.h │ │ │ ├── macros_msa.h │ │ │ ├── mjpeg_decoder.h │ │ │ ├── planar_functions.h │ │ │ ├── rotate.h │ │ │ ├── rotate_argb.h │ │ │ ├── rotate_row.h │ │ │ ├── row.h │ │ │ ├── scale.h │ │ │ ├── scale_argb.h │ │ │ ├── scale_row.h │ │ │ ├── version.h │ │ │ └── video_common.h │ ├── larch64 │ │ └── lib │ │ │ └── libyuv.a │ ├── lib │ │ └── libyuv.a │ ├── mac │ │ └── lib │ │ │ └── libyuv.a │ ├── mac_arm64 │ │ └── lib │ │ │ └── libyuv.a │ └── x64 │ │ ├── include │ │ └── lib │ │ └── libyuv.a ├── linux │ └── include │ │ ├── linux │ │ └── ion.h │ │ ├── msm_ion.h │ │ ├── msm_media_info.h │ │ └── v4l2-controls.h ├── mapbox-gl-native-qt │ ├── .gitattributes │ ├── build.sh │ ├── include │ │ ├── QMapbox │ │ ├── QMapboxGL │ │ ├── qmapbox.hpp │ │ └── qmapboxgl.hpp │ └── x86_64 │ │ └── libqmapboxgl.so ├── opencl │ └── include │ │ └── CL │ │ ├── cl.h │ │ ├── cl_d3d10.h │ │ ├── cl_d3d11.h │ │ ├── cl_dx9_media_sharing.h │ │ ├── cl_egl.h │ │ ├── cl_ext.h │ │ ├── cl_ext_qcom.h │ │ ├── cl_gl.h │ │ ├── cl_gl_ext.h │ │ ├── cl_platform.h │ │ └── opencl.h ├── qrcode │ ├── QrCode.cc │ └── QrCode.hpp ├── qt5 │ └── larch64 │ │ └── bin │ │ ├── lrelease │ │ └── lupdate └── snpe │ ├── aarch64-ubuntu-gcc7.5 │ ├── libPlatformValidatorShared.so │ ├── libSNPE.so │ ├── libcalculator.so │ ├── libhta.so │ └── libsnpe_dsp_domains_v2.so │ ├── dsp │ ├── libcalculator_skel.so │ ├── libsnpe_dsp_v65_domains_v2_skel.so │ ├── libsnpe_dsp_v66_domains_v2_skel.so │ └── libsnpe_dsp_v68_domains_v3_skel.so │ ├── include │ ├── DiagLog │ │ ├── IDiagLog.hpp │ │ └── Options.hpp │ ├── DlContainer │ │ └── IDlContainer.hpp │ ├── DlSystem │ │ ├── DlEnums.hpp │ │ ├── DlError.hpp │ │ ├── DlOptional.hpp │ │ ├── DlVersion.hpp │ │ ├── IBufferAttributes.hpp │ │ ├── IOBufferDataTypeMap.hpp │ │ ├── ITensor.hpp │ │ ├── ITensorFactory.hpp │ │ ├── ITensorItr.hpp │ │ ├── ITensorItrImpl.hpp │ │ ├── IUDL.hpp │ │ ├── IUserBuffer.hpp │ │ ├── IUserBufferFactory.hpp │ │ ├── PlatformConfig.hpp │ │ ├── RuntimeList.hpp │ │ ├── String.hpp │ │ ├── StringList.hpp │ │ ├── TensorMap.hpp │ │ ├── TensorShape.hpp │ │ ├── TensorShapeMap.hpp │ │ ├── UDLContext.hpp │ │ ├── UDLFunc.hpp │ │ ├── UserBufferMap.hpp │ │ ├── UserMemoryMap.hpp │ │ └── ZdlExportDefine.hpp │ ├── PlatformValidator │ │ └── PlatformValidator.hpp │ ├── SNPE │ │ ├── ApplicationBufferMap.hpp │ │ ├── PSNPE.hpp │ │ ├── RuntimeConfigList.hpp │ │ ├── SNPE.hpp │ │ ├── SNPEBuilder.hpp │ │ ├── SNPEFactory.hpp │ │ └── UserBufferList.hpp │ └── SnpeUdo │ │ ├── UdoBase.h │ │ ├── UdoImpl.h │ │ ├── UdoImplCpu.h │ │ ├── UdoImplDsp.h │ │ ├── UdoImplGpu.h │ │ ├── UdoReg.h │ │ └── UdoShared.h │ ├── larch64 │ ├── x86_64 │ └── x86_64-linux-clang │ ├── libHtpPrepare.so │ ├── libSNPE.so │ └── libomp.so ├── tinygrad ├── tools ├── CTF.md ├── README.md ├── __init__.py ├── cabana │ ├── .gitignore │ ├── README.md │ ├── SConscript │ ├── binaryview.cc │ ├── binaryview.h │ ├── cabana │ ├── cabana.cc │ ├── canmessages.cc │ ├── canmessages.h │ ├── chartswidget.cc │ ├── chartswidget.h │ ├── commands.cc │ ├── commands.h │ ├── dbcmanager.cc │ ├── dbcmanager.h │ ├── detailwidget.cc │ ├── detailwidget.h │ ├── generate_dbc_json.py │ ├── historylog.cc │ ├── historylog.h │ ├── mainwin.cc │ ├── mainwin.h │ ├── messageswidget.cc │ ├── messageswidget.h │ ├── settings.cc │ ├── settings.h │ ├── signaledit.cc │ ├── signaledit.h │ ├── tests │ │ ├── test_cabana │ │ ├── test_cabana.cc │ │ └── test_runner.cc │ ├── videowidget.cc │ └── videowidget.h ├── camerastream │ ├── compressed_vipc.py │ └── receive.py ├── gpstest │ ├── .gitignore │ ├── README.md │ ├── fuzzy_testing.py │ ├── patches │ │ ├── hackrf.patch │ │ ├── limeGPS │ │ │ ├── inc_ephem_array_size.patch │ │ │ └── makefile.patch │ │ └── limeSuite │ │ │ ├── mcu_error.patch │ │ │ └── reference_print.patch │ ├── remote_checker.py │ ├── run_unittest.sh │ ├── setup.sh │ ├── setup_hackrf.sh │ ├── simulate_gps_signal.py │ ├── test_gps.py │ └── test_gps_qcom.py ├── joystick │ ├── README.md │ ├── joystickd.py │ ├── steer.gif │ └── web.py ├── latencylogger │ ├── README.md │ └── latency_logger.py ├── lib │ ├── README.md │ ├── __init__.py │ ├── api.py │ ├── auth.py │ ├── auth_config.py │ ├── bootlog.py │ ├── cache.py │ ├── exceptions.py │ ├── filereader.py │ ├── framereader.py │ ├── helpers.py │ ├── kbhit.py │ ├── logreader.py │ ├── route.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_caching.py │ │ ├── test_readers.py │ │ └── test_route_library.py │ ├── url_file.py │ └── vidindex │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── bitstream.c │ │ ├── bitstream.h │ │ └── vidindex.c ├── mac_setup.sh ├── openpilot_env.sh ├── plotjuggler │ ├── .gitignore │ ├── README.md │ ├── juggle.py │ ├── layouts │ │ ├── controls_mismatch_debug.xml │ │ ├── demo.xml │ │ ├── longitudinal.xml │ │ ├── max-torque-debug.xml │ │ ├── system_lag_debug.xml │ │ ├── thermal_debug.xml │ │ ├── torque-controller.xml │ │ └── tuning.xml │ └── test_plotjuggler.py ├── replay │ ├── .gitignore │ ├── README.md │ ├── SConscript │ ├── __init__.py │ ├── camera.cc │ ├── camera.h │ ├── can_replay.py │ ├── consoleui.cc │ ├── consoleui.h │ ├── filereader.cc │ ├── filereader.h │ ├── framereader.cc │ ├── framereader.h │ ├── lib │ │ ├── __init__.py │ │ └── ui_helpers.py │ ├── logreader.cc │ ├── logreader.h │ ├── main.cc │ ├── replay.cc │ ├── replay.h │ ├── route.cc │ ├── route.h │ ├── tests │ │ ├── test_replay.cc │ │ └── test_runner.cc │ ├── ui.py │ ├── unlog_ci_segment.py │ ├── util.cc │ └── util.h ├── scripts │ ├── fetch_image_from_route.py │ ├── save_ubloxraw_stream.py │ └── setup_ssh_keys.py ├── serial │ ├── README.md │ └── connect.sh ├── sim │ ├── Dockerfile.sim │ ├── Dockerfile.sim_nvidia │ ├── README.md │ ├── __init__.py │ ├── bridge.py │ ├── build_container.sh │ ├── launch_openpilot.sh │ ├── lib │ │ ├── __init__.py │ │ ├── can.py │ │ ├── keyboard_ctrl.py │ │ └── manual_ctrl.py │ ├── rgb_to_nv12.cl │ ├── start_carla.sh │ ├── start_openpilot_docker.sh │ ├── tests │ │ ├── __init__.py │ │ └── test_carla_integration.py │ └── tmux_script.sh ├── ssh │ ├── README.md │ └── id_rsa ├── tuning │ └── measure_steering_accuracy.py ├── ubuntu_setup.sh ├── webcam │ ├── Dockerfile │ ├── README.md │ ├── front_mount_helper.py │ └── warp_vis.py └── zookeeper │ ├── __init__.py │ ├── check_consumption.py │ ├── disable.py │ ├── enable_and_wait.py │ ├── ignition.py │ ├── power_monitor.py │ └── test_zookeeper.py └── update_requirements.sh /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: ' 3 | bugprone-*, 4 | -bugprone-integer-division, 5 | -bugprone-narrowing-conversions, 6 | performance-*, 7 | clang-analyzer-*, 8 | misc-*, 9 | -misc-unused-parameters, 10 | modernize-*, 11 | -modernize-avoid-c-arrays, 12 | -modernize-deprecated-headers, 13 | -modernize-use-auto, 14 | -modernize-use-using, 15 | -modernize-use-nullptr, 16 | -modernize-use-trailing-return-type, 17 | ' 18 | CheckOptions: 19 | ... 20 | -------------------------------------------------------------------------------- /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((c++-mode (flycheck-gcc-language-standard . "c++11") 2 | (flycheck-clang-language-standard . "c++11") 3 | )) 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | .DS_Store 3 | *.dylib 4 | *.DSYM 5 | *.d 6 | *.pyc 7 | *.pyo 8 | .*.swp 9 | .*.swo 10 | .*.un~ 11 | *.tmp 12 | *.o 13 | *.o-* 14 | *.os 15 | *.os-* 16 | *.so 17 | *.a 18 | 19 | notebooks 20 | phone 21 | massivemap 22 | neos 23 | installer 24 | chffr/app2 25 | chffr/backend/env 26 | selfdrive/nav 27 | selfdrive/baseui 28 | chffr/lib/vidindex/vidindex 29 | selfdrive/test/simulator2 30 | **/cache_data 31 | xx/chffr/lib/vidindex/vidindex 32 | xx/plus 33 | xx/community 34 | xx/projects 35 | !xx/projects/eon_testing_master 36 | !xx/projects/map3d 37 | xx/ops 38 | xx/junk 39 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | 8 | [{*.py, *.pyx, *.pxd}] 9 | charset = utf-8 10 | indent_style = space 11 | indent_size = 2 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.dlc filter=lfs diff=lfs merge=lfs -text 2 | *.onnx filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Report model bugs 4 | url: https://github.com/commaai/openpilot/discussions/categories/model-feedback 5 | about: Provide feedback for the driving or driver monitoring models 6 | - name: Discussions 7 | url: https://github.com/commaai/openpilot/discussions 8 | about: For questions and general discussion about openpilot 9 | - name: Community Wiki 10 | url: https://github.com/commaai/openpilot/wiki 11 | about: Check out our community wiki 12 | - name: Community Discord 13 | url: https://discord.comma.ai 14 | about: Check out our community discord 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement 3 | about: For openpilot enhancement suggestions 4 | title: '' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/bugfix.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug fix 3 | about: For openpilot bug fixes 4 | title: '' 5 | labels: 'bugfix' 6 | assignees: '' 7 | --- 8 | 9 | **Description** 10 | 11 | 12 | 13 | **Verification** 14 | 15 | 16 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/car_bugfix.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Car Bug fix 3 | about: For vehicle/brand specific bug fixes 4 | title: '' 5 | labels: 'car bug fix' 6 | assignees: '' 7 | --- 8 | 9 | **Description** 10 | 11 | 12 | 13 | **Verification** 14 | 15 | 16 | 17 | **Route** 18 | 19 | Route: [a route with the bug fix] 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/car_port.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Car port 3 | about: For new car ports 4 | title: '' 5 | labels: 'car port' 6 | assignees: '' 7 | --- 8 | 9 | **Checklist** 10 | 11 | - [ ] added to README 12 | - [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py) 13 | - [ ] route with openpilot: 14 | - [ ] route with stock system: 15 | - [ ] car harness used (if comma doesn't sell it, put N/A): 16 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/fingerprint.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Fingerprint 3 | about: For adding fingerprints to existing cars 4 | title: '' 5 | labels: 'fingerprint' 6 | assignees: '' 7 | --- 8 | 9 | Discord username: [] 10 | 11 | Route: [] 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/refactor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Refactor 3 | about: For code refactors 4 | title: '' 5 | labels: 'refactor' 6 | assignees: '' 7 | --- 8 | 9 | **Description** 10 | 11 | 12 | 13 | **Verification** 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "panda"] 2 | path = panda 3 | url = ../../commaai/panda.git 4 | [submodule "opendbc"] 5 | path = opendbc 6 | url = ../../commaai/opendbc.git 7 | [submodule "laika_repo"] 8 | path = laika_repo 9 | url = ../../commaai/laika.git 10 | [submodule "cereal"] 11 | path = cereal 12 | url = ../../commaai/cereal.git 13 | [submodule "rednose_repo"] 14 | path = rednose_repo 15 | url = ../../commaai/rednose.git 16 | [submodule "body"] 17 | path = body 18 | url = ../../commaai/body.git 19 | [submodule "tinygrad"] 20 | path = tinygrad_repo 21 | url = https://github.com/geohot/tinygrad.git 22 | -------------------------------------------------------------------------------- /.lfsconfig: -------------------------------------------------------------------------------- 1 | [lfs] 2 | url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs 3 | pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git 4 | locksverify = false 5 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.8.10 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 已做注释的文件 2 | 3 | [lateral_planner.py](selfdrive/controls/lib/lateral_planner.py) 4 | 5 | [lat_mpc.py](selfdrive/controls/lib/lateral_mpc_lib/lat_mpc.py) 6 | 7 | [longitudinal_planner.py](selfdrive/controls/lib/longitudinal_planner.py) 8 | 9 | [long_mpc.py](selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py) 10 | 11 | [radard.py](selfdrive/controls/radard.py) 12 | 13 | [longcontrol.py](selfdrive/controls/lib/longcontrol.py) 14 | 15 | [pid.py](selfdrive/controls/lib/pid.py) 16 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Suspected vulnerabilities can be reported to both `adeeb@comma.ai` and `security@comma.ai`. 6 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | comment: false 2 | coverage: 3 | status: 4 | project: 5 | default: 6 | informational: true 7 | patch: off 8 | 9 | -------------------------------------------------------------------------------- /common/.gitignore: -------------------------------------------------------------------------------- 1 | *.cpp 2 | -------------------------------------------------------------------------------- /common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/__init__.py -------------------------------------------------------------------------------- /common/basedir.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pathlib import Path 3 | 4 | from system.hardware import PC 5 | 6 | BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../")) 7 | 8 | if PC: 9 | PERSIST = os.path.join(str(Path.home()), ".comma", "persist") 10 | else: 11 | PERSIST = "/persist" 12 | -------------------------------------------------------------------------------- /common/clock.pyx: -------------------------------------------------------------------------------- 1 | # distutils: language = c++ 2 | # cython: language_level = 3 3 | from posix.time cimport clock_gettime, timespec, CLOCK_MONOTONIC_RAW, clockid_t 4 | 5 | IF UNAME_SYSNAME == "Darwin": 6 | # Darwin doesn't have a CLOCK_BOOTTIME 7 | CLOCK_BOOTTIME = CLOCK_MONOTONIC_RAW 8 | ELSE: 9 | from posix.time cimport CLOCK_BOOTTIME 10 | 11 | cdef double readclock(clockid_t clock_id): 12 | cdef timespec ts 13 | cdef double current 14 | 15 | clock_gettime(clock_id, &ts) 16 | current = ts.tv_sec + (ts.tv_nsec / 1000000000.) 17 | return current 18 | 19 | def monotonic_time(): 20 | return readclock(CLOCK_MONOTONIC_RAW) 21 | 22 | def sec_since_boot(): 23 | return readclock(CLOCK_BOOTTIME) 24 | 25 | -------------------------------------------------------------------------------- /common/conversions.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | class Conversions: 4 | # Speed 5 | MPH_TO_KPH = 1.609344 6 | KPH_TO_MPH = 1. / MPH_TO_KPH 7 | MS_TO_KPH = 3.6 8 | KPH_TO_MS = 1. / MS_TO_KPH 9 | MS_TO_MPH = MS_TO_KPH * KPH_TO_MPH 10 | MPH_TO_MS = MPH_TO_KPH * KPH_TO_MS 11 | MS_TO_KNOTS = 1.9438 12 | KNOTS_TO_MS = 1. / MS_TO_KNOTS 13 | 14 | # Angle 15 | DEG_TO_RAD = np.pi / 180. 16 | RAD_TO_DEG = 1. / DEG_TO_RAD 17 | 18 | # Mass 19 | LB_TO_KG = 0.453592 20 | -------------------------------------------------------------------------------- /common/dict_helpers.py: -------------------------------------------------------------------------------- 1 | # remove all keys that end in DEPRECATED 2 | def strip_deprecated_keys(d): 3 | for k in list(d.keys()): 4 | if isinstance(k, str): 5 | if k.endswith('DEPRECATED'): 6 | d.pop(k) 7 | elif isinstance(d[k], dict): 8 | strip_deprecated_keys(d[k]) 9 | return d 10 | -------------------------------------------------------------------------------- /common/filter_simple.py: -------------------------------------------------------------------------------- 1 | class FirstOrderFilter: 2 | # first order filter 3 | def __init__(self, x0, rc, dt, initialized=True): 4 | self.x = x0 5 | self.dt = dt 6 | self.update_alpha(rc) 7 | self.initialized = initialized 8 | 9 | def update_alpha(self, rc): 10 | self.alpha = self.dt / (rc + self.dt) 11 | 12 | def update(self, x): 13 | if self.initialized: 14 | self.x = (1. - self.alpha) * self.x + self.alpha * x 15 | else: 16 | self.initialized = True 17 | self.x = x 18 | return self.x 19 | -------------------------------------------------------------------------------- /common/i2c.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | class I2CBus { 8 | private: 9 | int i2c_fd; 10 | 11 | public: 12 | I2CBus(uint8_t bus_id); 13 | ~I2CBus(); 14 | 15 | int read_register(uint8_t device_address, uint register_address, uint8_t *buffer, uint8_t len); 16 | int set_register(uint8_t device_address, uint register_address, uint8_t data); 17 | }; 18 | -------------------------------------------------------------------------------- /common/kalman/.gitignore: -------------------------------------------------------------------------------- 1 | simple_kalman_impl.c 2 | -------------------------------------------------------------------------------- /common/kalman/SConscript: -------------------------------------------------------------------------------- 1 | Import('envCython') 2 | 3 | envCython.Program('simple_kalman_impl.so', 'simple_kalman_impl.pyx') 4 | -------------------------------------------------------------------------------- /common/kalman/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/kalman/__init__.py -------------------------------------------------------------------------------- /common/kalman/simple_kalman.py: -------------------------------------------------------------------------------- 1 | # pylint: skip-file 2 | from common.kalman.simple_kalman_impl import KF1D as KF1D 3 | assert KF1D 4 | -------------------------------------------------------------------------------- /common/kalman/simple_kalman_impl.pxd: -------------------------------------------------------------------------------- 1 | # cython: language_level = 3 2 | 3 | cdef class KF1D: 4 | cdef public: 5 | double x0_0 6 | double x1_0 7 | double K0_0 8 | double K1_0 9 | double A0_0 10 | double A0_1 11 | double A1_0 12 | double A1_1 13 | double C0_0 14 | double C0_1 15 | double A_K_0 16 | double A_K_1 17 | double A_K_2 18 | double A_K_3 19 | -------------------------------------------------------------------------------- /common/kalman/simple_kalman_old.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | class KF1D: 5 | # this EKF assumes constant covariance matrix, so calculations are much simpler 6 | # the Kalman gain also needs to be precomputed using the control module 7 | 8 | def __init__(self, x0, A, C, K): 9 | self.x = x0 10 | self.A = A 11 | self.C = np.atleast_2d(C) 12 | self.K = K 13 | 14 | self.A_K = self.A - np.dot(self.K, self.C) 15 | 16 | # K matrix needs to be pre-computed as follow: 17 | # import control 18 | # (x, l, K) = control.dare(np.transpose(self.A), np.transpose(self.C), Q, R) 19 | # self.K = np.transpose(K) 20 | 21 | def update(self, meas): 22 | self.x = np.dot(self.A_K, self.x) + np.dot(self.K, meas) 23 | return self.x 24 | -------------------------------------------------------------------------------- /common/kalman/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/kalman/tests/__init__.py -------------------------------------------------------------------------------- /common/lazy_property.py: -------------------------------------------------------------------------------- 1 | class lazy_property(): 2 | """Defines a property whose value will be computed only once and as needed. 3 | 4 | This can only be used on instance methods. 5 | """ 6 | def __init__(self, func): 7 | self._func = func 8 | 9 | def __get__(self, obj_self, cls): 10 | value = self._func(obj_self) 11 | setattr(obj_self, self._func.__name__, value) 12 | return value 13 | -------------------------------------------------------------------------------- /common/numpy_fast.py: -------------------------------------------------------------------------------- 1 | def clip(x, lo, hi): 2 | return max(lo, min(hi, x)) 3 | 4 | def interp(x, xp, fp): 5 | N = len(xp) 6 | 7 | def get_interp(xv): 8 | hi = 0 9 | while hi < N and xv > xp[hi]: 10 | hi += 1 11 | low = hi - 1 12 | return fp[-1] if hi == N and xv > xp[low] else ( 13 | fp[0] if hi == 0 else 14 | (xv - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low]) 15 | 16 | return [get_interp(v) for v in x] if hasattr(x, '__iter__') else get_interp(x) 17 | 18 | def mean(x): 19 | return sum(x) / len(x) 20 | -------------------------------------------------------------------------------- /common/numpy_helpers.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | def deep_interp_np(x, xp, fp, axis=None): 5 | if axis is not None: 6 | fp = fp.swapaxes(0,axis) 7 | x = np.atleast_1d(x) 8 | xp = np.array(xp) 9 | if len(xp) < 2: 10 | return np.repeat(fp, len(x), axis=0) 11 | if min(np.diff(xp)) < 0: 12 | raise RuntimeError('Bad x array for interpolation') 13 | j = np.searchsorted(xp, x) - 1 14 | j = np.clip(j, 0, len(xp)-2) 15 | d = np.divide(x - xp[j], xp[j + 1] - xp[j], out=np.ones_like(x, dtype=np.float64), where=xp[j + 1] - xp[j] != 0) 16 | vals_interp = (fp[j].T*(1 - d)).T + (fp[j + 1].T*d).T 17 | if axis is not None: 18 | vals_interp = vals_interp.swapaxes(0,axis) 19 | if len(vals_interp) == 1: 20 | return vals_interp[0] 21 | else: 22 | return vals_interp 23 | -------------------------------------------------------------------------------- /common/params.py: -------------------------------------------------------------------------------- 1 | from common.params_pyx import Params, ParamKeyType, UnknownKeyName, put_nonblocking, put_bool_nonblocking # pylint: disable=no-name-in-module, import-error 2 | assert Params 3 | assert ParamKeyType 4 | assert UnknownKeyName 5 | assert put_nonblocking 6 | assert put_bool_nonblocking 7 | 8 | if __name__ == "__main__": 9 | import sys 10 | 11 | params = Params() 12 | key = sys.argv[1] 13 | assert params.check_key(key), f"unknown param: {key}" 14 | 15 | if len(sys.argv) == 3: 16 | val = sys.argv[2] 17 | print(f"SET: {key} = {val}") 18 | params.put(key, val) 19 | elif len(sys.argv) == 2: 20 | print(f"GET: {key} = {params.get(key)}") 21 | -------------------------------------------------------------------------------- /common/statlog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define STATLOG_GAUGE "g" 4 | #define STATLOG_SAMPLE "sa" 5 | 6 | void statlog_log(const char* metric_type, const char* metric, int value); 7 | void statlog_log(const char* metric_type, const char* metric, float value); 8 | 9 | #define statlog_gauge(metric, value) statlog_log(STATLOG_GAUGE, metric, value) 10 | #define statlog_sample(metric, value) statlog_log(STATLOG_SAMPLE, metric, value) 11 | -------------------------------------------------------------------------------- /common/tests/.gitignore: -------------------------------------------------------------------------------- 1 | test_util 2 | test_swaglog 3 | -------------------------------------------------------------------------------- /common/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/tests/__init__.py -------------------------------------------------------------------------------- /common/tests/test_file_helpers.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | from uuid import uuid4 4 | 5 | from common.file_helpers import atomic_write_on_fs_tmp 6 | from common.file_helpers import atomic_write_in_dir 7 | 8 | 9 | class TestFileHelpers(unittest.TestCase): 10 | def run_atomic_write_func(self, atomic_write_func): 11 | path = f"/tmp/tmp{uuid4()}" 12 | with atomic_write_func(path) as f: 13 | f.write("test") 14 | 15 | with open(path) as f: 16 | self.assertEqual(f.read(), "test") 17 | os.remove(path) 18 | 19 | def test_atomic_write_on_fs_tmp(self): 20 | self.run_atomic_write_func(atomic_write_on_fs_tmp) 21 | 22 | def test_atomic_write_in_dir(self): 23 | self.run_atomic_write_func(atomic_write_in_dir) 24 | 25 | 26 | if __name__ == "__main__": 27 | unittest.main() 28 | -------------------------------------------------------------------------------- /common/timeout.py: -------------------------------------------------------------------------------- 1 | import signal 2 | 3 | class TimeoutException(Exception): 4 | pass 5 | 6 | class Timeout: 7 | """ 8 | Timeout context manager. 9 | For example this code will raise a TimeoutException: 10 | with Timeout(seconds=5, error_msg="Sleep was too long"): 11 | time.sleep(10) 12 | """ 13 | def __init__(self, seconds, error_msg=None): 14 | if error_msg is None: 15 | error_msg = f'Timed out after {seconds} seconds' 16 | self.seconds = seconds 17 | self.error_msg = error_msg 18 | 19 | def handle_timeout(self, signume, frame): 20 | raise TimeoutException(self.error_msg) 21 | 22 | def __enter__(self): 23 | signal.signal(signal.SIGALRM, self.handle_timeout) 24 | signal.alarm(self.seconds) 25 | 26 | def __exit__(self, exc_type, exc_val, exc_tb): 27 | signal.alarm(0) 28 | -------------------------------------------------------------------------------- /common/transformations/.gitignore: -------------------------------------------------------------------------------- 1 | transformations 2 | transformations.cpp 3 | -------------------------------------------------------------------------------- /common/transformations/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'envCython') 2 | 3 | transformations = env.Library('transformations', ['orientation.cc', 'coordinates.cc']) 4 | Export('transformations') 5 | 6 | envCython.Program('transformations.so', 'transformations.pyx') 7 | -------------------------------------------------------------------------------- /common/transformations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/transformations/__init__.py -------------------------------------------------------------------------------- /common/transformations/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/common/transformations/tests/__init__.py -------------------------------------------------------------------------------- /common/version.h: -------------------------------------------------------------------------------- 1 | #define COMMA_VERSION "0.9.1" 2 | -------------------------------------------------------------------------------- /common/watchdog.cc: -------------------------------------------------------------------------------- 1 | #include "common/watchdog.h" 2 | #include "common/util.h" 3 | 4 | const std::string watchdog_fn_prefix = "/dev/shm/wd_"; // + 5 | 6 | bool watchdog_kick(uint64_t ts) { 7 | static std::string fn = watchdog_fn_prefix + std::to_string(getpid()); 8 | return util::write_file(fn.c_str(), &ts, sizeof(ts), O_WRONLY | O_CREAT) > 0; 9 | } 10 | -------------------------------------------------------------------------------- /common/watchdog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | bool watchdog_kick(uint64_t ts); 6 | -------------------------------------------------------------------------------- /docs/INTEGRATION.md: -------------------------------------------------------------------------------- 1 | # Integration with Stock Features 2 | 3 | In all supported cars: 4 | * Stock Lane Keep Assist (LKA) and stock ALC are replaced by openpilot ALC, which only functions when openpilot is engaged by the user. 5 | * Stock LDW is replaced by openpilot LDW. 6 | 7 | Additionally, on specific supported cars (see ACC column in [supported cars](CARS.md)): 8 | * Stock ACC is replaced by openpilot ACC. 9 | * openpilot FCW operates in addition to stock FCW. 10 | 11 | openpilot should preserve all other vehicle's stock features, including, but not limited to: FCW, Automatic Emergency Braking (AEB), auto high-beam, blind spot warning, and side collision warning. 12 | -------------------------------------------------------------------------------- /docs/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/docs/_static/favicon.ico -------------------------------------------------------------------------------- /docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/docs/_static/logo.png -------------------------------------------------------------------------------- /docs/_static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Sitemap: https://docs.comma.ai/sitemap.xml -------------------------------------------------------------------------------- /docs/docker/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | server_name localhost; 5 | 6 | gzip on; 7 | gzip_types text/html text/plain text/css text/xml text/javascript application/javascript application/x-javascript; 8 | gzip_min_length 1024; 9 | gzip_vary on; 10 | 11 | root /usr/share/nginx/html; 12 | location / { 13 | try_files $uri $uri/ /index.html; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # openpilot Documentation 2 | 3 | ```{include} README.md 4 | ``` 5 | 6 | ```{toctree} 7 | :caption: 'General' 8 | :maxdepth: 4 9 | 10 | CARS.md 11 | CONTRIBUTING.md 12 | INTEGRATION.md 13 | LIMITATIONS.md 14 | SAFETY.md 15 | ``` 16 | 17 | ```{toctree} 18 | :caption: 'Overview' 19 | :maxdepth: 2 20 | 21 | overview.rst 22 | ``` 23 | 24 | ## API Documentation 25 | 26 | - {ref}`genindex` 27 | - {ref}`modindex` 28 | - {ref}`search` 29 | 30 | ```{toctree} 31 | :caption: 'Python API' 32 | :maxdepth: 2 33 | 34 | modules.rst 35 | ``` 36 | 37 | ```{toctree} 38 | :caption: 'C/C++ API' 39 | :maxdepth: 4 40 | 41 | c_docs.rst 42 | ``` -------------------------------------------------------------------------------- /laika: -------------------------------------------------------------------------------- 1 | laika_repo/laika/ -------------------------------------------------------------------------------- /launch_env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | export OMP_NUM_THREADS=1 4 | export MKL_NUM_THREADS=1 5 | export NUMEXPR_NUM_THREADS=1 6 | export OPENBLAS_NUM_THREADS=1 7 | export VECLIB_MAXIMUM_THREADS=1 8 | 9 | if [ -z "$AGNOS_VERSION" ]; then 10 | export AGNOS_VERSION="6.2" 11 | fi 12 | 13 | if [ -z "$PASSIVE" ]; then 14 | export PASSIVE="1" 15 | fi 16 | 17 | export STAGING_ROOT="/data/safe_staging" 18 | -------------------------------------------------------------------------------- /launch_openpilot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | export PASSIVE="0" 4 | exec ./launch_chffrplus.sh 5 | 6 | -------------------------------------------------------------------------------- /lgtm.yml: -------------------------------------------------------------------------------- 1 | path_classifiers: 2 | library: 3 | - external 4 | - third_party 5 | - pyextra 6 | - tools/lib/mkvparse 7 | extraction: 8 | cpp: 9 | after_prepare: 10 | - "pip3 install --upgrade --user pkgconfig cython setuptools wheel" 11 | - "pip3 install --upgrade --user jinja2 pyyaml cython pycapnp numpy sympy tqdm\ 12 | \ cffi logentries zmq scons" 13 | - "export PATH=/opt/work/.local/bin:$PATH" 14 | index: 15 | build_command: "scons" 16 | javascript: 17 | index: 18 | filters: 19 | - exclude: "*" 20 | -------------------------------------------------------------------------------- /mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | python_version = 3.8 3 | plugins = numpy.typing.mypy_plugin 4 | files = body, common, docs, scripts, selfdrive, site_scons, system, tools 5 | exclude = ^(pyextra/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/) 6 | 7 | ; third-party packages 8 | ignore_missing_imports = True 9 | 10 | ; helpful warnings 11 | warn_redundant_casts = True 12 | warn_unreachable = True 13 | warn_unused_ignores = True 14 | 15 | ; restrict dynamic typing 16 | warn_return_any = True 17 | -------------------------------------------------------------------------------- /pyextra/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /pyextra/acados_template/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | 3 | # Cython intermediates 4 | *_pyx.c 5 | *_pyx.o 6 | *_pyx.so 7 | -------------------------------------------------------------------------------- /pyextra/acados_template/c_templates_tera/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | exclude_files=[main, acados_solver, acados_solver_sfun, Makefile, model].*\.? 2 | -------------------------------------------------------------------------------- /pyextra/acados_template/c_templates_tera/phi_e_constraint.in.h: -------------------------------------------------------------------------------- 1 | #ifndef {{ model.name }}_PHI_E_CONSTRAINT 2 | #define {{ model.name }}_PHI_E_CONSTRAINT 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | {% if dims.nphi_e > 0 %} 9 | int {{ model.name }}_phi_e_constraint(const real_t** arg, real_t** res, int* iw, real_t* w, void *mem); 10 | int {{ model.name }}_phi_e_constraint_work(int *, int *, int *, int *); 11 | const int *{{ model.name }}_phi_e_constraint_sparsity_in(int); 12 | const int *{{ model.name }}_phi_e_constraint_sparsity_out(int); 13 | int {{ model.name }}_phi_e_constraint_n_in(void); 14 | int {{ model.name }}_phi_e_constraint_n_out(void); 15 | {% endif %} 16 | 17 | #ifdef __cplusplus 18 | } /* extern "C" */ 19 | #endif 20 | 21 | #endif // {{ model.name }}_PHI_E_CONSTRAINT 22 | -------------------------------------------------------------------------------- /rednose: -------------------------------------------------------------------------------- 1 | rednose_repo/rednose -------------------------------------------------------------------------------- /release/check-dirty.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | set -e 3 | 4 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 5 | cd $DIR 6 | 7 | if [ ! -z "$(git status --porcelain)" ]; then 8 | echo "Dirty working tree after build:" 9 | git status --porcelain 10 | exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /release/check-submodules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while read hash submodule ref; do 4 | git -C $submodule fetch --depth 100 origin master 5 | git -C $submodule branch -r --contains $hash | grep "origin/master" 6 | if [ "$?" -eq 0 ]; then 7 | echo "$submodule ok" 8 | else 9 | echo "$submodule: $hash is not on master" 10 | exit 1 11 | fi 12 | done <<< $(git submodule status --recursive) 13 | -------------------------------------------------------------------------------- /release/files_pc: -------------------------------------------------------------------------------- 1 | selfdrive/modeld/runners/onnx* 2 | 3 | third_party/mapbox-gl-native-qt/x86_64/*.so 4 | 5 | third_party/libyuv/x64/** 6 | third_party/snpe/x86_64/** 7 | third_party/snpe/x86_64-linux-clang/** 8 | -------------------------------------------------------------------------------- /release/files_tici: -------------------------------------------------------------------------------- 1 | third_party/snpe/larch64** 2 | third_party/snpe/aarch64-ubuntu-gcc7.5/* 3 | third_party/mapbox-gl-native-qt/include/* 4 | 5 | system/timezoned.py 6 | 7 | selfdrive/assets/navigation/* 8 | selfdrive/assets/training_wide/* 9 | 10 | system/camerad/cameras/camera_qcom2.cc 11 | system/camerad/cameras/camera_qcom2.h 12 | system/camerad/cameras/camera_util.cc 13 | system/camerad/cameras/camera_util.h 14 | system/camerad/cameras/real_debayer.cl 15 | 16 | selfdrive/sensord/rawgps/* 17 | 18 | selfdrive/ui/qt/spinner_larch64 19 | selfdrive/ui/qt/text_larch64 20 | -------------------------------------------------------------------------------- /release/identity.sh: -------------------------------------------------------------------------------- 1 | export GIT_COMMITTER_NAME="Vehicle Researcher" 2 | export GIT_COMMITTER_EMAIL="user@comma.ai" 3 | export GIT_AUTHOR_NAME="Vehicle Researcher" 4 | export GIT_AUTHOR_EMAIL="user@comma.ai" 5 | -------------------------------------------------------------------------------- /release/verify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | RED="\033[0;31m" 6 | GREEN="\033[0;32m" 7 | CLEAR="\033[0m" 8 | 9 | BRANCHES="devel dashcam3 release3" 10 | for b in $BRANCHES; do 11 | if git diff --quiet origin/$b origin/$b-staging && [ "$(git rev-parse origin/$b)" = "$(git rev-parse origin/$b-staging)" ]; then 12 | printf "%-10s $GREEN ok $CLEAR\n" "$b" 13 | else 14 | printf "%-10s $RED mismatch $CLEAR\n" "$b" 15 | fi 16 | done 17 | -------------------------------------------------------------------------------- /scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/scripts/__init__.py -------------------------------------------------------------------------------- /scripts/apply-pr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -eq 0 ]; then 4 | echo "usage: $0 " 5 | exit 1 6 | fi 7 | 8 | BASE="https://github.com/commaai/openpilot/pull/" 9 | PR_NUM="$(echo $1 | grep -o -E '[0-9]+')" 10 | 11 | curl -L $BASE/$PR_NUM.patch | git apply 12 | -------------------------------------------------------------------------------- /scripts/cell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | nmcli connection modify --temporary lte ipv4.route-metric 1 4 | nmcli connection modify --temporary lte ipv6.route-metric 1 5 | nmcli con up lte 6 | -------------------------------------------------------------------------------- /scripts/count_cars.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from collections import Counter 3 | from pprint import pprint 4 | 5 | from selfdrive.car.docs import get_all_car_info 6 | 7 | if __name__ == "__main__": 8 | cars = get_all_car_info() 9 | make_count = Counter(l.make for l in cars) 10 | print("\n", "*" * 20, len(cars), "total", "*" * 20, "\n") 11 | pprint(make_count) 12 | -------------------------------------------------------------------------------- /scripts/disable-powersave.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from system.hardware import HARDWARE 3 | 4 | if __name__ == "__main__": 5 | HARDWARE.set_power_save(False) 6 | -------------------------------------------------------------------------------- /scripts/launch_corolla.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | 5 | export FINGERPRINT="TOYOTA COROLLA TSS2 2019" 6 | export SKIP_FW_QUERY="1" 7 | $DIR/../launch_openpilot.sh 8 | -------------------------------------------------------------------------------- /scripts/pyqt_demo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from PyQt5.QtWidgets import QApplication, QLabel # pylint: disable=no-name-in-module, import-error 4 | from selfdrive.ui.qt.python_helpers import set_main_window 5 | 6 | 7 | if __name__ == "__main__": 8 | app = QApplication([]) 9 | label = QLabel('Hello World!') 10 | 11 | # Set full screen and rotate 12 | set_main_window(label) 13 | 14 | app.exec_() 15 | -------------------------------------------------------------------------------- /scripts/stop_updater.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Stop updater 4 | pkill -2 -f selfdrive.updated 5 | 6 | # Remove pending update 7 | rm -f /data/safe_staging/finalized/.overlay_consistent 8 | -------------------------------------------------------------------------------- /scripts/update_now.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Send SIGHUP to updater 4 | pkill -1 -f selfdrive.updated 5 | -------------------------------------------------------------------------------- /selfdrive/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/__init__.py -------------------------------------------------------------------------------- /selfdrive/assets/.gitignore: -------------------------------------------------------------------------------- 1 | *.cc 2 | -------------------------------------------------------------------------------- /selfdrive/assets/assets.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | img_continue_triangle.svg 4 | img_circled_check.svg 5 | img_circled_slash.svg 6 | img_eye_open.svg 7 | img_eye_closed.svg 8 | icons/close.svg 9 | offroad/icon_lock_closed.svg 10 | offroad/icon_checkmark.svg 11 | offroad/icon_warning.png 12 | offroad/icon_wifi_strength_low.svg 13 | offroad/icon_wifi_strength_medium.svg 14 | offroad/icon_wifi_strength_high.svg 15 | offroad/icon_wifi_strength_full.svg 16 | 17 | 18 | -------------------------------------------------------------------------------- /selfdrive/assets/body/awake.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/body/awake.gif -------------------------------------------------------------------------------- /selfdrive/assets/body/sleep.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/body/sleep.gif -------------------------------------------------------------------------------- /selfdrive/assets/compress-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "compressing training guide images" 4 | optipng -o7 -strip all training/* training_wide/* 5 | 6 | # This can sometimes provide smaller images 7 | # mogrify -quality 100 -format jpg training_wide/* training/* 8 | -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Black.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-ExtraBold.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-ExtraLight.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Light.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Medium.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Regular.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-SemiBold.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/Inter-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/Inter-Thin.ttf -------------------------------------------------------------------------------- /selfdrive/assets/fonts/JetBrainsMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/fonts/JetBrainsMono-Medium.ttf -------------------------------------------------------------------------------- /selfdrive/assets/icons/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selfdrive/assets/images/button_flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/images/button_flag.png -------------------------------------------------------------------------------- /selfdrive/assets/images/button_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/images/button_home.png -------------------------------------------------------------------------------- /selfdrive/assets/images/button_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/images/button_settings.png -------------------------------------------------------------------------------- /selfdrive/assets/img_chffr_wheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/img_chffr_wheel.png -------------------------------------------------------------------------------- /selfdrive/assets/img_circled_check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selfdrive/assets/img_circled_slash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selfdrive/assets/img_continue_triangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /selfdrive/assets/img_driver_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/img_driver_face.png -------------------------------------------------------------------------------- /selfdrive/assets/img_eye_open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selfdrive/assets/img_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/img_map.png -------------------------------------------------------------------------------- /selfdrive/assets/img_spinner_comma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/img_spinner_comma.png -------------------------------------------------------------------------------- /selfdrive/assets/img_spinner_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/img_spinner_track.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_arrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_arrive.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_arrive_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_arrive_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_arrive_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_arrive_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_arrive_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_arrive_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_close.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_continue_uturn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_continue_uturn.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_depart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_depart.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_depart_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_depart_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_depart_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_depart_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_depart_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_depart_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_end_of_road_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_end_of_road_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_end_of_road_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_end_of_road_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_flag.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_fork_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_fork_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_invalid_uturn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_invalid_uturn.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_merge_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_merge_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_merge_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_merge_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_merge_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_merge_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_merge_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_merge_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_merge_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_merge_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_new_name_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_new_name_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notificaiton_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notificaiton_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notificaiton_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notificaiton_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notification_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notification_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notification_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notification_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notification_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notification_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notification_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notification_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_notification_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_notification_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_off_ramp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_off_ramp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_off_ramp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_off_ramp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_off_ramp_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_off_ramp_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_off_ramp_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_off_ramp_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_on_ramp_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_on_ramp_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_rotary_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_rotary_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_roundabout_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_roundabout_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_left_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_left_inactive.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_right_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_right_inactive.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_sharp_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_sharp_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_slight_left.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_slight_right.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_straight.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_straight_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_straight_inactive.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_turn_uturn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_turn_uturn.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/direction_updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/direction_updown.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/home.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/home_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/home_inactive.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/screenshot.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/work.png -------------------------------------------------------------------------------- /selfdrive/assets/navigation/work_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/navigation/work_inactive.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_calibration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_calibration.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_chevron_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_chevron_right.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_lock_closed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_map.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_map_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_map_speed.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_menu.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_metric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_metric.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_minus.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_monitoring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_monitoring.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_network.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_openpilot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_openpilot.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_plus.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_road.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_settings.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_shell.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_speed_limit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_speed_limit.png -------------------------------------------------------------------------------- /selfdrive/assets/offroad/icon_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/offroad/icon_warning.png -------------------------------------------------------------------------------- /selfdrive/assets/sounds/disengage.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/disengage.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/engage.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/engage.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/prompt.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/prompt.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/prompt_distracted.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/prompt_distracted.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/refuse.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/refuse.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/warning_immediate.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/warning_immediate.wav -------------------------------------------------------------------------------- /selfdrive/assets/sounds/warning_soft.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/sounds/warning_soft.wav -------------------------------------------------------------------------------- /selfdrive/assets/strip-svg-metadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sudo apt install scour 4 | 5 | for svg in $(find icons/ -type f | grep svg$); do 6 | # scour doesn't support overwriting input file 7 | scour $svg --remove-metadata $svg.tmp 8 | mv $svg.tmp $svg 9 | done 10 | -------------------------------------------------------------------------------- /selfdrive/assets/training/step0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step0.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step1.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step10.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step11.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step12.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step13.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step14.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step15.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step16.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step17.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step18.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step2.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step3.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step4.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step5.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step6.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step7.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step8.png -------------------------------------------------------------------------------- /selfdrive/assets/training/step9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training/step9.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step0.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step1.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step10.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step11.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step12.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step13.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step14.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step15.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step16.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step17.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step18.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step2.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step3.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step4.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step5.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step6.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step7.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step8.png -------------------------------------------------------------------------------- /selfdrive/assets/training_wide/step9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/assets/training_wide/step9.png -------------------------------------------------------------------------------- /selfdrive/athena/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/athena/__init__.py -------------------------------------------------------------------------------- /selfdrive/athena/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/athena/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/boardd/.gitignore: -------------------------------------------------------------------------------- 1 | boardd 2 | boardd_api_impl.cpp 3 | tests/test_boardd_usbprotocol 4 | -------------------------------------------------------------------------------- /selfdrive/boardd/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'envCython', 'common', 'cereal', 'messaging') 2 | 3 | libs = ['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj'] 4 | env.Program('boardd', ['main.cc', 'boardd.cc', 'panda.cc', 'panda_comms.cc', 'spi.cc'], LIBS=libs) 5 | env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc']) 6 | 7 | envCython.Program('boardd_api_impl.so', 'boardd_api_impl.pyx', LIBS=["can_list_to_can_capnp", 'capnp', 'kj'] + envCython["LIBS"]) 8 | if GetOption('test'): 9 | env.Program('tests/test_boardd_usbprotocol', ['tests/test_boardd_usbprotocol.cc', 'panda.cc', 'panda_comms.cc', 'spi.cc'], LIBS=libs) 10 | -------------------------------------------------------------------------------- /selfdrive/boardd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/boardd/__init__.py -------------------------------------------------------------------------------- /selfdrive/boardd/boardd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "selfdrive/boardd/panda.h" 4 | 5 | bool safety_setter_thread(std::vector pandas); 6 | void boardd_main_thread(std::vector serials); 7 | -------------------------------------------------------------------------------- /selfdrive/boardd/boardd.py: -------------------------------------------------------------------------------- 1 | # pylint: skip-file 2 | 3 | # Cython, now uses scons to build 4 | from selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp 5 | assert can_list_to_can_capnp 6 | 7 | def can_capnp_to_can_list(can, src_filter=None): 8 | ret = [] 9 | for msg in can: 10 | if src_filter is None or msg.src in src_filter: 11 | ret.append((msg.address, msg.busTime, msg.dat, msg.src)) 12 | return ret 13 | -------------------------------------------------------------------------------- /selfdrive/boardd/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "selfdrive/boardd/boardd.h" 4 | #include "common/swaglog.h" 5 | #include "common/util.h" 6 | #include "system/hardware/hw.h" 7 | 8 | int main(int argc, char *argv[]) { 9 | LOGW("starting boardd"); 10 | 11 | if (!Hardware::PC()) { 12 | int err; 13 | err = util::set_realtime_priority(54); 14 | assert(err == 0); 15 | err = util::set_core_affinity({4}); 16 | assert(err == 0); 17 | } 18 | 19 | std::vector serials(argv + 1, argv + argc); 20 | boardd_main_thread(serials); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /selfdrive/boardd/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/boardd/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/boardd/tests/test_boardd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/boardd/tests/test_boardd -------------------------------------------------------------------------------- /selfdrive/car/README.MD: -------------------------------------------------------------------------------- 1 | ## Port structure 2 | ##### interface.py 3 | Generic interface to send and receive messages from CAN (controlsd uses this to communicate with car) 4 | ##### carcontroller.py 5 | Builds CAN messages to send to car 6 | ##### carstate.py 7 | Reads CAN from car and builds openpilot CarState message 8 | ##### values.py 9 | Fingerprints and absolute limits 10 | ##### radar_interface.py 11 | Radar interface 12 | -------------------------------------------------------------------------------- /selfdrive/car/body/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/body/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/body/bodycan.py: -------------------------------------------------------------------------------- 1 | def create_control(packer, torque_l, torque_r): 2 | values = { 3 | "TORQUE_L": torque_l, 4 | "TORQUE_R": torque_r, 5 | } 6 | 7 | return packer.make_can_msg("TORQUE_CMD", 0, values) 8 | -------------------------------------------------------------------------------- /selfdrive/car/body/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/car/chrysler/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/chrysler/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/ford/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/ford/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/gm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/gm/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/honda/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/honda/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/hyundai/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/hyundai/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/mazda/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/mazda/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/mazda/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/car/mock/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/mock/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/mock/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/car/mock/values.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, List, Optional, Union 2 | 3 | from selfdrive.car.docs_definitions import CarInfo 4 | 5 | 6 | class CAR: 7 | MOCK = 'mock' 8 | 9 | 10 | CAR_INFO: Dict[str, Optional[Union[CarInfo, List[CarInfo]]]] = { 11 | CAR.MOCK: None, 12 | } 13 | -------------------------------------------------------------------------------- /selfdrive/car/nissan/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/nissan/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/nissan/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/car/subaru/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/subaru/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/subaru/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/car/tesla/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/tesla/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.bz2 2 | -------------------------------------------------------------------------------- /selfdrive/car/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/toyota/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/toyota/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/volkswagen/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/car/volkswagen/__init__.py -------------------------------------------------------------------------------- /selfdrive/car/volkswagen/radar_interface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from selfdrive.car.interfaces import RadarInterfaceBase 3 | 4 | class RadarInterface(RadarInterfaceBase): 5 | pass 6 | -------------------------------------------------------------------------------- /selfdrive/controls/.gitignore: -------------------------------------------------------------------------------- 1 | calibration_param 2 | traces 3 | -------------------------------------------------------------------------------- /selfdrive/controls/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/__init__.py -------------------------------------------------------------------------------- /selfdrive/controls/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/lib/__init__.py -------------------------------------------------------------------------------- /selfdrive/controls/lib/cluster/.gitignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /selfdrive/controls/lib/cluster/SConscript: -------------------------------------------------------------------------------- 1 | Import('env') 2 | 3 | fc = env.SharedLibrary("fastcluster", "fastcluster.cpp") 4 | 5 | # TODO: how do I gate on test 6 | #env.Program("test", ["test.cpp"], LIBS=[fc]) 7 | #valgrind --leak-check=full ./test 8 | 9 | -------------------------------------------------------------------------------- /selfdrive/controls/lib/cluster/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/lib/cluster/__init__.py -------------------------------------------------------------------------------- /selfdrive/controls/lib/lateral_mpc_lib/.gitignore: -------------------------------------------------------------------------------- 1 | acados_ocp_lat.json 2 | c_generated_code/ 3 | -------------------------------------------------------------------------------- /selfdrive/controls/lib/lateral_mpc_lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/lib/lateral_mpc_lib/__init__.py -------------------------------------------------------------------------------- /selfdrive/controls/lib/longitudinal_mpc_lib/.gitignore: -------------------------------------------------------------------------------- 1 | acados_ocp_long.json 2 | c_generated_code/ 3 | -------------------------------------------------------------------------------- /selfdrive/controls/lib/longitudinal_mpc_lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/lib/longitudinal_mpc_lib/__init__.py -------------------------------------------------------------------------------- /selfdrive/controls/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/controls/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/debug/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/debug/__init__.py -------------------------------------------------------------------------------- /selfdrive/debug/adb.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | set -e 3 | 4 | PORT=5555 5 | 6 | setprop service.adb.tcp.port $PORT 7 | sudo systemctl start adbd 8 | 9 | IP=$(echo $SSH_CONNECTION | awk '{ print $3}') 10 | echo "then, connect on your computer:" 11 | echo "adb connect $IP:$PORT" 12 | -------------------------------------------------------------------------------- /selfdrive/debug/check_lag.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from typing import Dict 3 | 4 | import cereal.messaging as messaging 5 | from cereal.services import service_list 6 | 7 | TO_CHECK = ['carState'] 8 | 9 | 10 | if __name__ == "__main__": 11 | sm = messaging.SubMaster(TO_CHECK) 12 | 13 | prev_t: Dict[str, float] = {} 14 | 15 | while True: 16 | sm.update() 17 | 18 | for s in TO_CHECK: 19 | if sm.updated[s]: 20 | t = sm.logMonoTime[s] / 1e9 21 | 22 | if s in prev_t: 23 | expected = 1.0 / (service_list[s].frequency) 24 | dt = t - prev_t[s] 25 | if dt > 10 * expected: 26 | print(t, s, dt) 27 | 28 | prev_t[s] = t 29 | -------------------------------------------------------------------------------- /selfdrive/debug/dump_car_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import argparse 3 | import pickle 4 | 5 | from selfdrive.car.docs import get_all_car_info 6 | 7 | 8 | def dump_car_info(path): 9 | with open(path, 'wb') as f: 10 | pickle.dump(get_all_car_info(), f) 11 | print(f'Dumping car info to {path}') 12 | 13 | 14 | if __name__ == "__main__": 15 | parser = argparse.ArgumentParser() 16 | parser.add_argument("--path", required=True) 17 | args = parser.parse_args() 18 | dump_car_info(args.path) 19 | -------------------------------------------------------------------------------- /selfdrive/debug/internal/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/debug/internal/__init__.py -------------------------------------------------------------------------------- /selfdrive/debug/internal/check_alive_valid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import time 3 | import cereal.messaging as messaging 4 | 5 | 6 | if __name__ == "__main__": 7 | sm = messaging.SubMaster(['deviceState', 'pandaStates', 'modelV2', 'liveCalibration', 'driverMonitoringState', 'longitudinalPlan', 'lateralPlan']) 8 | 9 | i = 0 10 | while True: 11 | sm.update(0) 12 | 13 | i += 1 14 | if i % 100 == 0: 15 | print() 16 | print("alive", sm.alive) 17 | print("valid", sm.valid) 18 | 19 | time.sleep(0.01) 20 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/clpeak/.gitignore: -------------------------------------------------------------------------------- 1 | clpeak/ 2 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/clpeak/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | cd $DIR 5 | 6 | if [ ! -d "$DIR/clpeak" ]; then 7 | git clone https://github.com/krrishnarraj/clpeak.git 8 | 9 | cd clpeak 10 | git fetch 11 | git checkout ec2d3e70e1abc7738b81f9277c7af79d89b2133b 12 | git reset --hard origin/master 13 | git submodule update --init --recursive --remote 14 | 15 | git apply ../run_continuously.patch 16 | fi 17 | 18 | cd clpeak 19 | mkdir build || true 20 | cd build 21 | cmake .. 22 | cmake --build . 23 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/clpeak/clpeak3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/debug/profiling/clpeak/clpeak3 -------------------------------------------------------------------------------- /selfdrive/debug/profiling/clpeak/run_continuously.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/clpeak.cpp b/src/clpeak.cpp 2 | index 8cb192b..b6fe6f5 100644 3 | --- a/src/clpeak.cpp 4 | +++ b/src/clpeak.cpp 5 | @@ -47,7 +47,7 @@ int clPeak::runAll() 6 | 7 | log->xmlOpenTag("clpeak"); 8 | log->xmlAppendAttribs("os", OS_NAME); 9 | - for (size_t p = 0; p < platforms.size(); p++) 10 | + for (size_t p = 0; p < platforms.size(); (p+1 % platforms.size())) 11 | { 12 | if (forcePlatform && (p != specifiedPlatform)) 13 | continue; 14 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/ftrace.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | set -e 3 | 4 | cd /sys/kernel/tracing 5 | 6 | echo 1 > tracing_on 7 | echo boot > trace_clock 8 | echo 1000 > buffer_size_kb 9 | 10 | # /sys/kernel/tracing/available_events 11 | echo 1 > events/irq/enable 12 | echo 1 > events/sched/enable 13 | echo 1 > events/kgsl/enable 14 | echo 1 > events/camera/enable 15 | echo 1 > events/workqueue/enable 16 | 17 | echo > trace 18 | sleep 5 19 | echo 0 > tracing_on 20 | 21 | cp trace /tmp/trace 22 | chown comma: /tmp/trace 23 | echo /tmp/trace 24 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/palanteer/.gitignore: -------------------------------------------------------------------------------- 1 | palanteer/ 2 | viewer 3 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/palanteer/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 6 | cd $DIR 7 | 8 | if [ ! -d palanteer ]; then 9 | git clone https://github.com/dfeneyrou/palanteer 10 | pip install wheel 11 | sudo apt install libunwind-dev libdw-dev 12 | fi 13 | 14 | cd palanteer 15 | git pull 16 | 17 | mkdir -p build 18 | cd build 19 | cmake .. -DCMAKE_BUILD_TYPE=Release 20 | make -j$(nproc) 21 | 22 | pip install --force-reinstall python/dist/palanteer*.whl 23 | 24 | cp bin/palanteer $DIR/viewer 25 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/.gitignore: -------------------------------------------------------------------------------- 1 | trace_* 2 | 3 | tracebox 4 | trace_processor 5 | 6 | perfetto/ 7 | configs/ 8 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | if [ ! -d perfetto ]; then 4 | git clone https://android.googlesource.com/platform/external/perfetto/ 5 | fi 6 | 7 | cd perfetto 8 | 9 | tools/install-build-deps --linux-arm 10 | tools/gn gen --args='is_debug=false target_os="linux" target_cpu="arm64"' out/linux 11 | tools/ninja -C out/linux tracebox traced traced_probes perfetto 12 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/copy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | DEST=tici:/data/openpilot/selfdrive/debug/profiling/perfetto 4 | 5 | scp -r perfetto/out/linux/tracebox $DEST 6 | scp -r perfetto/test/configs $DEST 7 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/record.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | cd $DIR 5 | 6 | OUT=trace_ 7 | sudo ./tracebox -o $OUT --txt -c configs/scheduling.cfg 8 | sudo chown $USER:$USER $OUT 9 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/server.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | curl -LO https://get.perfetto.dev/trace_processor 4 | chmod +x ./trace_processor 5 | 6 | ./trace_processor --httpd 7 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/perfetto/traces.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | DEST=tici:/data/openpilot/selfdrive/debug/profiling/perfetto 4 | 5 | scp tici:/data/openpilot/selfdrive/debug/profiling/perfetto/trace_* . 6 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/py-spy/profile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cd "$(dirname "$0")" 5 | 6 | # find process with name passed in (excluding this process) 7 | for PID in $(pgrep -f $1); do 8 | if [ "$PID" != "$$" ]; then 9 | ps -p $PID -o args 10 | TRACE_PID=$PID 11 | break 12 | fi 13 | done 14 | 15 | if [ -z "$TRACE_PID" ]; then 16 | echo "could not find PID for $1" 17 | exit 1 18 | fi 19 | 20 | sudo env PATH=$PATH py-spy record -d 5 -o /tmp/perf$TRACE_PID.svg -p $TRACE_PID && 21 | google-chrome /tmp/perf$TRACE_PID.svg 22 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/simpleperf/bin/android/arm64/simpleperf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/debug/profiling/simpleperf/bin/android/arm64/simpleperf -------------------------------------------------------------------------------- /selfdrive/debug/profiling/simpleperf/eon_perf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$( dirname "${BASH_SOURCE[0]}" )" 5 | 6 | ssh "$1" '$HOME/one/external/simpleperf/bin/android/arm64/simpleperf record --call-graph fp -a --duration 10 -o /tmp/perf.data' 7 | scp "$1":/tmp/perf.data /tmp/perf.data 8 | python2 report_html.py -i /tmp/perf.data -o /tmp/report.html 9 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/simpleperf/get.txt: -------------------------------------------------------------------------------- 1 | git clone https://android.googlesource.com/platform/prebuilts/simpleperf 2 | git reset --hard 311a9d2cd27841498fc90a0b26a755deb47e7ebd 3 | cp -r report_html.* simpleperf_report_lib.py utils.py inferno lib ~/one/external/simpleperf/ 4 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/snapdragon/.gitignore: -------------------------------------------------------------------------------- 1 | SnapdragonProfiler/ 2 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/snapdragon/README: -------------------------------------------------------------------------------- 1 | snapdragon profiler 2 | -------- 3 | 4 | * download from https://developer.qualcomm.com/software/snapdragon-profiler 5 | * unzip to selfdrive/debug/profiling/snapdragon/SnapdragonProfiler 6 | * run ./setup-agnos.sh 7 | * run selfdrive/debug/adb.sh on device 8 | -------------------------------------------------------------------------------- /selfdrive/debug/profiling/snapdragon/setup-agnos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # TODO: there's probably a better way to do this 4 | 5 | cd SnapdragonProfiler/service 6 | mv android real_android 7 | ln -s agl/ android 8 | -------------------------------------------------------------------------------- /selfdrive/debug/set_car_params.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | 4 | from cereal import car 5 | from common.params import Params 6 | from tools.lib.route import Route 7 | from tools.lib.logreader import LogReader 8 | 9 | if __name__ == "__main__": 10 | CP = None 11 | if len(sys.argv) > 1: 12 | r = Route(sys.argv[1]) 13 | cps = [m for m in LogReader(r.qlog_paths()[0]) if m.which() == 'carParams'] 14 | CP = cps[0].carParams.as_builder() 15 | else: 16 | CP = car.CarParams.new_message() 17 | CP.openpilotLongitudinalControl = True 18 | CP.experimentalLongitudinalAvailable = False 19 | 20 | cp_bytes = CP.to_bytes() 21 | for p in ("CarParams", "CarParamsCache", "CarParamsPersistent"): 22 | Params().put(p, cp_bytes) 23 | -------------------------------------------------------------------------------- /selfdrive/hardware: -------------------------------------------------------------------------------- 1 | ../system/hardware/ -------------------------------------------------------------------------------- /selfdrive/locationd/.gitignore: -------------------------------------------------------------------------------- 1 | ubloxd 2 | ubloxd_test 3 | params_learner 4 | paramsd 5 | locationd 6 | -------------------------------------------------------------------------------- /selfdrive/locationd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/locationd/__init__.py -------------------------------------------------------------------------------- /selfdrive/locationd/models/.gitignore: -------------------------------------------------------------------------------- 1 | generated/ 2 | -------------------------------------------------------------------------------- /selfdrive/locationd/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/locationd/models/__init__.py -------------------------------------------------------------------------------- /selfdrive/locationd/models/gnss_helpers.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from laika.raw_gnss import GNSSMeasurement 3 | 4 | def parse_prr(m): 5 | sat_pos_vel_i = np.concatenate((m[GNSSMeasurement.SAT_POS], 6 | m[GNSSMeasurement.SAT_VEL])) 7 | R_i = np.atleast_2d(m[GNSSMeasurement.PRR_STD]**2) 8 | z_i = m[GNSSMeasurement.PRR] 9 | return z_i, R_i, sat_pos_vel_i 10 | 11 | def parse_pr(m): 12 | pseudorange = m[GNSSMeasurement.PR] 13 | pseudorange_stdev = m[GNSSMeasurement.PR_STD] 14 | sat_pos_freq_i = np.concatenate((m[GNSSMeasurement.SAT_POS], 15 | np.array([m[GNSSMeasurement.GLONASS_FREQ]]))) 16 | z_i = np.atleast_1d(pseudorange) 17 | R_i = np.atleast_2d(pseudorange_stdev**2) 18 | return z_i, R_i, sat_pos_freq_i 19 | 20 | -------------------------------------------------------------------------------- /selfdrive/locationd/test/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | -------------------------------------------------------------------------------- /selfdrive/locationd/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/locationd/test/__init__.py -------------------------------------------------------------------------------- /selfdrive/locationd/test/print_gps_stats.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import time 3 | import cereal.messaging as messaging 4 | 5 | if __name__ == "__main__": 6 | sm = messaging.SubMaster(['ubloxGnss', 'gpsLocationExternal']) 7 | 8 | while 1: 9 | ug = sm['ubloxGnss'] 10 | gle = sm['gpsLocationExternal'] 11 | 12 | try: 13 | cnos = [] 14 | for m in ug.measurementReport.measurements: 15 | cnos.append(m.cno) 16 | print("Sats: %d Accuracy: %.2f m cnos" % (ug.measurementReport.numMeas, gle.accuracy), sorted(cnos)) 17 | except Exception: 18 | pass 19 | sm.update() 20 | time.sleep(0.1) 21 | -------------------------------------------------------------------------------- /selfdrive/loggerd/.gitignore: -------------------------------------------------------------------------------- 1 | loggerd 2 | encoderd 3 | bootlog 4 | tests/test_logger 5 | -------------------------------------------------------------------------------- /selfdrive/loggerd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/loggerd/__init__.py -------------------------------------------------------------------------------- /selfdrive/loggerd/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/loggerd/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/loggerd/tests/fill_eon.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Script to fill up EON with fake data""" 3 | 4 | import os 5 | 6 | from selfdrive.loggerd.config import ROOT, get_available_percent 7 | from selfdrive.loggerd.tests.loggerd_tests_common import create_random_file 8 | 9 | 10 | if __name__ == "__main__": 11 | segment_idx = 0 12 | while True: 13 | seg_name = "1970-01-01--00-00-00--%d" % segment_idx 14 | seg_path = os.path.join(ROOT, seg_name) 15 | 16 | print(seg_path) 17 | 18 | create_random_file(os.path.join(seg_path, 'fcamera.hevc'), 36) 19 | create_random_file(os.path.join(seg_path, 'rlog.bz2'), 2) 20 | 21 | segment_idx += 1 22 | 23 | # Fill up to 99 percent 24 | available_percent = get_available_percent() 25 | if available_percent < 1.0: 26 | break 27 | -------------------------------------------------------------------------------- /selfdrive/loggerd/tests/test_runner.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #include "catch2/catch.hpp" 3 | -------------------------------------------------------------------------------- /selfdrive/loggerd/tools/mark_all_uploaded.py: -------------------------------------------------------------------------------- 1 | import os 2 | from selfdrive.loggerd.uploader import UPLOAD_ATTR_NAME, UPLOAD_ATTR_VALUE 3 | 4 | from selfdrive.loggerd.config import ROOT 5 | for folder in os.walk(ROOT): 6 | for file1 in folder[2]: 7 | full_path = os.path.join(folder[0], file1) 8 | os.setxattr(full_path, UPLOAD_ATTR_NAME, UPLOAD_ATTR_VALUE) 9 | -------------------------------------------------------------------------------- /selfdrive/loggerd/tools/mark_unuploaded.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | from selfdrive.loggerd.uploader import UPLOAD_ATTR_NAME 5 | 6 | for fn in sys.argv[1:]: 7 | print(f"unmarking {fn}") 8 | os.removexattr(fn, UPLOAD_ATTR_NAME) 9 | -------------------------------------------------------------------------------- /selfdrive/loggerd/video_writer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | extern "C" { 6 | #include 7 | #include 8 | } 9 | 10 | #include "cereal/messaging/messaging.h" 11 | 12 | class VideoWriter { 13 | public: 14 | VideoWriter(const char *path, const char *filename, bool remuxing, int width, int height, int fps, cereal::EncodeIndex::Type codec); 15 | void write(uint8_t *data, int len, long long timestamp, bool codecconfig, bool keyframe); 16 | ~VideoWriter(); 17 | private: 18 | std::string vid_path, lock_path; 19 | 20 | FILE *of = nullptr; 21 | 22 | AVCodecContext *codec_ctx; 23 | AVFormatContext *ofmt_ctx; 24 | AVStream *out_stream; 25 | bool remuxing, raw; 26 | }; -------------------------------------------------------------------------------- /selfdrive/loggerd/xattr_cache.py: -------------------------------------------------------------------------------- 1 | import os 2 | import errno 3 | from typing import Dict, Tuple, Optional 4 | 5 | _cached_attributes: Dict[Tuple, Optional[bytes]] = {} 6 | 7 | def getxattr(path: str, attr_name: str) -> Optional[bytes]: 8 | key = (path, attr_name) 9 | if key not in _cached_attributes: 10 | try: 11 | response = os.getxattr(path, attr_name) 12 | except OSError as e: 13 | # ENODATA means attribute hasn't been set 14 | if e.errno == errno.ENODATA: 15 | response = None 16 | else: 17 | raise 18 | _cached_attributes[key] = response 19 | return _cached_attributes[key] 20 | 21 | def setxattr(path: str, attr_name: str, attr_value: bytes) -> None: 22 | _cached_attributes.pop((path, attr_name), None) 23 | return os.setxattr(path, attr_name, attr_value) 24 | -------------------------------------------------------------------------------- /selfdrive/manager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/manager/__init__.py -------------------------------------------------------------------------------- /selfdrive/manager/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/manager/test/__init__.py -------------------------------------------------------------------------------- /selfdrive/modeld/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/modeld/__init__.py -------------------------------------------------------------------------------- /selfdrive/modeld/constants.py: -------------------------------------------------------------------------------- 1 | IDX_N = 33 2 | 3 | def index_function(idx, max_val=192, max_idx=32): 4 | return (max_val) * ((idx/max_idx)**2) 5 | 6 | 7 | T_IDXS = [index_function(idx, max_val=10.0) for idx in range(IDX_N)] 8 | -------------------------------------------------------------------------------- /selfdrive/modeld/dmonitoringmodeld: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | cd $DIR 5 | 6 | if [ -f /TICI ]; then 7 | export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu:/data/pythonpath/third_party/snpe/larch64:$LD_LIBRARY_PATH" 8 | export ADSP_LIBRARY_PATH="/data/pythonpath/third_party/snpe/dsp/" 9 | else 10 | export LD_LIBRARY_PATH="$DIR/../../third_party/snpe/x86_64-linux-clang:$DIR/../../openpilot/third_party/snpe/x86_64:$LD_LIBRARY_PATH" 11 | fi 12 | exec ./_dmonitoringmodeld 13 | -------------------------------------------------------------------------------- /selfdrive/modeld/modeld: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | cd $DIR 5 | 6 | if [ -f /TICI ]; then 7 | export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu:/data/pythonpath/third_party/snpe/larch64:$LD_LIBRARY_PATH" 8 | else 9 | export LD_LIBRARY_PATH="$DIR/../../third_party/snpe/x86_64-linux-clang:$DIR/../../openpilot/third_party/snpe/x86_64:$LD_LIBRARY_PATH" 10 | fi 11 | exec ./_modeld 12 | -------------------------------------------------------------------------------- /selfdrive/modeld/models/dmonitoring_model.current: -------------------------------------------------------------------------------- 1 | d1124586-761e-4e18-a771-6b5ef35124fe 2 | 6fec774f513a19e44d4316e46ad38277197d45ea -------------------------------------------------------------------------------- /selfdrive/modeld/models/dmonitoring_model.onnx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:517262fa9f1ad3cc8049ad3722903f40356d87ea423ee5cf011226fb6cfc3d5b 3 | size 16072278 4 | -------------------------------------------------------------------------------- /selfdrive/modeld/models/dmonitoring_model_q.dlc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:64b94659226a1e3c6594a13c2e5d029465d5803a5c3005121ec7217acdbbef20 3 | size 4443461 4 | -------------------------------------------------------------------------------- /selfdrive/modeld/models/navmodel.onnx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f851f19b0a9e2299639f18856e4879ee863918227b7cef6a07eb6b94a273a9aa 3 | size 12259173 4 | -------------------------------------------------------------------------------- /selfdrive/modeld/models/navmodel_q.dlc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e1c1b277821086fc61b16cb6b68ec3d950d9c2c6ad78f2aa13be88a3a6fa041c 3 | size 3154304 4 | -------------------------------------------------------------------------------- /selfdrive/modeld/models/supercombo.onnx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f794d65ddfb3600e0b3f7d7e894d1dd278b88569de863aae41246eec43f035cf 3 | size 46040391 4 | -------------------------------------------------------------------------------- /selfdrive/modeld/navmodeld: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | cd $DIR 5 | 6 | if [ -f /TICI ]; then 7 | export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu:/data/pythonpath/third_party/snpe/larch64:$LD_LIBRARY_PATH" 8 | export ADSP_LIBRARY_PATH="/data/pythonpath/third_party/snpe/dsp/" 9 | else 10 | export LD_LIBRARY_PATH="$DIR/../../third_party/snpe/x86_64-linux-clang:$DIR/../../openpilot/third_party/snpe/x86_64:$LD_LIBRARY_PATH" 11 | fi 12 | exec ./_navmodeld 13 | -------------------------------------------------------------------------------- /selfdrive/modeld/runners/run.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "runmodel.h" 4 | #include "snpemodel.h" 5 | 6 | #if defined(USE_THNEED) 7 | #include "thneedmodel.h" 8 | #elif defined(USE_ONNX_MODEL) 9 | #include "onnxmodel.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /selfdrive/modeld/runners/runmodel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "common/clutil.h" 3 | class RunModel { 4 | public: 5 | virtual ~RunModel() {} 6 | virtual void addRecurrent(float *state, int state_size) {} 7 | virtual void addDesire(float *state, int state_size) {} 8 | virtual void addNavFeatures(float *state, int state_size) {} 9 | virtual void addDrivingStyle(float *state, int state_size) {} 10 | virtual void addTrafficConvention(float *state, int state_size) {} 11 | virtual void addCalib(float *state, int state_size) {} 12 | virtual void addImage(float *image_buf, int buf_size) {} 13 | virtual void addExtra(float *image_buf, int buf_size) {} 14 | virtual void execute() {} 15 | virtual void* getInputBuf() { return nullptr; } 16 | virtual void* getExtraBuf() { return nullptr; } 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /selfdrive/modeld/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/modeld/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/modeld/tests/snpe_benchmark/.gitignore: -------------------------------------------------------------------------------- 1 | benchmark 2 | -------------------------------------------------------------------------------- /selfdrive/modeld/tests/snpe_benchmark/benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | clang++ -I /data/openpilot/third_party/snpe/include/ -L/data/pythonpath/third_party/snpe/aarch64 -lSNPE benchmark.cc -o benchmark 3 | export LD_LIBRARY_PATH="/data/pythonpath/third_party/snpe/aarch64/:$HOME/openpilot/third_party/snpe/x86_64/:$LD_LIBRARY_PATH" 4 | exec ./benchmark $1 5 | -------------------------------------------------------------------------------- /selfdrive/modeld/tests/tf_test/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clang++ -I /home/batman/one/external/tensorflow/include/ -L /home/batman/one/external/tensorflow/lib -Wl,-rpath=/home/batman/one/external/tensorflow/lib main.cc -ltensorflow 3 | -------------------------------------------------------------------------------- /selfdrive/modeld/tests/tf_test/pb_loader.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import tensorflow as tf # pylint: disable=import-error 4 | 5 | with open(sys.argv[1], "rb") as f: 6 | graph_def = tf.compat.v1.GraphDef() 7 | graph_def.ParseFromString(f.read()) 8 | #tf.io.write_graph(graph_def, '', sys.argv[1]+".try") 9 | -------------------------------------------------------------------------------- /selfdrive/modeld/thneed/README: -------------------------------------------------------------------------------- 1 | thneed is an SNPE accelerator. I know SNPE is already an accelerator, but sometimes things need to go even faster.. 2 | 3 | It runs on the local device, and caches a single model run. Then it replays it, but fast. 4 | 5 | thneed slices through abstraction layers like a fish. 6 | 7 | You need a thneed. 8 | 9 | -------------------------------------------------------------------------------- /selfdrive/modeld/thneed/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/modeld/thneed/__init__.py -------------------------------------------------------------------------------- /selfdrive/modeld/transforms/loadyuv.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "common/clutil.h" 4 | 5 | typedef struct { 6 | int width, height; 7 | cl_kernel loadys_krnl, loaduv_krnl, copy_krnl; 8 | } LoadYUVState; 9 | 10 | void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height); 11 | 12 | void loadyuv_destroy(LoadYUVState* s); 13 | 14 | void loadyuv_queue(LoadYUVState* s, cl_command_queue q, 15 | cl_mem y_cl, cl_mem u_cl, cl_mem v_cl, 16 | cl_mem out_cl, bool do_shift = false); 17 | -------------------------------------------------------------------------------- /selfdrive/modeld/transforms/transform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CL_USE_DEPRECATED_OPENCL_1_2_APIS 4 | #ifdef __APPLE__ 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include "common/mat.h" 11 | 12 | typedef struct { 13 | cl_kernel krnl; 14 | cl_mem m_y_cl, m_uv_cl; 15 | } Transform; 16 | 17 | void transform_init(Transform* s, cl_context ctx, cl_device_id device_id); 18 | 19 | void transform_destroy(Transform* transform); 20 | 21 | void transform_queue(Transform* s, cl_command_queue q, 22 | cl_mem yuv, int in_width, int in_height, int in_stride, int in_uv_offset, 23 | cl_mem out_y, cl_mem out_u, cl_mem out_v, 24 | int out_width, int out_height, 25 | const mat3& projection); 26 | -------------------------------------------------------------------------------- /selfdrive/navd/.gitignore: -------------------------------------------------------------------------------- 1 | moc_* 2 | *.moc 3 | 4 | map_renderer 5 | libmap_renderer.so 6 | -------------------------------------------------------------------------------- /selfdrive/navd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/navd/__init__.py -------------------------------------------------------------------------------- /selfdrive/navd/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "selfdrive/ui/qt/util.h" 6 | #include "selfdrive/ui/qt/maps/map_helpers.h" 7 | #include "selfdrive/navd/map_renderer.h" 8 | #include "system/hardware/hw.h" 9 | 10 | 11 | 12 | void sigHandler(int s) { 13 | qInfo() << "Shutting down"; 14 | std::signal(s, SIG_DFL); 15 | 16 | qApp->quit(); 17 | } 18 | 19 | 20 | int main(int argc, char *argv[]) { 21 | qInstallMessageHandler(swagLogMessageHandler); 22 | 23 | QApplication app(argc, argv); 24 | std::signal(SIGINT, sigHandler); 25 | std::signal(SIGTERM, sigHandler); 26 | 27 | MapRenderer * m = new MapRenderer(get_mapbox_settings()); 28 | assert(m); 29 | 30 | return app.exec(); 31 | } 32 | -------------------------------------------------------------------------------- /selfdrive/rtshield.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import time 4 | from typing import NoReturn 5 | 6 | from common.realtime import set_core_affinity, set_realtime_priority 7 | 8 | # RT shield - ensure CPU 3 always remains available for RT processes 9 | # runs as SCHED_FIFO with minimum priority to ensure kthreads don't 10 | # get scheduled onto CPU 3, but it's always preemptible by realtime 11 | # openpilot processes 12 | 13 | def main() -> NoReturn: 14 | set_core_affinity([int(os.getenv("CORE", "3")), ]) 15 | set_realtime_priority(1) 16 | 17 | while True: 18 | time.sleep(0.000001) 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /selfdrive/sensord/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'arch', 'common', 'cereal', 'messaging') 2 | 3 | sensors = [ 4 | 'sensors/file_sensor.cc', 5 | 'sensors/i2c_sensor.cc', 6 | 'sensors/light_sensor.cc', 7 | 'sensors/bmx055_accel.cc', 8 | 'sensors/bmx055_gyro.cc', 9 | 'sensors/bmx055_magn.cc', 10 | 'sensors/bmx055_temp.cc', 11 | 'sensors/lsm6ds3_accel.cc', 12 | 'sensors/lsm6ds3_gyro.cc', 13 | 'sensors/lsm6ds3_temp.cc', 14 | 'sensors/mmc5603nj_magn.cc', 15 | ] 16 | libs = [common, cereal, messaging, 'capnp', 'zmq', 'kj', 'pthread'] 17 | if arch == "larch64": 18 | libs.append('i2c') 19 | env.Program('_sensord', ['sensors_qcom2.cc'] + sensors, LIBS=libs) 20 | -------------------------------------------------------------------------------- /selfdrive/sensord/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/sensord/__init__.py -------------------------------------------------------------------------------- /selfdrive/sensord/sensord: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" 4 | exec ./_sensord 5 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/bmx055_temp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "selfdrive/sensord/sensors/bmx055_accel.h" 4 | #include "selfdrive/sensord/sensors/i2c_sensor.h" 5 | 6 | class BMX055_Temp : public I2CSensor { 7 | uint8_t get_device_address() {return BMX055_ACCEL_I2C_ADDR;} 8 | public: 9 | BMX055_Temp(I2CBus *bus); 10 | int init(); 11 | bool get_event(MessageBuilder &msg, uint64_t ts = 0); 12 | int shutdown() { return 0; } 13 | }; 14 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/constants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #define SENSOR_ACCELEROMETER 1 5 | #define SENSOR_MAGNETOMETER 2 6 | #define SENSOR_MAGNETOMETER_UNCALIBRATED 3 7 | #define SENSOR_GYRO 4 8 | #define SENSOR_GYRO_UNCALIBRATED 5 9 | #define SENSOR_LIGHT 7 10 | 11 | #define SENSOR_TYPE_ACCELEROMETER 1 12 | #define SENSOR_TYPE_GEOMAGNETIC_FIELD 2 13 | #define SENSOR_TYPE_GYROSCOPE 4 14 | #define SENSOR_TYPE_LIGHT 5 15 | #define SENSOR_TYPE_AMBIENT_TEMPERATURE 13 16 | #define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED 14 17 | #define SENSOR_TYPE_MAGNETIC_FIELD SENSOR_TYPE_GEOMAGNETIC_FIELD 18 | #define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED 16 19 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/file_sensor.cc: -------------------------------------------------------------------------------- 1 | #include "file_sensor.h" 2 | 3 | #include 4 | 5 | FileSensor::FileSensor(std::string filename) : file(filename) {} 6 | 7 | int FileSensor::init() { 8 | return file.is_open() ? 0 : 1; 9 | } 10 | 11 | FileSensor::~FileSensor() { 12 | file.close(); 13 | } 14 | 15 | bool FileSensor::has_interrupt_enabled() { 16 | return false; 17 | } -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/file_sensor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "cereal/gen/cpp/log.capnp.h" 7 | #include "selfdrive/sensord/sensors/sensor.h" 8 | 9 | class FileSensor : public Sensor { 10 | protected: 11 | std::ifstream file; 12 | 13 | public: 14 | FileSensor(std::string filename); 15 | ~FileSensor(); 16 | int init(); 17 | bool has_interrupt_enabled(); 18 | virtual bool get_event(MessageBuilder &msg, uint64_t ts = 0) = 0; 19 | }; 20 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/light_sensor.cc: -------------------------------------------------------------------------------- 1 | #include "light_sensor.h" 2 | 3 | #include 4 | 5 | #include "common/timing.h" 6 | #include "selfdrive/sensord/sensors/constants.h" 7 | 8 | LightSensor::LightSensor(std::string filename) : FileSensor(filename) {} 9 | 10 | bool LightSensor::get_event(MessageBuilder &msg, uint64_t ts) { 11 | uint64_t start_time = nanos_since_boot(); 12 | file.clear(); 13 | file.seekg(0); 14 | 15 | int value; 16 | file >> value; 17 | 18 | auto event = msg.initEvent().initLightSensor(); 19 | event.setSource(cereal::SensorEventData::SensorSource::RPR0521); 20 | event.setVersion(1); 21 | event.setSensor(SENSOR_LIGHT); 22 | event.setType(SENSOR_TYPE_LIGHT); 23 | event.setTimestamp(start_time); 24 | event.setLight(value); 25 | 26 | return true; 27 | } 28 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/light_sensor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "file_sensor.h" 3 | 4 | class LightSensor : public FileSensor { 5 | public: 6 | LightSensor(std::string filename); 7 | bool get_event(MessageBuilder &msg, uint64_t ts = 0); 8 | int shutdown() { return 0; } 9 | }; 10 | -------------------------------------------------------------------------------- /selfdrive/sensord/sensors/sensor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cereal/messaging/messaging.h" 4 | 5 | class Sensor { 6 | public: 7 | int gpio_fd = -1; 8 | uint64_t init_delay = 500e6; // default dealy 500ms 9 | virtual ~Sensor() {}; 10 | virtual int init() = 0; 11 | virtual bool get_event(MessageBuilder &msg, uint64_t ts = 0) = 0; 12 | virtual bool has_interrupt_enabled() = 0; 13 | virtual int shutdown() = 0; 14 | 15 | virtual bool is_data_valid(uint64_t st, uint64_t ct) { 16 | return (ct - st) > init_delay; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /selfdrive/sensord/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/sensord/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/test/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | docker_out/ 3 | 4 | process_replay/diff.txt 5 | process_replay/model_diff.txt 6 | valgrind_logs.txt 7 | 8 | *.bz2 9 | *.hevc 10 | -------------------------------------------------------------------------------- /selfdrive/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/test/__init__.py -------------------------------------------------------------------------------- /selfdrive/test/ci_shell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" 4 | OP_ROOT="$DIR/../../" 5 | 6 | if [ -z "$BUILD" ]; then 7 | docker pull ghcr.io/commaai/openpilot-base:latest 8 | else 9 | docker build --cache-from ghcr.io/commaai/openpilot-base:latest -t ghcr.io/commaai/openpilot-base:latest -f $OP_ROOT/Dockerfile.openpilot_base . 10 | fi 11 | 12 | docker run \ 13 | -it \ 14 | --rm \ 15 | --volume $OP_ROOT:$OP_ROOT \ 16 | --workdir $PWD \ 17 | --env PYTHONPATH=$OP_ROOT \ 18 | ghcr.io/commaai/openpilot-base:latest \ 19 | /bin/bash 20 | -------------------------------------------------------------------------------- /selfdrive/test/longitudinal_maneuvers/.gitignore: -------------------------------------------------------------------------------- 1 | out/* 2 | -------------------------------------------------------------------------------- /selfdrive/test/longitudinal_maneuvers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/test/longitudinal_maneuvers/__init__.py -------------------------------------------------------------------------------- /selfdrive/test/process_replay/.gitignore: -------------------------------------------------------------------------------- 1 | fakedata/ 2 | debayer_diff.txt 3 | -------------------------------------------------------------------------------- /selfdrive/test/process_replay/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/test/process_replay/__init__.py -------------------------------------------------------------------------------- /selfdrive/test/process_replay/debayer_replay_ref_commit: -------------------------------------------------------------------------------- 1 | 8f9ba7540b4549b4a57312129b8ff678d045f70f -------------------------------------------------------------------------------- /selfdrive/test/process_replay/model_replay_ref_commit: -------------------------------------------------------------------------------- 1 | 4ff972367fdb9546be68ee0ba0d45cf4f839dae7 2 | -------------------------------------------------------------------------------- /selfdrive/test/process_replay/ref_commit: -------------------------------------------------------------------------------- 1 | 358d330ffde4ecd679129b0e0a20806aaf21b786 -------------------------------------------------------------------------------- /selfdrive/test/profiling/.gitignore: -------------------------------------------------------------------------------- 1 | cachegrind.out.* 2 | *.prof 3 | -------------------------------------------------------------------------------- /selfdrive/test/profiling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/test/profiling/__init__.py -------------------------------------------------------------------------------- /selfdrive/thermald/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/thermald/__init__.py -------------------------------------------------------------------------------- /selfdrive/thermald/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/thermald/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/ui/.gitignore: -------------------------------------------------------------------------------- 1 | moc_* 2 | *.moc 3 | 4 | translations/main_test_en.* 5 | 6 | _mui 7 | watch3 8 | installer/installers/* 9 | qt/text 10 | qt/spinner 11 | qt/setup/setup 12 | qt/setup/reset 13 | qt/setup/wifi 14 | qt/setup/updater 15 | -------------------------------------------------------------------------------- /selfdrive/ui/installer/continue_dashcam.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | cd /data/openpilot 4 | exec ./launch_chffrplus.sh 5 | -------------------------------------------------------------------------------- /selfdrive/ui/installer/continue_openpilot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | cd /data/openpilot 4 | exec ./launch_openpilot.sh 5 | -------------------------------------------------------------------------------- /selfdrive/ui/installer/installer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class Installer : public QWidget { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit Installer(QWidget *parent = 0); 13 | 14 | private slots: 15 | void updateProgress(int percent); 16 | 17 | void readProgress(); 18 | void cloneFinished(int exitCode, QProcess::ExitStatus exitStatus); 19 | 20 | private: 21 | QLabel *val; 22 | QProgressBar *bar; 23 | QProcess proc; 24 | 25 | void doInstall(); 26 | void freshClone(); 27 | void cachedFetch(const QString &cache); 28 | }; 29 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/offroad/experimental_mode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "common/params.h" 7 | 8 | class ExperimentalModeButton : public QPushButton { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit ExperimentalModeButton(QWidget* parent = 0); 13 | 14 | signals: 15 | void openSettings(int index = 0, const QString &toggle = ""); 16 | 17 | private: 18 | void showEvent(QShowEvent *event) override; 19 | 20 | Params params; 21 | bool experimental_mode; 22 | int img_width = 100; 23 | int horizontal_padding = 30; 24 | QPixmap experimental_pixmap; 25 | QPixmap chill_pixmap; 26 | QLabel *mode_label; 27 | QLabel *mode_icon; 28 | 29 | protected: 30 | void paintEvent(QPaintEvent *event) override; 31 | }; 32 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/python_helpers.py: -------------------------------------------------------------------------------- 1 | import os 2 | from cffi import FFI 3 | 4 | import sip # pylint: disable=import-error 5 | 6 | from common.ffi_wrapper import suffix 7 | from common.basedir import BASEDIR 8 | 9 | 10 | def get_ffi(): 11 | lib = os.path.join(BASEDIR, "selfdrive", "ui", "qt", "libpython_helpers" + suffix()) 12 | 13 | ffi = FFI() 14 | ffi.cdef("void set_main_window(void *w);") 15 | return ffi, ffi.dlopen(lib) 16 | 17 | 18 | def set_main_window(widget): 19 | ffi, lib = get_ffi() 20 | lib.set_main_window(ffi.cast('void*', sip.unwrapinstance(widget))) 21 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/qt_window.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef QCOM2 10 | #include 11 | #include 12 | #include 13 | #endif 14 | 15 | #include "system/hardware/hw.h" 16 | 17 | const QString ASSET_PATH = ":/"; 18 | 19 | const int WIDE_WIDTH = 2160; 20 | 21 | void setMainWindow(QWidget *w); 22 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/request_repeater.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "common/util.h" 4 | #include "selfdrive/ui/qt/api.h" 5 | #include "selfdrive/ui/ui.h" 6 | 7 | class RequestRepeater : public HttpRequest { 8 | public: 9 | RequestRepeater(QObject *parent, const QString &requestURL, const QString &cacheKey = "", int period = 0, bool while_onroad=false); 10 | 11 | private: 12 | Params params; 13 | QTimer *timer; 14 | QString prevResp; 15 | }; 16 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/setup/reset.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class Reset : public QWidget { 6 | Q_OBJECT 7 | 8 | public: 9 | explicit Reset(bool recover = false, QWidget *parent = 0); 10 | 11 | private: 12 | QLabel *body; 13 | QPushButton *rejectBtn; 14 | QPushButton *rebootBtn; 15 | QPushButton *confirmBtn; 16 | void doReset(); 17 | 18 | private slots: 19 | void confirm(); 20 | }; 21 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/setup/setup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | class Setup : public QStackedWidget { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit Setup(QWidget *parent = 0); 12 | 13 | private: 14 | QWidget *low_voltage(); 15 | QWidget *getting_started(); 16 | QWidget *network_setup(); 17 | QWidget *software_selection(); 18 | QWidget *downloading(); 19 | QWidget *download_failed(); 20 | 21 | QWidget *failed_widget; 22 | QWidget *downloading_widget; 23 | 24 | signals: 25 | void finished(bool success); 26 | 27 | public slots: 28 | void nextPage(); 29 | void prevPage(); 30 | void download(QString url); 31 | }; 32 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/setup/updater.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class Updater : public QStackedWidget { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit Updater(const QString &updater_path, const QString &manifest_path, QWidget *parent = 0); 15 | 16 | private slots: 17 | void installUpdate(); 18 | void readProgress(); 19 | void updateFinished(int exitCode, QProcess::ExitStatus exitStatus); 20 | 21 | private: 22 | QProcess proc; 23 | QString updater, manifest; 24 | 25 | QLabel *text; 26 | QProgressBar *bar; 27 | QPushButton *reboot; 28 | QWidget *prompt, *wifi, *progress; 29 | }; 30 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/spinner_larch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/ui/qt/spinner_larch64 -------------------------------------------------------------------------------- /selfdrive/ui/qt/text_larch64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/ui/qt/text_larch64 -------------------------------------------------------------------------------- /selfdrive/ui/qt/widgets/drive_stats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class DriveStats : public QFrame { 7 | Q_OBJECT 8 | 9 | public: 10 | explicit DriveStats(QWidget* parent = 0); 11 | 12 | private: 13 | void showEvent(QShowEvent *event) override; 14 | void updateStats(); 15 | inline QString getDistanceUnit() const { return metric_ ? tr("KM") : tr("Miles"); } 16 | 17 | bool metric_; 18 | QJsonDocument stats_; 19 | struct StatsLabels { 20 | QLabel *routes, *distance, *distance_unit, *hours; 21 | } all_, week_; 22 | 23 | private slots: 24 | void parseResponse(const QString &response, bool success); 25 | }; 26 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/widgets/scrollview.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class ScrollView : public QScrollArea { 6 | Q_OBJECT 7 | 8 | public: 9 | explicit ScrollView(QWidget *w = nullptr, QWidget *parent = nullptr); 10 | protected: 11 | void hideEvent(QHideEvent *e) override; 12 | }; 13 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/widgets/ssh_keys.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "system/hardware/hw.h" 6 | #include "selfdrive/ui/qt/widgets/controls.h" 7 | 8 | // SSH enable toggle 9 | class SshToggle : public ToggleControl { 10 | Q_OBJECT 11 | 12 | public: 13 | SshToggle() : ToggleControl(tr("Enable SSH"), "", "", Hardware::get_ssh_enabled()) { 14 | QObject::connect(this, &SshToggle::toggleFlipped, [=](bool state) { 15 | Hardware::set_ssh_enabled(state); 16 | }); 17 | } 18 | }; 19 | 20 | // SSH key management widget 21 | class SshControl : public ButtonControl { 22 | Q_OBJECT 23 | 24 | public: 25 | SshControl(); 26 | 27 | private: 28 | Params params; 29 | 30 | void refresh(); 31 | void getUserKeys(const QString &username); 32 | }; 33 | -------------------------------------------------------------------------------- /selfdrive/ui/qt/window.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "selfdrive/ui/qt/home.h" 7 | #include "selfdrive/ui/qt/offroad/onboarding.h" 8 | #include "selfdrive/ui/qt/offroad/settings.h" 9 | 10 | class MainWindow : public QWidget { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit MainWindow(QWidget *parent = 0); 15 | 16 | private: 17 | bool eventFilter(QObject *obj, QEvent *event) override; 18 | void openSettings(int index = 0, const QString ¶m = ""); 19 | void closeSettings(); 20 | 21 | Device device; 22 | 23 | QStackedLayout *main_layout; 24 | HomeWindow *homeWindow; 25 | SettingsWindow *settingsWindow; 26 | OnboardingWindow *onboardingWindow; 27 | }; 28 | -------------------------------------------------------------------------------- /selfdrive/ui/soundd/.gitignore: -------------------------------------------------------------------------------- 1 | _soundd 2 | -------------------------------------------------------------------------------- /selfdrive/ui/soundd/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "selfdrive/ui/qt/util.h" 6 | #include "selfdrive/ui/soundd/sound.h" 7 | 8 | void sigHandler(int s) { 9 | qApp->quit(); 10 | } 11 | 12 | int main(int argc, char **argv) { 13 | qInstallMessageHandler(swagLogMessageHandler); 14 | setpriority(PRIO_PROCESS, 0, -20); 15 | 16 | QApplication a(argc, argv); 17 | std::signal(SIGINT, sigHandler); 18 | std::signal(SIGTERM, sigHandler); 19 | 20 | Sound sound; 21 | return a.exec(); 22 | } 23 | -------------------------------------------------------------------------------- /selfdrive/ui/soundd/soundd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" 4 | export QT_QPA_PLATFORM="offscreen" 5 | exec ./_soundd 6 | -------------------------------------------------------------------------------- /selfdrive/ui/spinner: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /TICI ] && [ ! -f qt/spinner ]; then 4 | cp qt/spinner_larch64 qt/spinner 5 | fi 6 | 7 | export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" 8 | exec ./qt/spinner "$1" 9 | -------------------------------------------------------------------------------- /selfdrive/ui/tests/.gitignore: -------------------------------------------------------------------------------- 1 | test 2 | playsound 3 | test_sound 4 | test_translations 5 | -------------------------------------------------------------------------------- /selfdrive/ui/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/selfdrive/ui/tests/__init__.py -------------------------------------------------------------------------------- /selfdrive/ui/tests/body.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import time 3 | import cereal.messaging as messaging 4 | 5 | if __name__ == "__main__": 6 | while True: 7 | pm = messaging.PubMaster(['carParams', 'carState']) 8 | batt = 1. 9 | while True: 10 | msg = messaging.new_message('carParams') 11 | msg.carParams.carName = "COMMA BODY" 12 | msg.carParams.notCar = True 13 | pm.send('carParams', msg) 14 | 15 | for b in range(100, 0, -1): 16 | msg = messaging.new_message('carState') 17 | msg.carState.charging = True 18 | msg.carState.fuelGauge = b / 100. 19 | pm.send('carState', msg) 20 | time.sleep(0.1) 21 | 22 | time.sleep(1) 23 | -------------------------------------------------------------------------------- /selfdrive/ui/tests/create_test_translations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | UI_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"/.. 6 | TEST_TEXT="(WRAPPED_SOURCE_TEXT)" 7 | TEST_TS_FILE=$UI_DIR/translations/main_test_en.ts 8 | TEST_QM_FILE=$UI_DIR/translations/main_test_en.qm 9 | 10 | # translation strings 11 | UNFINISHED="<\/translation>" 12 | TRANSLATED="$TEST_TEXT<\/translation>" 13 | 14 | mkdir -p $UI_DIR/translations 15 | rm -f $TEST_TS_FILE $TEST_QM_FILE 16 | lupdate -recursive "$UI_DIR" -ts $TEST_TS_FILE 17 | sed -i "s/$UNFINISHED/$TRANSLATED/" $TEST_TS_FILE 18 | lrelease $TEST_TS_FILE 19 | -------------------------------------------------------------------------------- /selfdrive/ui/tests/test_runner.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_RUNNER 2 | #include "catch2/catch.hpp" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int main(int argc, char **argv) { 10 | // unit tests for Qt 11 | QApplication app(argc, argv); 12 | 13 | QString language_file = "main_test_en"; 14 | qDebug() << "Loading language:" << language_file; 15 | 16 | QTranslator translator; 17 | QString translationsPath = QDir::cleanPath(qApp->applicationDirPath() + "/../translations"); 18 | if (!translator.load(language_file, translationsPath)) { 19 | qDebug() << "Failed to load translation file!"; 20 | } 21 | app.installTranslator(&translator); 22 | 23 | const int res = Catch::Session().run(argc, argv); 24 | return (res < 0xff ? res : 0xff); 25 | } 26 | -------------------------------------------------------------------------------- /selfdrive/ui/text: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /TICI ] && [ ! -f qt/text ]; then 4 | cp qt/text_larch64 qt/text 5 | fi 6 | 7 | export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" 8 | exec ./qt/text "$1" 9 | -------------------------------------------------------------------------------- /selfdrive/ui/translations/languages.json: -------------------------------------------------------------------------------- 1 | { 2 | "English": "main_en", 3 | "Deutsch": "main_de", 4 | "Português": "main_pt-BR", 5 | "中文(繁體)": "main_zh-CHT", 6 | "中文(简体)": "main_zh-CHS", 7 | "한국어": "main_ko", 8 | "日本語": "main_ja" 9 | } 10 | -------------------------------------------------------------------------------- /selfdrive/ui/ui: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH" 4 | export QT_DBL_CLICK_DIST=150 5 | exec ./_ui 6 | -------------------------------------------------------------------------------- /system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/__init__.py -------------------------------------------------------------------------------- /system/camerad/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'arch', 'cereal', 'messaging', 'common', 'gpucommon', 'visionipc') 2 | 3 | libs = ['m', 'pthread', common, 'jpeg', 'OpenCL', 'yuv', cereal, messaging, 'zmq', 'capnp', 'kj', visionipc, gpucommon, 'atomic'] 4 | 5 | cenv = env.Clone() 6 | cenv['CPPPATH'].append('include/') 7 | 8 | camera_obj = cenv.Object(['cameras/camera_qcom2.cc', 'cameras/camera_common.cc', 'cameras/camera_util.cc']) 9 | cenv.Program('camerad', [ 10 | 'main.cc', 11 | camera_obj, 12 | ], LIBS=libs) 13 | 14 | if GetOption("test") and arch == "x86_64": 15 | cenv.Program('test/ae_gray_test', [ 16 | 'test/ae_gray_test.cc', 17 | camera_obj, 18 | ], LIBS=libs) 19 | -------------------------------------------------------------------------------- /system/camerad/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/camerad/__init__.py -------------------------------------------------------------------------------- /system/camerad/include/media/cam_cpas.h: -------------------------------------------------------------------------------- 1 | #ifndef __UAPI_CAM_CPAS_H__ 2 | #define __UAPI_CAM_CPAS_H__ 3 | 4 | #include "cam_defs.h" 5 | 6 | #define CAM_FAMILY_CAMERA_SS 1 7 | #define CAM_FAMILY_CPAS_SS 2 8 | 9 | /** 10 | * struct cam_cpas_query_cap - CPAS query device capability payload 11 | * 12 | * @camera_family : Camera family type 13 | * @reserved : Reserved field for alignment 14 | * @camera_version : Camera platform version 15 | * @cpas_version : Camera CPAS version within camera platform 16 | * 17 | */ 18 | struct cam_cpas_query_cap { 19 | uint32_t camera_family; 20 | uint32_t reserved; 21 | struct cam_hw_version camera_version; 22 | struct cam_hw_version cpas_version; 23 | }; 24 | 25 | #endif /* __UAPI_CAM_CPAS_H__ */ 26 | -------------------------------------------------------------------------------- /system/camerad/main.cc: -------------------------------------------------------------------------------- 1 | #include "system/camerad/cameras/camera_common.h" 2 | 3 | #include 4 | 5 | #include "common/params.h" 6 | #include "common/util.h" 7 | #include "system/hardware/hw.h" 8 | 9 | int main(int argc, char *argv[]) { 10 | if (Hardware::PC()) { 11 | printf("camerad is not meant to run on PC\n"); 12 | return 0; 13 | } 14 | 15 | int ret; 16 | ret = util::set_realtime_priority(53); 17 | assert(ret == 0); 18 | ret = util::set_core_affinity({6}); 19 | assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores 20 | 21 | camerad_thread(); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /system/camerad/snapshot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/camerad/snapshot/__init__.py -------------------------------------------------------------------------------- /system/camerad/test/.gitignore: -------------------------------------------------------------------------------- 1 | jpegs/ 2 | -------------------------------------------------------------------------------- /system/camerad/test/stress_restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd .. 3 | while :; do 4 | ./camerad & 5 | pid="$!" 6 | sleep 2 7 | kill -2 $pid 8 | wait $pid 9 | done 10 | -------------------------------------------------------------------------------- /system/clocksd/.gitignore: -------------------------------------------------------------------------------- 1 | clocksd 2 | -------------------------------------------------------------------------------- /system/clocksd/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'common', 'cereal', 'messaging') 2 | env.Program('clocksd.cc', LIBS=[common, cereal, messaging, 'capnp', 'zmq', 'kj']) 3 | -------------------------------------------------------------------------------- /system/hardware/.gitignore: -------------------------------------------------------------------------------- 1 | eon/rat 2 | -------------------------------------------------------------------------------- /system/hardware/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from typing import cast 3 | 4 | from system.hardware.base import HardwareBase 5 | from system.hardware.tici.hardware import Tici 6 | from system.hardware.pc.hardware import Pc 7 | 8 | TICI = os.path.isfile('/TICI') 9 | AGNOS = os.path.isfile('/AGNOS') 10 | PC = not TICI 11 | 12 | 13 | if TICI: 14 | HARDWARE = cast(HardwareBase, Tici()) 15 | else: 16 | HARDWARE = cast(HardwareBase, Pc()) 17 | -------------------------------------------------------------------------------- /system/hardware/pc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/hardware/pc/__init__.py -------------------------------------------------------------------------------- /system/hardware/tici/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/hardware/tici/__init__.py -------------------------------------------------------------------------------- /system/hardware/tici/pins.py: -------------------------------------------------------------------------------- 1 | # TODO: these are also defined in a header 2 | 3 | # GPIO pin definitions 4 | class GPIO: 5 | # both GPIO_STM_RST_N and GPIO_LTE_RST_N are misnamed, they are high to reset 6 | HUB_RST_N = 30 7 | UBLOX_RST_N = 32 8 | UBLOX_SAFEBOOT_N = 33 9 | UBLOX_PWR_EN = 34 10 | STM_RST_N = 124 11 | STM_BOOT0 = 134 12 | 13 | LTE_RST_N = 50 14 | LTE_PWRKEY = 116 15 | LTE_BOOT = 52 16 | 17 | # GPIO_CAM0_DVDD_EN = /sys/kernel/debug/regulator/camera_rear_ldo 18 | CAM0_AVDD_EN = 8 19 | CAM0_RSTN = 9 20 | CAM1_RSTN = 7 21 | CAM2_RSTN = 12 22 | 23 | # Sensor interrupts 24 | BMX055_ACCEL_INT = 21 25 | BMX055_GYRO_INT = 23 26 | BMX055_MAGN_INT = 87 27 | LSM_INT = 84 28 | -------------------------------------------------------------------------------- /system/hardware/tici/precise_power_measure.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import numpy as np 3 | from system.hardware.tici.power_monitor import sample_power 4 | 5 | if __name__ == '__main__': 6 | print("measuring for 5 seconds") 7 | for _ in range(3): 8 | pwrs = sample_power() 9 | print("mean %.2f std %.2f" % (np.mean(pwrs), np.std(pwrs))) 10 | -------------------------------------------------------------------------------- /system/hardware/tici/restart_modem.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | #nmcli connection modify --temporary lte gsm.home-only yes 4 | #nmcli connection modify --temporary lte gsm.auto-config yes 5 | #nmcli connection modify --temporary lte connection.autoconnect-retries 20 6 | sudo nmcli connection reload 7 | 8 | sudo systemctl stop ModemManager 9 | nmcli con down lte 10 | nmcli con down magenta-prime 11 | 12 | # power cycle modem 13 | /usr/comma/lte/lte.sh stop_blocking 14 | /usr/comma/lte/lte.sh start 15 | 16 | sudo systemctl restart NetworkManager 17 | #sudo systemctl restart ModemManager 18 | sudo ModemManager --debug 19 | -------------------------------------------------------------------------------- /system/hardware/tici/test_agnos_updater.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import json 3 | import os 4 | import unittest 5 | import requests 6 | 7 | AGNOS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__))) 8 | MANIFEST = os.path.join(AGNOS_DIR, "agnos.json") 9 | 10 | 11 | class TestAgnosUpdater(unittest.TestCase): 12 | 13 | def test_manifest(self): 14 | with open(MANIFEST) as f: 15 | m = json.load(f) 16 | 17 | for img in m: 18 | r = requests.head(img['url'], timeout=10) 19 | r.raise_for_status() 20 | self.assertEqual(r.headers['Content-Type'], "application/x-xz") 21 | if not img['sparse']: 22 | assert img['hash'] == img['hash_raw'] 23 | 24 | 25 | if __name__ == "__main__": 26 | unittest.main() 27 | -------------------------------------------------------------------------------- /system/hardware/tici/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/hardware/tici/tests/__init__.py -------------------------------------------------------------------------------- /system/hardware/tici/updater: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/system/hardware/tici/updater -------------------------------------------------------------------------------- /system/logcatd/.gitignore: -------------------------------------------------------------------------------- 1 | logcatd 2 | -------------------------------------------------------------------------------- /system/logcatd/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'cereal', 'messaging', 'common') 2 | 3 | env.Program('logcatd', 'logcatd_systemd.cc', LIBS=[cereal, messaging, common, 'zmq', 'capnp', 'kj', 'systemd', 'json11']) 4 | -------------------------------------------------------------------------------- /system/proclogd/SConscript: -------------------------------------------------------------------------------- 1 | Import('env', 'cereal', 'messaging', 'common') 2 | libs = [cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj', 'common', 'zmq', 'json11'] 3 | env.Program('proclogd', ['main.cc', 'proclog.cc'], LIBS=libs) 4 | 5 | if GetOption('test'): 6 | env.Program('tests/test_proclog', ['tests/test_proclog.cc', 'proclog.cc'], LIBS=libs) 7 | -------------------------------------------------------------------------------- /system/proclogd/main.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include "common/util.h" 5 | #include "system/proclogd/proclog.h" 6 | 7 | ExitHandler do_exit; 8 | 9 | int main(int argc, char **argv) { 10 | setpriority(PRIO_PROCESS, 0, -15); 11 | 12 | PubMaster publisher({"procLog"}); 13 | while (!do_exit) { 14 | MessageBuilder msg; 15 | buildProcLogMessage(msg); 16 | publisher.send("procLog", msg); 17 | 18 | util::sleep_for(2000); // 2 secs 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /system/proclogd/tests/.gitignore: -------------------------------------------------------------------------------- 1 | test_proclog 2 | -------------------------------------------------------------------------------- /third_party/SConscript: -------------------------------------------------------------------------------- 1 | Import('env') 2 | 3 | env.Library('json11', ['json11/json11.cpp'], CCFLAGS=env['CCFLAGS'] + ['-Wno-unqualified-std-cast-call']) 4 | env.Append(CPPPATH=[Dir('json11')]) 5 | 6 | env.Library('kaitai', ['kaitai/kaitaistream.cpp'], CPPDEFINES=['KS_STR_ENCODING_NONE']) 7 | -------------------------------------------------------------------------------- /third_party/acados/.gitignore: -------------------------------------------------------------------------------- 1 | acados_repo/ 2 | !x86_64/ 3 | !larch64/ 4 | !aarch64/ 5 | -------------------------------------------------------------------------------- /third_party/acados/Darwin/lib/libacados.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/Darwin/lib/libacados.dylib -------------------------------------------------------------------------------- /third_party/acados/Darwin/lib/libblasfeo.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/Darwin/lib/libblasfeo.dylib -------------------------------------------------------------------------------- /third_party/acados/Darwin/lib/libhpipm.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/Darwin/lib/libhpipm.dylib -------------------------------------------------------------------------------- /third_party/acados/Darwin/lib/libqpOASES_e.3.1.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/Darwin/lib/libqpOASES_e.3.1.dylib -------------------------------------------------------------------------------- /third_party/acados/Darwin/lib/libqpOASES_e.dylib: -------------------------------------------------------------------------------- 1 | libqpOASES_e.3.1.dylib -------------------------------------------------------------------------------- /third_party/acados/Darwin/t_renderer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/Darwin/t_renderer -------------------------------------------------------------------------------- /third_party/acados/larch64/lib/libacados.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/larch64/lib/libacados.so -------------------------------------------------------------------------------- /third_party/acados/larch64/lib/libblasfeo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/larch64/lib/libblasfeo.so -------------------------------------------------------------------------------- /third_party/acados/larch64/lib/libhpipm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/larch64/lib/libhpipm.so -------------------------------------------------------------------------------- /third_party/acados/larch64/lib/libqpOASES_e.so: -------------------------------------------------------------------------------- 1 | libqpOASES_e.so.3.1 -------------------------------------------------------------------------------- /third_party/acados/larch64/lib/libqpOASES_e.so.3.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/larch64/lib/libqpOASES_e.so.3.1 -------------------------------------------------------------------------------- /third_party/acados/larch64/t_renderer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/larch64/t_renderer -------------------------------------------------------------------------------- /third_party/acados/x86_64/lib/libacados.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/x86_64/lib/libacados.so -------------------------------------------------------------------------------- /third_party/acados/x86_64/lib/libblasfeo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/x86_64/lib/libblasfeo.so -------------------------------------------------------------------------------- /third_party/acados/x86_64/lib/libhpipm.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/x86_64/lib/libhpipm.so -------------------------------------------------------------------------------- /third_party/acados/x86_64/lib/libqpOASES_e.so: -------------------------------------------------------------------------------- 1 | libqpOASES_e.so.3.1 -------------------------------------------------------------------------------- /third_party/acados/x86_64/lib/libqpOASES_e.so.3.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/x86_64/lib/libqpOASES_e.so.3.1 -------------------------------------------------------------------------------- /third_party/acados/x86_64/t_renderer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/acados/x86_64/t_renderer -------------------------------------------------------------------------------- /third_party/curl/build.txt: -------------------------------------------------------------------------------- 1 | # with neos tree 2 | cd ~/android/system 3 | mka libcurl 4 | 5 | cp ~/android/system/out/target/product/oneplus3/obj/STATIC_LIBRARIES/libcurl_intermediates/libcurl.a lib/ 6 | -------------------------------------------------------------------------------- /third_party/curl/include/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = curl 2 | 3 | EXTRA_DIST = README 4 | 5 | AUTOMAKE_OPTIONS = foreign no-dependencies 6 | -------------------------------------------------------------------------------- /third_party/curl/include/curl/.gitignore: -------------------------------------------------------------------------------- 1 | stamp-h2 2 | stamp-h3 3 | curlver.h.dist 4 | -------------------------------------------------------------------------------- /third_party/curl/lib/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/curl/lib/libcurl.a -------------------------------------------------------------------------------- /third_party/kaitai/custom_decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef KAITAI_CUSTOM_DECODER_H 2 | #define KAITAI_CUSTOM_DECODER_H 3 | 4 | #include 5 | 6 | namespace kaitai { 7 | 8 | class custom_decoder { 9 | public: 10 | virtual ~custom_decoder() {}; 11 | virtual std::string decode(std::string src) = 0; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /third_party/kaitai/kaitaistruct.h: -------------------------------------------------------------------------------- 1 | #ifndef KAITAI_STRUCT_H 2 | #define KAITAI_STRUCT_H 3 | 4 | #include 5 | 6 | namespace kaitai { 7 | 8 | class kstruct { 9 | public: 10 | kstruct(kstream *_io) { m__io = _io; } 11 | virtual ~kstruct() {} 12 | protected: 13 | kstream *m__io; 14 | public: 15 | kstream *_io() { return m__io; } 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /third_party/libyuv/build.txt: -------------------------------------------------------------------------------- 1 | git clone https://chromium.googlesource.com/libyuv/libyuv 2 | cd libyuv 3 | git reset --hard 4a14cb2e81235ecd656e799aecaaf139db8ce4a2 4 | cmake . 5 | -------------------------------------------------------------------------------- /third_party/libyuv/include/libyuv/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef INCLUDE_LIBYUV_VERSION_H_ 12 | #define INCLUDE_LIBYUV_VERSION_H_ 13 | 14 | #define LIBYUV_VERSION 1622 15 | 16 | #endif // INCLUDE_LIBYUV_VERSION_H_ 17 | -------------------------------------------------------------------------------- /third_party/libyuv/larch64/lib/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/libyuv/larch64/lib/libyuv.a -------------------------------------------------------------------------------- /third_party/libyuv/lib/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/libyuv/lib/libyuv.a -------------------------------------------------------------------------------- /third_party/libyuv/mac/lib/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/libyuv/mac/lib/libyuv.a -------------------------------------------------------------------------------- /third_party/libyuv/mac_arm64/lib/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/libyuv/mac_arm64/lib/libyuv.a -------------------------------------------------------------------------------- /third_party/libyuv/x64/include: -------------------------------------------------------------------------------- 1 | ../include -------------------------------------------------------------------------------- /third_party/libyuv/x64/lib/libyuv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/libyuv/x64/lib/libyuv.a -------------------------------------------------------------------------------- /third_party/mapbox-gl-native-qt/.gitattributes: -------------------------------------------------------------------------------- 1 | x86_64 filter=lfs diff=lfs merge=lfs -text 2 | larch64 filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /third_party/mapbox-gl-native-qt/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | cd /tmp 3 | git clone --recursive https://github.com/commaai/mapbox-gl-native.git 4 | cd mapbox-gl-native 5 | mkdir build && cd build 6 | cmake -DMBGL_WITH_QT=ON .. 7 | make -j$(nproc) mbgl-qt 8 | -------------------------------------------------------------------------------- /third_party/mapbox-gl-native-qt/include/QMapbox: -------------------------------------------------------------------------------- 1 | #include "qmapbox.hpp" 2 | -------------------------------------------------------------------------------- /third_party/mapbox-gl-native-qt/include/QMapboxGL: -------------------------------------------------------------------------------- 1 | #include "qmapboxgl.hpp" 2 | -------------------------------------------------------------------------------- /third_party/mapbox-gl-native-qt/x86_64/libqmapboxgl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/mapbox-gl-native-qt/x86_64/libqmapboxgl.so -------------------------------------------------------------------------------- /third_party/qt5/larch64/bin/lrelease: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/qt5/larch64/bin/lrelease -------------------------------------------------------------------------------- /third_party/qt5/larch64/bin/lupdate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/qt5/larch64/bin/lupdate -------------------------------------------------------------------------------- /third_party/snpe/aarch64-ubuntu-gcc7.5/libPlatformValidatorShared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/aarch64-ubuntu-gcc7.5/libPlatformValidatorShared.so -------------------------------------------------------------------------------- /third_party/snpe/aarch64-ubuntu-gcc7.5/libSNPE.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/aarch64-ubuntu-gcc7.5/libSNPE.so -------------------------------------------------------------------------------- /third_party/snpe/aarch64-ubuntu-gcc7.5/libcalculator.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/aarch64-ubuntu-gcc7.5/libcalculator.so -------------------------------------------------------------------------------- /third_party/snpe/aarch64-ubuntu-gcc7.5/libhta.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/aarch64-ubuntu-gcc7.5/libhta.so -------------------------------------------------------------------------------- /third_party/snpe/aarch64-ubuntu-gcc7.5/libsnpe_dsp_domains_v2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/aarch64-ubuntu-gcc7.5/libsnpe_dsp_domains_v2.so -------------------------------------------------------------------------------- /third_party/snpe/dsp/libcalculator_skel.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/dsp/libcalculator_skel.so -------------------------------------------------------------------------------- /third_party/snpe/dsp/libsnpe_dsp_v65_domains_v2_skel.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/dsp/libsnpe_dsp_v65_domains_v2_skel.so -------------------------------------------------------------------------------- /third_party/snpe/dsp/libsnpe_dsp_v66_domains_v2_skel.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/dsp/libsnpe_dsp_v66_domains_v2_skel.so -------------------------------------------------------------------------------- /third_party/snpe/dsp/libsnpe_dsp_v68_domains_v3_skel.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/dsp/libsnpe_dsp_v68_domains_v3_skel.so -------------------------------------------------------------------------------- /third_party/snpe/include/DlSystem/ZdlExportDefine.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // 3 | // Copyright (c) 2015, 2020 Qualcomm Technologies, Inc. 4 | // All Rights Reserved. 5 | // Confidential and Proprietary - Qualcomm Technologies, Inc. 6 | // 7 | //============================================================================= 8 | 9 | #pragma once 10 | 11 | #ifndef ZDL_EXPORT 12 | #define ZDL_EXPORT 13 | #endif 14 | -------------------------------------------------------------------------------- /third_party/snpe/larch64: -------------------------------------------------------------------------------- 1 | aarch64-ubuntu-gcc7.5 -------------------------------------------------------------------------------- /third_party/snpe/x86_64: -------------------------------------------------------------------------------- 1 | x86_64-linux-clang -------------------------------------------------------------------------------- /third_party/snpe/x86_64-linux-clang/libHtpPrepare.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/x86_64-linux-clang/libHtpPrepare.so -------------------------------------------------------------------------------- /third_party/snpe/x86_64-linux-clang/libSNPE.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/x86_64-linux-clang/libSNPE.so -------------------------------------------------------------------------------- /third_party/snpe/x86_64-linux-clang/libomp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/third_party/snpe/x86_64-linux-clang/libomp.so -------------------------------------------------------------------------------- /tinygrad: -------------------------------------------------------------------------------- 1 | tinygrad_repo/tinygrad -------------------------------------------------------------------------------- /tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/__init__.py -------------------------------------------------------------------------------- /tools/cabana/.gitignore: -------------------------------------------------------------------------------- 1 | moc_* 2 | *.moc 3 | 4 | _cabana 5 | settings 6 | car_fingerprint_to_dbc.json 7 | tests/_test_cabana 8 | -------------------------------------------------------------------------------- /tools/cabana/cabana: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | export LD_LIBRARY_PATH="../../opendbc/can:$LD_LIBRARY_PATH" 4 | exec ./_cabana "$@" 5 | -------------------------------------------------------------------------------- /tools/cabana/tests/test_cabana: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | export LD_LIBRARY_PATH="../../../opendbc/can:$LD_LIBRARY_PATH" 4 | exec ./_test_cabana "$1" 5 | -------------------------------------------------------------------------------- /tools/cabana/tests/test_runner.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_RUNNER 2 | #include "catch2/catch.hpp" 3 | #include 4 | 5 | int main(int argc, char **argv) { 6 | // unit tests for Qt 7 | QCoreApplication app(argc, argv); 8 | const int res = Catch::Session().run(argc, argv); 9 | return (res < 0xff ? res : 0xff); 10 | } 11 | -------------------------------------------------------------------------------- /tools/gpstest/.gitignore: -------------------------------------------------------------------------------- 1 | LimeGPS/ 2 | LimeSuite/ 3 | hackrf/ 4 | gps-sdr-sim/ 5 | -------------------------------------------------------------------------------- /tools/gpstest/patches/limeGPS/inc_ephem_array_size.patch: -------------------------------------------------------------------------------- 1 | diff --git a/gpssim.h b/gpssim.h 2 | index c30b227..2ae0802 100644 3 | --- a/gpssim.h 4 | +++ b/gpssim.h 5 | @@ -75,7 +75,7 @@ 6 | #define SC08 (8) 7 | #define SC16 (16) 8 | 9 | -#define EPHEM_ARRAY_SIZE (13) // for daily GPS broadcast ephemers file (brdc) 10 | +#define EPHEM_ARRAY_SIZE (20) // for daily GPS broadcast ephemers file (brdc) 11 | 12 | /*! \brief Structure representing GPS time */ 13 | typedef struct 14 | -------------------------------------------------------------------------------- /tools/gpstest/patches/limeGPS/makefile.patch: -------------------------------------------------------------------------------- 1 | diff --git a/makefile b/makefile 2 | index 51bfabf..d0ea1eb 100644 3 | --- a/makefile 4 | +++ b/makefile 5 | @@ -1,5 +1,4 @@ 6 | CC=gcc -O2 -Wall 7 | 8 | all: limegps.c gpssim.c 9 | - $(CC) -o LimeGPS limegps.c gpssim.c -lm -lpthread -lLimeSuite 10 | - 11 | + $(CC) -o LimeGPS limegps.c gpssim.c -lm -lpthread -lLimeSuite -I../LimeSuite/src -L../LimeSuite/builddir/src -Wl,-rpath="$(PWD)/../LimeSuite/builddir/src" 12 | -------------------------------------------------------------------------------- /tools/gpstest/patches/limeSuite/reference_print.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/FPGA_common/FPGA_common.cpp b/src/FPGA_common/FPGA_common.cpp 2 | index 4e81f33e..7381c475 100644 3 | --- a/src/FPGA_common/FPGA_common.cpp 4 | +++ b/src/FPGA_common/FPGA_common.cpp 5 | @@ -946,7 +946,7 @@ double FPGA::DetectRefClk(double fx3Clk) 6 | 7 | if (i == 0) 8 | return -1; 9 | - lime::info("Reference clock %1.2f MHz", clkTbl[i - 1] / 1e6); 10 | + //lime::info("Reference clock %1.2f MHz", clkTbl[i - 1] / 1e6); 11 | return clkTbl[i - 1]; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /tools/gpstest/run_unittest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # NOTE: can only run inside limeGPS test box! 4 | 5 | # run limeGPS with random static location 6 | timeout 300 ./simulate_gps_signal.py 32.7518 -117.1962 & 7 | gps_PID=$(ps -aux | grep -m 1 "timeout 300" | awk '{print $2}') 8 | 9 | echo "starting limeGPS..." 10 | sleep 10 11 | 12 | # run unit tests (skipped when module not present) 13 | python -m unittest test_gps.py 14 | python -m unittest test_gps_qcom.py 15 | 16 | kill $gps_PID 17 | -------------------------------------------------------------------------------- /tools/gpstest/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 5 | cd $DIR 6 | 7 | if [ ! -d LimeSuite ]; then 8 | git clone https://github.com/myriadrf/LimeSuite.git 9 | cd LimeSuite 10 | # checkout latest version which has firmware updates available 11 | git checkout v20.10.0 12 | git apply ../patches/limeSuite/* 13 | mkdir builddir && cd builddir 14 | cmake -DCMAKE_BUILD_TYPE=Release .. 15 | make -j4 16 | cd ../.. 17 | fi 18 | 19 | if [ ! -d LimeGPS ]; then 20 | git clone https://github.com/osqzss/LimeGPS.git 21 | cd LimeGPS 22 | git apply ../patches/limeGPS/* 23 | make 24 | cd .. 25 | fi 26 | -------------------------------------------------------------------------------- /tools/gpstest/setup_hackrf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 5 | cd $DIR 6 | 7 | if [ ! -d gps-sdr-sim ]; then 8 | git clone https://github.com/osqzss/gps-sdr-sim.git 9 | cd gps-sdr-sim 10 | make 11 | cd .. 12 | fi 13 | 14 | if [ ! -d hackrf ]; then 15 | git clone https://github.com/greatscottgadgets/hackrf.git 16 | cd hackrf/host 17 | git apply ../../patches/hackrf.patch 18 | cmake . 19 | make 20 | fi 21 | 22 | -------------------------------------------------------------------------------- /tools/joystick/steer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/joystick/steer.gif -------------------------------------------------------------------------------- /tools/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/lib/__init__.py -------------------------------------------------------------------------------- /tools/lib/auth_config.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | from common.file_helpers import mkdirs_exists_ok 4 | from system.hardware import PC 5 | 6 | 7 | class MissingAuthConfigError(Exception): 8 | pass 9 | 10 | 11 | if PC: 12 | CONFIG_DIR = os.path.expanduser('~/.comma') 13 | else: 14 | CONFIG_DIR = "/tmp/.comma" 15 | 16 | mkdirs_exists_ok(CONFIG_DIR) 17 | 18 | 19 | def get_token(): 20 | try: 21 | with open(os.path.join(CONFIG_DIR, 'auth.json')) as f: 22 | auth = json.load(f) 23 | return auth['access_token'] 24 | except Exception: 25 | return None 26 | 27 | 28 | def set_token(token): 29 | with open(os.path.join(CONFIG_DIR, 'auth.json'), 'w') as f: 30 | json.dump({'access_token': token}, f) 31 | 32 | 33 | def clear_token(): 34 | os.unlink(os.path.join(CONFIG_DIR, 'auth.json')) 35 | -------------------------------------------------------------------------------- /tools/lib/cache.py: -------------------------------------------------------------------------------- 1 | import os 2 | import urllib.parse 3 | from common.file_helpers import mkdirs_exists_ok 4 | 5 | DEFAULT_CACHE_DIR = os.path.expanduser("~/.commacache") 6 | 7 | def cache_path_for_file_path(fn, cache_prefix=None): 8 | dir_ = os.path.join(DEFAULT_CACHE_DIR, "local") 9 | mkdirs_exists_ok(dir_) 10 | fn_parsed = urllib.parse.urlparse(fn) 11 | if fn_parsed.scheme == '': 12 | cache_fn = os.path.abspath(fn).replace("/", "_") 13 | else: 14 | cache_fn = f'{fn_parsed.hostname}_{fn_parsed.path.replace("/", "_")}' 15 | return os.path.join(dir_, cache_fn) 16 | -------------------------------------------------------------------------------- /tools/lib/exceptions.py: -------------------------------------------------------------------------------- 1 | class DataUnreadableError(Exception): 2 | pass 3 | -------------------------------------------------------------------------------- /tools/lib/filereader.py: -------------------------------------------------------------------------------- 1 | import os 2 | from tools.lib.url_file import URLFile 3 | 4 | DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.comma.internal/") 5 | 6 | def FileReader(fn, debug=False): 7 | if fn.startswith("cd:/"): 8 | fn = fn.replace("cd:/", DATA_ENDPOINT) 9 | if fn.startswith("http://") or fn.startswith("https://"): 10 | return URLFile(fn, debug=debug) 11 | return open(fn, "rb") 12 | -------------------------------------------------------------------------------- /tools/lib/helpers.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | 3 | TIME_FMT = "%Y-%m-%d--%H-%M-%S" 4 | 5 | # regex patterns 6 | class RE: 7 | DONGLE_ID = r'(?P[a-z0-9]{16})' 8 | TIMESTAMP = r'(?P[0-9]{4}-[0-9]{2}-[0-9]{2}--[0-9]{2}-[0-9]{2}-[0-9]{2})' 9 | ROUTE_NAME = r'{}[|_/]{}'.format(DONGLE_ID, TIMESTAMP) 10 | SEGMENT_NAME = r'{}(?:--|/)(?P[0-9]+)'.format(ROUTE_NAME) 11 | BOOTLOG_NAME = ROUTE_NAME 12 | 13 | EXPLORER_FILE = r'^(?P{})--(?P[a-z]+\.[a-z0-9]+)$'.format(SEGMENT_NAME) 14 | OP_SEGMENT_DIR = r'^(?P{})$'.format(SEGMENT_NAME) 15 | 16 | def timestamp_to_datetime(t: str) -> datetime.datetime: 17 | """ 18 | Convert an openpilot route timestamp to a python datetime 19 | """ 20 | return datetime.datetime.strptime(t, TIME_FMT) 21 | -------------------------------------------------------------------------------- /tools/lib/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/lib/tests/__init__.py -------------------------------------------------------------------------------- /tools/lib/vidindex/.gitignore: -------------------------------------------------------------------------------- 1 | vidindex 2 | -------------------------------------------------------------------------------- /tools/lib/vidindex/Makefile: -------------------------------------------------------------------------------- 1 | CC := gcc 2 | 3 | vidindex: bitstream.c bitstream.h vidindex.c 4 | $(eval $@_TMP := $(shell mktemp)) 5 | $(CC) -std=c99 bitstream.c vidindex.c -o $($@_TMP) 6 | mv $($@_TMP) $@ 7 | -------------------------------------------------------------------------------- /tools/lib/vidindex/bitstream.h: -------------------------------------------------------------------------------- 1 | #ifndef bitstream_H 2 | #define bitstream_H 3 | 4 | 5 | #include 6 | #include 7 | 8 | struct bitstream { 9 | const uint8_t *buffer_ptr; 10 | const uint8_t *buffer_end; 11 | uint64_t value; 12 | uint32_t pos; 13 | uint32_t shift; 14 | size_t size; 15 | }; 16 | 17 | void bs_init(struct bitstream *bs, const uint8_t *buffer, size_t input_size); 18 | void bs_seek(struct bitstream *bs, size_t new_pos); 19 | uint32_t bs_get(struct bitstream *bs, int n); 20 | uint32_t bs_peek(struct bitstream *bs, int n); 21 | size_t bs_remain(struct bitstream *bs); 22 | int bs_eof(struct bitstream *bs); 23 | uint32_t bs_ue(struct bitstream *bs); 24 | int32_t bs_se(struct bitstream *bs); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /tools/plotjuggler/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | bin 3 | *.rlog 4 | -------------------------------------------------------------------------------- /tools/replay/.gitignore: -------------------------------------------------------------------------------- 1 | moc_* 2 | *.moc 3 | 4 | replay 5 | tests/test_replay 6 | -------------------------------------------------------------------------------- /tools/replay/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/replay/__init__.py -------------------------------------------------------------------------------- /tools/replay/filereader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class FileReader { 7 | public: 8 | FileReader(bool cache_to_local, size_t chunk_size = 0, int retries = 3) 9 | : cache_to_local_(cache_to_local), chunk_size_(chunk_size), max_retries_(retries) {} 10 | virtual ~FileReader() {} 11 | std::string read(const std::string &file, std::atomic *abort = nullptr); 12 | 13 | private: 14 | std::string download(const std::string &url, std::atomic *abort); 15 | size_t chunk_size_; 16 | int max_retries_; 17 | bool cache_to_local_; 18 | }; 19 | 20 | std::string cacheFilePath(const std::string &url); 21 | -------------------------------------------------------------------------------- /tools/replay/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/replay/lib/__init__.py -------------------------------------------------------------------------------- /tools/replay/tests/test_runner.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_RUNNER 2 | #include "catch2/catch.hpp" 3 | #include 4 | 5 | int main(int argc, char **argv) { 6 | // unit tests for Qt 7 | QCoreApplication app(argc, argv); 8 | const int res = Catch::Session().run(argc, argv); 9 | return (res < 0xff ? res : 0xff); 10 | } 11 | -------------------------------------------------------------------------------- /tools/scripts/setup_ssh_keys.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import requests 4 | from common.params import Params 5 | import sys 6 | 7 | 8 | if __name__ == "__main__": 9 | if len(sys.argv) < 2: 10 | print(f"{sys.argv[0]} ") 11 | exit(1) 12 | 13 | username = sys.argv[1] 14 | keys = requests.get(f"https://github.com/{username}.keys", timeout=10) 15 | 16 | if keys.status_code == 200: 17 | Params().put("GithubSshKeys", keys.text) 18 | Params().put("GithubUsername", username) 19 | print("Setup ssh keys successfully") 20 | else: 21 | print("Error getting public keys from github") 22 | -------------------------------------------------------------------------------- /tools/serial/README.md: -------------------------------------------------------------------------------- 1 | # comma serial 2 | 3 | The comma serial gets you access to a low level serial console on your comma three, while providing a stable 12V to power the device. 4 | 5 | The serial is available on the [comma shop](https://comma.ai/shop/products/comma-serial). 6 | 7 | ## setup 8 | 9 | * Connect all three cables to the serial 10 | * Connect the USB A to your computer 11 | * Connect the USB-C to the OBD-C port on your comma three 12 | 13 | ## usage 14 | 15 | ``` 16 | sudo screen /dev/ttyUSB0 115200 17 | ``` 18 | or use `connect.sh` to run the previous command in a loop. 19 | 20 | 21 | The username and password are both `comma`. 22 | -------------------------------------------------------------------------------- /tools/serial/connect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while true; do 4 | if ls /dev/serial/by-id/usb-FTDI_FT230X* 2> /dev/null; then 5 | sudo screen /dev/serial/by-id/usb-FTDI_FT230X* 115200 6 | fi 7 | sleep 0.005 8 | done 9 | -------------------------------------------------------------------------------- /tools/sim/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/sim/__init__.py -------------------------------------------------------------------------------- /tools/sim/build_container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | cd $DIR/../../ 5 | 6 | docker pull ghcr.io/commaai/openpilot-base-cl:latest 7 | docker build \ 8 | --cache-from ghcr.io/commaai/openpilot-sim:latest \ 9 | -t ghcr.io/commaai/openpilot-sim:latest \ 10 | -f tools/sim/Dockerfile.sim . 11 | -------------------------------------------------------------------------------- /tools/sim/launch_openpilot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PASSIVE="0" 4 | export NOBOARD="1" 5 | export SIMULATION="1" 6 | export SKIP_FW_QUERY="1" 7 | export FINGERPRINT="HONDA CIVIC 2016" 8 | 9 | export BLOCK="camerad,loggerd,encoderd,micd" 10 | if [[ "$CI" ]]; then 11 | # TODO: offscreen UI should work 12 | export BLOCK="${BLOCK},ui" 13 | fi 14 | 15 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 16 | cd ../../selfdrive/manager && exec ./manager.py 17 | -------------------------------------------------------------------------------- /tools/sim/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/sim/lib/__init__.py -------------------------------------------------------------------------------- /tools/sim/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache2046/openpilot/f1380f01a91e127efb27b5043eaac7536f8b30a0/tools/sim/tests/__init__.py -------------------------------------------------------------------------------- /tools/sim/tmux_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | tmux new -d -s carla-sim 3 | tmux send-keys "./launch_openpilot.sh" ENTER 4 | tmux neww 5 | tmux send-keys "./bridge.py $*" ENTER 6 | tmux a -t carla-sim 7 | -------------------------------------------------------------------------------- /tools/zookeeper/check_consumption.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import time 5 | from tools.zookeeper import Zookeeper 6 | 7 | # Usage: check_consumption.py 8 | # Exit code: 0 -> passed 9 | # 1 -> failed 10 | 11 | if __name__ == "__main__": 12 | z = Zookeeper() 13 | 14 | averaging_time_s = int(sys.argv[1]) 15 | max_average_power = float(sys.argv[2]) 16 | 17 | start_time = time.time() 18 | measurements = [] 19 | while time.time() - start_time < averaging_time_s: 20 | measurements.append(z.read_power()) 21 | time.sleep(0.1) 22 | 23 | average_power = sum(measurements)/len(measurements) 24 | print(f"Average power: {round(average_power, 4)}W") 25 | 26 | if average_power > max_average_power: 27 | exit(1) 28 | -------------------------------------------------------------------------------- /tools/zookeeper/disable.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from tools.zookeeper import Zookeeper 4 | 5 | if __name__ == "__main__": 6 | z = Zookeeper() 7 | z.set_device_power(False) 8 | 9 | -------------------------------------------------------------------------------- /tools/zookeeper/enable_and_wait.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import time 5 | from socket import gethostbyname, gaierror 6 | from tools.zookeeper import Zookeeper 7 | 8 | def is_online(ip): 9 | try: 10 | addr = gethostbyname(ip) 11 | return (os.system(f"ping -c 1 {addr} > /dev/null") == 0) 12 | except gaierror: 13 | return False 14 | 15 | if __name__ == "__main__": 16 | z = Zookeeper() 17 | z.set_device_power(True) 18 | 19 | 20 | ip = str(sys.argv[1]) 21 | timeout = int(sys.argv[2]) 22 | start_time = time.time() 23 | while not is_online(ip): 24 | print(f"{ip} not online yet!") 25 | 26 | if time.time() - start_time > timeout: 27 | print("Timed out!") 28 | raise TimeoutError() 29 | 30 | time.sleep(1) 31 | 32 | -------------------------------------------------------------------------------- /tools/zookeeper/ignition.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | from tools.zookeeper import Zookeeper 5 | 6 | 7 | if __name__ == "__main__": 8 | z = Zookeeper() 9 | z.set_device_ignition(1 if int(sys.argv[1]) > 0 else 0) 10 | 11 | -------------------------------------------------------------------------------- /tools/zookeeper/test_zookeeper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import time 4 | from tools.zookeeper import Zookeeper 5 | 6 | 7 | if __name__ == "__main__": 8 | z = Zookeeper() 9 | z.set_device_power(True) 10 | 11 | i = 0 12 | ign = False 13 | while 1: 14 | voltage = round(z.read_voltage(), 2) 15 | current = round(z.read_current(), 3) 16 | power = round(z.read_power(), 2) 17 | z.set_device_ignition(ign) 18 | print(f"Voltage: {voltage}V, Current: {current}A, Power: {power}W, Ignition: {ign}") 19 | 20 | if i > 200: 21 | ign = not ign 22 | i = 0 23 | 24 | i += 1 25 | time.sleep(0.1) 26 | --------------------------------------------------------------------------------