Giter VIP home page Giter VIP logo

emu-sh / .oh-my-comma Goto Github PK

View Code? Open in Web Editor NEW
125.0 125.0 17.0 184 KB

The idea of a 'workbench for developers' - Shell utilities, tooling, and dotfiles for comma.ai's open-source self-driving car technology stack

Home Page: http://www.emu.sh/.oh-my-comma/

License: Creative Commons Zero v1.0 Universal

Shell 24.43% Python 75.57%
android command-line-tool dotfiles powerline self-driving-car self-hosted shell-script termux

.oh-my-comma's People

Contributors

askalice avatar royjr avatar scottadair avatar sshane avatar tamarindmonkey avatar zorrobyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

.oh-my-comma's Issues

Cannot switch to sshane's fork

I wanted to checkout on the https://github.com/sshane/openpilot

root@localhost:/data/openpilot$ emu fork switch sshane -r sshane -b SA-release
Fork exists but wasn't in params, updating now...
Fetching sshane's fork, this may take a sec...
❌ The branch you specified does not exist!
Did you mean:
 - master

so this fails.

However, this:

root@localhost:/data/openpilot$ emu fork switch sshane -r sshane -b SA-master
Fetching sshane's latest changes...
Unknown branch, checking out most similar: master
New branch! Tracking and checking out sshane_master from sshane/master
Branch 'sshane_master' set up to track remote branch 'master' from 'sshane'.
Switched to a new branch 'sshane_master'

✅ Successfully checked out sshane/master as sshane_master

checks out something from not sure where but it contains only the README.md file:

### Hi, I'm Shane 🔭

A few of my projects:
- fork of openpilot, called Stock Additions with a [couple of cool features](https://github.com/shanesmiskol/openpilot#highlight-features) 🚗
- [Konverter](https://github.com/ShaneSmiskol/Konverter), a tool to konvert Keras models into Python files to inference on with just Python 🐍 and NumPy
- [A model to detect traffic lights](https://github.com/ShaneSmiskol/traffic-lights) 🚦 from a single image to display alerts in openpilot, along with a 27.6 GB database of traffic light images collected from users.
  - *Now deprecated mainly due to the optimizations that I didn't make that caused it to consume much too much CPU alongside openpilot. The database is still free to download*

@sshane

emu device reboot: Command has not been implemented yet

I tried to reboot c2 using this command

emu device reboot 

However, I got this error

❌ Command has not been implemented yet, please try updating.

I already ran emu update
here is the update result

Already up to date.
Successfully updated emu utilities!

Updated /data/community/.oh-my-comma
====== FROM ======
Version v0.1.16 | branch master | remote https://github.com/emu-sh/.oh-my-comma.git
Version v0.1.16 | branch master | remote https://github.com/emu-sh/.oh-my-comma.git
======= TO =======

What I should do to reboot c2 with emu?

create a top-like interface for carparams and such

TODO:

  • learn zmq sockets
  • learn the internals of cereal
  • decode DBC and display live CAN data from cereal within the terminal via SSH, with a prompt for searching via address, signal, or message name
  • broadcast a webserver that hosts this data a live, HANDS-OFF view for safe use with tablets, head units, etc

See Also:
https://github.com/jfrux/workbench/search?q=service_list&unscoped_q=service_list

https://github.com/commaai/cereal/blob/68fdf28670b48a16a60498b4e5cc1984e7e66651/service_list.yaml

Switching to dragonpilot doesn't work

When I try to switch to Dragonpilot I get a "Invalid username! https://github.com/dragonpilot-community/openpilot does not exist"

Here's the command I'm running: emu fork switch dragonpilot-community -b testing

It's worth noting that the repository is actually https://github.com/dragonpilot-community/dragonpilot (not openpilot). Is there a way to specify the reposity URL? I tried emu fork switch dragonpilot-community/dragonpilot -b testing but got invalid username.

Kill openpilot before starting setup

Just installed emu and during initial clone of openpilot I get an error. See below for copy of terminal.

`
root@localhost:/data$ emu fork list
To set up emu fork management we will clone commaai/openpilot into /data/openpilot
Confirm you would like to continue
[Y/n]: Y

Cloning commaai/openpilot into /data/openpilot, please wait...
Cloning into '/data/openpilot'...
remote: Enumerating objects: 45323, done.
remote: Counting objects: 100% (346/346), done.
remote: Compressing objects: 100% (152/152), done.
remote: Total 45323 (delta 225), reused 275 (delta 190), pack-reused 44977
Receiving objects: 100% (45323/45323), 1.43 GiB | 2.47 MiB/s, done.
Resolving deltas: 100% (25529/25529), done.
error: Untracked working tree file '.overlay_init' would be overwritten by merge.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

❌ Error while cloning, please try again`

Errors when switching from sshane to commaai forks on Comma 3

I was on latest sshane fork and switched to commaai. Got errors about untracked files, with a suggestion to use -f flag. When doing that, got warnings about inability to remove directories. Now I'm not sure if I can use my comma or if I should wipe it and start over. See the terminal output below.

comma@tici:/data/openpilot$ emu fork switch commaai
Fetching commaai's latest changes...
error: The following untracked working tree files would be overwritten by checkout:
        cereal/.gitignore
        cereal/SConscript
        cereal/__init__.py
        cereal/car.capnp
        cereal/include/c++.capnp
        cereal/include/java.capnp
        cereal/legacy.capnp
        cereal/log.capnp
        cereal/logger/logger.h
        cereal/messaging/.gitignore
        cereal/messaging/__init__.py
        cereal/messaging/bridge.cc
        cereal/messaging/impl_msgq.cc
        cereal/messaging/impl_msgq.h
        cereal/messaging/impl_zmq.cc
        cereal/messaging/impl_zmq.h
        cereal/messaging/messaging.cc
        cereal/messaging/messaging.h
        cereal/messaging/messaging.pxd
        cereal/messaging/messaging_pyx.pyx
        cereal/messaging/msgq.cc
        cereal/messaging/msgq.h
        cereal/messaging/socketmaster.cc
        cereal/services.py
        cereal/visionipc/.gitignore
        cereal/visionipc/__init__.py
        cereal/visionipc/ipc.cc
        cereal/visionipc/ipc.h
        cereal/visionipc/test_runner.cc
        cereal/visionipc/visionbuf.cc
        cereal/visionipc/visionbuf.h
        cereal/visionipc/visionbuf_cl.cc
        cereal/visionipc/visionbuf_ion.cc
        cereal/visionipc/visionipc.h
        cereal/visionipc/visionipc.pxd
        cereal/visionipc/visionipc_client.cc
        cereal/visionipc/visionipc_client.h
        cereal/visionipc/visionipc_pyx.pyx
        cereal/visionipc/visionipc_server.cc
        cereal/visionipc/visionipc_server.h
        cereal/visionipc/visionipc_tests.cc
        opendbc/.gitignore
        opendbc/__init__.py
        opendbc/acura_ilx_2016_can_generated.dbc
        opendbc/acura_ilx_2016_nidec.dbc
        opendbc/acura_rdx_2018_can_generated.dbc
        opendbc/acura_rdx_2020_can_generated.dbc
        opendbc/can/SConscript
        opendbc/can/__init__.py
        opendbc/can/can_define.py
        opendbc/can/common.cc
        opendbc/can/common.h
        opendbc/can/common.pxd
        opendbc/can/common_dbc.h
        opendbc/can/dbc.cc
        opendbc/can/dbc.py
        opendbc/can/dbc_out/.gitignore
        opendbc/can/dbc_out/.gitkeep
        opendbc/can/dbc_template.cc
        opendbc/can/packer.cc
        opendbc/can/packer.py
        opendbc/can/packer_pyx.pyx
        opendbc/can/parser.cc
        opendbc/can/parser.py
        opendbc/can/parser_pyx.pyx
        opendbc/can/process_dbc.py
        opendbc/chrysler_pacifica_2017_hybrid.dbc
        opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc
        opendbc/ford_fusion_2018_adas.dbc
        opendbc/ford_fusion_2018_pt.dbc
        opendbc/gm_global_a_chassis.dbc
        opendbc/gm_global_a_object.dbc
        opendbc/gm_global_a_powertrain.dbc
        opendbc/honda_accord_2018_can_generated.dbc
        opendbc/honda_civic_hatchback_ex_2017_can_generated.dbc
        opendbc/honda_civic_sedan_16_diesel_2019_can_generated.dbc
        opendbc/honda_civic_touring_2016_can_generated.dbc
        opendbc/honda_crv_ex_2017_body_generated.dbc
        opendbc/honda_crv_ex_2017_can_generated.dbc
        opendbc/honda_crv_executive_2016_can_generated.dbc
        opendbc/honda_crv_hybrid_2019_can_generated.dbc
        opendbc/honda_crv_touring_2016_can_generated.dbc
        opendbc/honda_fit_ex_2018_can_generated.dbc
        opendbc/honda_insight_ex_2019_can_generated.dbc
        opendbc/honda_odyssey_exl_2018_generated.dbc
        opendbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc
        opendbc/honda_pilot_touring_2017_can_generated.dbc
        opendbc/honda_ridgeline_black_edition_2017_can_generated.dbc
        opendbc/hyundai_kia_generic.dbc
        opendbc/lexus_ct200h_2018_pt_generated.dbc
        opendbc/lexus_is_2018_pt_generated.dbc
        opendbc/lexus_nx300_2018_pt_generated.dbc
        opendbc/lexus_nx300h_2018_pt_generated.dbc
        opendbc/lexus_rx_350_2016_pt_generated.dbc
        opendbc/lexus_rx_hybrid_2017_pt_generated.dbc
        opendbc/mazda_2017.dbc
        opendbc/nissan_leaf_2018.dbc
        opendbc/nissan_x_trail_2017.dbc
        opendbc/subaru_forester_2017_generated.dbc
        opendbc/subaru_global_2017_generated.dbc
        opendbc/subaru_outback_2015_generated.dbc
        opendbc/subaru_outback_2019_generated.dbc
        opendbc/tesla_can.dbc
        opendbc/toyota_adas.dbc
        opendbc/toyota_avalon_2017_pt_generated.dbc
        opendbc/toyota_camry_hybrid_2018_pt_generated.dbc
        opendbc/toyota_corolla_2017_pt_generated.dbc
        opendbc/toyota_highlander_2017_pt_generated.dbc
        opendbc/toyota_highlander_hybrid_2018_pt_generated.dbc
        opendbc/toyota_nodsu_hybrid_pt_generated.dbc
        opendbc/toyota_nodsu_pt_generated.dbc
        opendbc/toyota_prius_2017_pt_generated.dbc
        opendbc/toyota_rav4_2017_pt_generated.dbc
        opendbc/toyota_rav4_hybrid_2017_pt_generated.dbc
        opendbc/toyota_sienna_x
Aborting
❌ Error while checking out branch, please try again or use flag --force

So I use the -f flag and get these warnings:

comma@tici:/data/openpilot$ emu fork switch commaai -f
Fetching commaai's latest changes...
warning: unable to rmdir 'cereal': Directory not empty
warning: unable to rmdir 'laika_repo': Directory not empty
warning: unable to rmdir 'opendbc': Directory not empty
warning: unable to rmdir 'panda': Directory not empty
warning: unable to rmdir 'rednose_repo': Directory not empty
Updating files: 100% (2022/2022), done.
Switched to branch 'commaai_release2'
Your branch is up to date with 'commaai/release2'.

✅ Successfully checked out commaai/release2 as commaai_release2

Port OpenRemoteStart's 5V UART 9600 baud communication for interfacing between raspberry pi and fortin's evo-one, and tool it into neos via a websocket interface

As described in #30 , I am going to make cereal work over websockets, but I'd also like the same interface to be usable for interop between my remote start, a raspberry pi, and a comma two.

based on https://github.com/jmaxxz/OpenRemoteStart
This will probably be a submodule, or its own repository specifically for pi-related enhancements. Hoping to do something in three.js just so the raspberry pi turns into a crisp, slightly charred, raspberry mush. Delicious 🐱‍👤
image

However, this issue is specifically for an interface that works over the websocket server that would have to run on the comma two.

see more: https://www.youtube.com/watch?v=w8SG2V3n4-U

New install of emu fails to run most device commands

emu device: 📈 Statistics about your device

comma@tici:/data/openpilot$ emu device
❌ You must specify a command for emu device. Some options are:
- emu device battery: 🔋 see information about the state of your battery
- emu device reboot: ⚡ safely reboot your device
- emu device shutdown: 🔌 safely shutdown your device
  >>  Arguments 💢:
    - -r, --reboot: An alternate way to reboot your device

- emu device settings: ⚙️ open the Settings app
  >>  Arguments 💢:
    - -c, --close: Closes the settings application

emu device battery: 🔋 see information about the state of your battery

comma@tici:/data/openpilot$ emu device battery
Traceback (most recent call last):
  File "/data/community/.oh-my-comma/emu.py", line 42, in <module>
    emu = Emu(args)
  File "/data/community/.oh-my-comma/emu.py", line 23, in __init__
    self.parse()
  File "/data/community/.oh-my-comma/emu.py", line 33, in parse
    self.commands[cmd].main(self.args, cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 22, in main
    self.start_function_from_str(cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 31, in start_function_from_str
    getattr(self, cmd)()  # call command's function
  File "/data/community/.oh-my-comma/commands/device/__init__.py", line 44, in _battery
    r = check_output('dumpsys batterymanager')
  File "/data/community/.oh-my-comma/py_utils/emu_utils.py", line 135, in check_output
    return Output(subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT, encoding='utf8', shell=shell))
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dumpsys'

emu device reboot: ⚡ safely reboot your device

comma@tici:/data/openpilot$ emu device reboot
Traceback (most recent call last):
  File "/data/community/.oh-my-comma/emu.py", line 42, in <module>
    emu = Emu(args)
  File "/data/community/.oh-my-comma/emu.py", line 23, in __init__
    self.parse()
  File "/data/community/.oh-my-comma/emu.py", line 33, in parse
    self.commands[cmd].main(self.args, cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 22, in main
    self.start_function_from_str(cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 31, in start_function_from_str
    getattr(self, cmd)()  # call command's function
  File "/data/community/.oh-my-comma/commands/device/__init__.py", line 39, in _reboot
    check_output('am start -a android.intent.action.REBOOT')
  File "/data/community/.oh-my-comma/py_utils/emu_utils.py", line 135, in check_output
    return Output(subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT, encoding='utf8', shell=shell))
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'am'

emu device shutdown: 🔌 safely shutdown your device

comma@tici:/data/openpilot$ emu device shutdown
Traceback (most recent call last):
  File "/data/community/.oh-my-comma/emu.py", line 42, in <module>
    emu = Emu(args)
  File "/data/community/.oh-my-comma/emu.py", line 23, in __init__
    self.parse()
  File "/data/community/.oh-my-comma/emu.py", line 33, in parse
    self.commands[cmd].main(self.args, cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 22, in main
    self.start_function_from_str(cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 31, in start_function_from_str
    getattr(self, cmd)()  # call command's function
  File "/data/community/.oh-my-comma/commands/device/__init__.py", line 34, in _shutdown
    check_output('am start -n android/com.android.internal.app.ShutdownActivity')
  File "/data/community/.oh-my-comma/py_utils/emu_utils.py", line 135, in check_output
    return Output(subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT, encoding='utf8', shell=shell))
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'am'

emu device settings: ⚙ open the Settings app

comma@tici:/data/openpilot$ emu device settings
Traceback (most recent call last):
  File "/data/community/.oh-my-comma/emu.py", line 42, in <module>
    emu = Emu(args)
  File "/data/community/.oh-my-comma/emu.py", line 23, in __init__
    self.parse()
  File "/data/community/.oh-my-comma/emu.py", line 33, in parse
    self.commands[cmd].main(self.args, cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 22, in main
    self.start_function_from_str(cmd)
  File "/data/community/.oh-my-comma/commands/base.py", line 31, in start_function_from_str
    getattr(self, cmd)()  # call command's function
  File "/data/community/.oh-my-comma/commands/device/__init__.py", line 26, in _settings
    check_output('am start -a android.settings.SETTINGS')
  File "/data/community/.oh-my-comma/py_utils/emu_utils.py", line 135, in check_output
    return Output(subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT, encoding='utf8', shell=shell))
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/pyenv/versions/3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'am'

emu version:

comma@tici:/data/openpilot$ emu update
Already up to date.

✅ Successfully updated emu utilities!

Updated /data/community/.oh-my-comma
====== FROM ======
Version v0.1.17 | branch master | remote https://github.com/emu-sh/.oh-my-comma.git
Version v0.1.17 | branch master | remote https://github.com/emu-sh/.oh-my-comma.git
======= TO =======
comma@tici:/data/openpilot$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.