-
Notifications
You must be signed in to change notification settings - Fork 10.8k
a better remote body teleoperation experience #37732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
stefpi
wants to merge
96
commits into
master
Choose a base branch
from
good-remote-body
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
63adbdd
feat: forward joystick mode sdp offer through athena
stefpi 16a2fbf
feat: add getNotCar dispatcher
stefpi b346efb
fix: context manager with statement
stefpi 8cb630a
track fix/datachannel-double-counting
stefpi d7883cd
feat: (v1) bring back comma body face
stefpi 5299b70
feat: raylib face instead of gif, animation harness and barebones pai…
stefpi b591fb6
feat: 10mbps bitrate for connect webrtc livestream
stefpi b83e436
feat: FaceAnimations, new faces and reactivity, battery indicator
stefpi 6bb0a22
fix: asleep animation, body_sidebar
stefpi f3c0b98
fix: home click and release, battery status
stefpi d2ed390
fix: cleaner transition into driving mode
stefpi a7e54c1
fix: add CORS headers to webrtcd
stefpi d0db6a1
fix: simple CORS header for local direct connection, logging in get_s…
stefpi e2df6b4
fix: add back CORS middleware block
stefpi e6bb701
fix: inquisitive and responsive turning faces
stefpi 2e41637
fix: swap right and left move animations
stefpi 0694182
feat: add support for all 3 cameras
stefpi 8e15567
feat: optional wait for joystick bodyview, wink animation, status in …
stefpi f65e11d
clean: remove old bodyteleop
stefpi 6e589eb
fix: change notCar dispatcher to use persistent car params
stefpi 29eba8b
fix: proper exceptions when webrtcd is not running
stefpi 93de8e1
fix: check resp.ok from webrtcd
stefpi dd13a9b
fix: remove wink all the time
stefpi 02cc1c9
fix: remove redudant and breaking body active check
stefpi 4f44844
fix: remove sdp codec overwite and only accept H264 requests
stefpi 19e459c
feat: body layout refactoring and adding mici layout
stefpi 8a5df0a
fix: body face change on ignition
stefpi 819da5a
fix: make pairing button on MICI bigger
stefpi ebb6ea0
feat: ignore unnecessary processe in body so that they don't complain…
stefpi 0ea0244
fix: reverse direction of input on body injection test
stefpi 63e743d
faster tuning branch on opendbc
stefpi 7ba69d0
fix: better pairing screens and pairing info
stefpi 580231a
feat: allow multiple webrtc connections
stefpi 9193437
fix: reduce cpu load on body by not running unnecessary processes for…
stefpi 0fd56b4
reduce removed processes on body to just driver monitoring model
stefpi cd0f864
turn ir lights off on comma body
stefpi f4b74b5
remove purple IR tint on driver camera
stefpi 66e7041
remove IR defiltering attempt, but keep IR lights off on body
stefpi bd00bca
add back 1 webrtc connection at a time
stefpi f13156a
reduce comma body init time to 2 seconds
stefpi 2ef2046
clean: remove zmq whitelist util
stefpi 15354e3
joystickdebug set to false on webrtc disconnection and return to home…
stefpi bb59973
disconnect transition to home screen functionality moved to mici
stefpi 059f3a4
move joystickdebug set true to webrtcd
stefpi 3bf7b1d
submodule: add teleortpc_repo fix/data-channel-doublecounting branch …
stefpi ff0514d
pair button bigger and starting animation on sleepy
stefpi 151488a
remove branch name if notCar
stefpi ef8341d
stay on home page if offroad
stefpi cee8c5e
change body pair button to connect and clean up body pairing
stefpi 4dd127c
better connect screen for mici
stefpi 30cac11
add ENV support for different connect URLS (PROD, DEV, PREVIEW)
stefpi 2d3dff5
bypass private network restrictions on chrome
stefpi 8750fa2
self signed ssl for webrtc from https deployments
stefpi 14a56cb
auto close ssl cert trust page
stefpi a035b7f
http+https webrtc, remove PORT from pairing QR
stefpi 2407fe4
lower GOP size on streamencoder
stefpi a0bfdae
feat: 2-way audio and sound effects routed through soundd + better la…
stefpi 6bc0534
messaging subsocket for webrtc microphone on soundd
stefpi 9b28efe
Merge branch 'master' into good-remote-body
stefpi 24e0807
distinguish between v1 and v2
stefpi 6ee901b
convert 3 livestream to 1 encoder with on the fly switching
stefpi 94ec2bb
fix params, send selected camera on /stream response
stefpi c50ada6
decode bug on Params
stefpi 001ecfd
fix stationary face animation
stefpi adb5c1a
stats: add frame timing data to metadata when stats are enabled on da…
stefpi 173c277
bump opendbc
stefpi 76cddb0
bump opendbc and panda to correct commits
stefpi 002961c
refactor body UI code
stefpi aacc243
better customization for bodyview debug script
stefpi ef109f7
bump panda commit
stefpi 73b20b2
Merge branch 'master' into good-remote-body
stefpi f30b91e
update commit on teleoprtc_repo
stefpi 1525369
only ignore driverMonitoringState on notCar
stefpi 9227eae
remove old data channel sound bite request
stefpi a10504e
fix linting errors
stefpi 12d5a46
fix unsupported operand type error
stefpi 2ef6ab2
bump teleoprtc commit
stefpi bb998d7
bump teleoprtc commit
stefpi f3396e5
update git modules
stefpi 51715da
fix ci CP is none error
stefpi 4febc0d
cleanup
stefpi 4413ae6
cleanups and small refactors
stefpi fc9ec7e
fix is_body call
stefpi 6baf5bd
bump commit opendbc_repo
stefpi 3eb44a4
implement shane's comments
stefpi 23e38f7
fix button touch valid
sshane 3bab051
replace IP with env variable for https URL
stefpi 8eb532d
connect qr points to body url
stefpi 42c2855
fix bug and remove unused code body_pairing
stefpi af4936c
show connect host name properly for hacakthon
stefpi a234f75
fix connect button on tici visibility
stefpi 95f9c60
hide tici pairing screen on connection
stefpi 625dd5b
tici move connect/disconnect event reaction
stefpi 4271e90
fix pairing button on tici
stefpi 58ae7db
Merge branch 'master' into good-remote-body
stefpi 7a3f526
bump commits
stefpi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule opendbc_repo
updated
13 files
| +2 −2 | opendbc/car/body/bodycan.py | |
| +47 −50 | opendbc/car/body/carcontroller.py | |
| +2 −2 | opendbc/car/body/carstate.py | |
| +6 −3 | opendbc/car/body/fingerprints.py | |
| +1 −5 | opendbc/car/body/interface.py | |
| +43 −14 | opendbc/car/body/values.py | |
| +2 −1 | opendbc/car/docs_definitions.py | |
| +1 −1 | opendbc/car/fingerprints.py | |
| +2 −1 | opendbc/car/tests/routes.py | |
| +2 −1 | opendbc/car/torque_data/override.toml | |
| +0 −1 | opendbc/dbc/comma_body.dbc | |
| +15 −3 | opendbc/safety/modes/body.h | |
| +32 −16 | opendbc/safety/tests/test_body.py |
Submodule panda
updated
20 files
| +23 −21 | board/body/__init__.py | |
| +3,306 −0 | board/body/bldc/BLDC_controller.c | |
| +394 −0 | board/body/bldc/BLDC_controller.h | |
| +386 −0 | board/body/bldc/BLDC_controller_data.c | |
| +311 −0 | board/body/bldc/bldc.h | |
| +56 −0 | board/body/bldc/bldc_defs.h | |
| +104 −0 | board/body/bldc/rtwtypes.h | |
| +39 −14 | board/body/boards/board_body.h | |
| +34 −0 | board/body/boards/board_declarations.h | |
| +80 −26 | board/body/can.h | |
| +216 −0 | board/body/dotstar.h | |
| +70 −7 | board/body/main.c | |
| +15 −35 | board/body/main_comms.h | |
| +0 −15 | board/body/motor_common.h | |
| +0 −251 | board/body/motor_control.h | |
| +0 −170 | board/body/motor_encoder.h | |
| +2 −0 | board/comms_definitions.h | |
| +5 −0 | board/drivers/can_common.h | |
| +3 −0 | board/drivers/fdcan.h | |
| +7 −1 | board/main.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| #!/usr/bin/env python3 | ||
| """Launch the comma UI, but simulating a comma body.""" | ||
| import argparse | ||
| import os | ||
| import time | ||
| import threading | ||
|
|
||
|
|
||
| import pyray as rl | ||
| from cereal import car, log, messaging | ||
| from openpilot.common.params import Params | ||
|
|
||
|
|
||
| def send_messages(): | ||
| pm = messaging.PubMaster(['deviceState', 'pandaStates', 'carParams', 'carState', 'selfdriveState']) | ||
|
|
||
| car_params_msg = messaging.new_message('carParams') | ||
| car_params_msg.carParams.brand = "body" | ||
| car_params_msg.carParams.notCar = True | ||
|
|
||
| device_state_msg = messaging.new_message('deviceState') | ||
| device_state_msg.deviceState.started = False | ||
|
|
||
| panda_msg = messaging.new_message('pandaStates', 1) | ||
| panda_msg.pandaStates[0].ignitionLine = True | ||
| panda_msg.pandaStates[0].pandaType = log.PandaState.PandaType.uno | ||
|
|
||
| car_state_msg = messaging.new_message('carState') | ||
| car_state_msg.carState.charging = True | ||
| car_state_msg.carState.fuelGauge = 0.80 | ||
|
|
||
| selfdrive_state_msg = messaging.new_message('selfdriveState') | ||
| selfdrive_state_msg.selfdriveState.enabled = True | ||
|
|
||
| while True: | ||
| pm.send('carParams', car_params_msg) | ||
| pm.send('deviceState', device_state_msg) | ||
| pm.send('pandaStates', panda_msg) | ||
| pm.send('carState', car_state_msg) | ||
| pm.send('selfdriveState', selfdrive_state_msg) | ||
| time.sleep(0.01) | ||
|
|
||
|
|
||
| def main(): | ||
| parser = argparse.ArgumentParser(description="Launch body view UI") | ||
| parser.add_argument("--big", action="store_true", help="Launch in big UI mode (comma 3X)") | ||
| parser.add_argument("--joystick", action="store_true", help="Wait for joystick_control before going onroad") | ||
| parser.add_argument("--monitor", type=int, default=None, help="Pin window to specified monitor index (e.g. 0, 1)") | ||
| args = parser.parse_args() | ||
|
|
||
| if args.big: | ||
| os.environ["BIG"] = "1" | ||
| from openpilot.system.ui.lib.application import gui_app | ||
|
|
||
| if args.monitor is not None: | ||
| # Pin window to specified monitor after init | ||
| monitor_index = args.monitor | ||
| _orig_init_window = gui_app.init_window | ||
| def _init_window_on_monitor(*a, **kw): | ||
| _orig_init_window(*a, **kw) | ||
| pos = rl.get_monitor_position(monitor_index) | ||
| rl.set_window_position(int(pos.x), int(pos.y)) | ||
| gui_app.init_window = _init_window_on_monitor | ||
|
|
||
| # Set CarParamsPersistent so ui_state.CP.notCar is True on startup | ||
| params = Params() | ||
| CP = car.CarParams.new_message(notCar=True, brand="body", wheelbase=1, steerRatio=10) | ||
| params.put("CarParamsPersistent", CP.to_bytes()) | ||
| params.put_bool("JoystickDebugMode", True) | ||
|
|
||
| if args.joystick: | ||
| params.put_bool("IsOffroad", True) | ||
|
|
||
| # Wait for joystick_control to start before going "onroad" | ||
| sm = messaging.SubMaster(['testJoystick']) | ||
| print("Waiting for joystick_control to start (run: python tools/joystick/joystick_control.py --keyboard) ...") | ||
| while sm.recv_frame['testJoystick'] == 0: | ||
| params.put_bool("IsOffroad", True) | ||
| sm.update(100) | ||
| print("Joystick connected, starting body view.") | ||
| params.remove("IsOffroad") | ||
|
|
||
| # Start message sender in background | ||
| t = threading.Thread(target=send_messages, daemon=True) | ||
| t.start() | ||
|
|
||
| # Import after env is set so BIG_UI picks it up | ||
| from openpilot.selfdrive.ui.ui import main as ui_main | ||
| ui_main() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use Ratekeeper if this needs to strictly be 100hz