Commit Graph

24 Commits

Author SHA1 Message Date
Sliicy
fc2e961f1b Fixed joystickd.py incorrect steering control (#30879)
old-commit-hash: 6ccf2cbfde4e1f5aa67dc0072f9c0dfd080be064
2024-01-01 14:29:01 -08:00
Kacper Rączy
214b38bc69 controlsd: require joystick mode param for the body (#30680)
* Update joystick mode in step

* Stop putting the body in joystick mode by default

* Toggle JoystickDebugMode by default for notCars in process_replay

* Remove subsection about web joystick

* Update param only in non-cars

* Make joystickDebug non-static event, and add it in a loop

* Add comment
old-commit-hash: e62756596b82e4e40d02a30b34d3f3c9960bffe6
2023-12-12 14:14:51 -08:00
Kacper Rączy
6c9a87556d joystickd: remove WEB (#30612)
Remove WEB option from joystickd
old-commit-hash: 6c62a3146607e87c1c4f796eb5a7c988f733d6c1
2023-12-05 14:42:44 -08:00
Adeeb Shihadeh
4d8bc1dfbf remove big gif file (#30029)
* remove big gif file

* remove
old-commit-hash: 045ed8a91e8a68b866341ceefce9100cbfdd6600
2023-09-23 21:16:45 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b69af19306143fc4def02fb5769405d2
2023-08-20 20:49:55 -07:00
Vivek Aithal
c1bcb53d4e [commabody] Add new body teleop ui (#29282)
* Revert "Revert "[commabody] Add new body teleop ui (#29119)" (#29249)"

This reverts commit 5dcfddbbfbddf00d16cb1f28c51f3dffc75d7cf6.

* add to release files

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e7d307ca1b064c3789902bc077e93453dd96794b
2023-08-08 14:12:51 -07:00
Harald Schäfer
c0fbbd4b36 Revert "[commabody] Add new body teleop ui (#29119)" (#29249)
This reverts commit 0df6353569b77869ce4ddc8ce43bab621bccd107.
old-commit-hash: 623351e4edb01b7c66612e43e5e8ebefd237276d
2023-08-05 07:15:35 -07:00
Vivek Aithal
082b1fd924 [commabody] Add new body teleop ui (#29119)
* add new ui

* move body tele op ui to new dir

* fix codespell errors

* resolve mediablackhole pylint error

* fix import error

* style fixes

* use logging, not print

* fix js styling

* resolve comments
old-commit-hash: a7304d059cb2f4e57e64fcbabb4f9079f1ea659d
2023-08-04 13:56:46 -07:00
jp-solutionz
e769f4d11a joystickd: add controller mapping (#25986)
* Correct default controller mapping.

Current config maps steering to right trigger (ABS_RZ) when using a default xinput controller: https://inputs.readthedocs.io/en/latest/user/hardwaresupport.html

This results in default full left steering angle (1) requiring right trigger to return to centre (0) or right (-1).

It appears the intended mapping for steering is right thumbstick (ABS_RX).

Cancel button is also non-existent on default xinput controller. May be X button (BTN_NORTH) or Right Trigger (ABS_RZ).

Tested on Xbox One Controller via USB Cable, Logitech F710 and GameSir T4 Pro.

* Update joystickd.py

Fixed comment

* gamepad configuration

* gamepad arg

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 1d8fc4d21caf55368209b7bbafa34327962a6a97
2022-10-12 20:48:22 -07:00
Adeeb Shihadeh
0325a33752 add pyside2 package (#25602)
old-commit-hash: c6b749fb96b3b6332fd850e733140357f84d53a4
2022-08-30 15:10:52 -07:00
Shane Smiskol
f49bbf60b6 joystick: revert max axes value (#25483)
revert this to 255
old-commit-hash: 16fe10e1281d68d8e560a9489b973bd34417d469
2022-08-18 23:34:48 -07:00
Mark Murnane
2d3370a619 Add gamepad support for body (#24415)
This MR adds basic gamepad support to the joystick web client.
The mappings appear to be consistent between a few controllers I tried, so I think inverting both axes is the optimal mapping.
old-commit-hash: e84d073233404e3375fc3708c0da079c88c012e5
2022-05-12 13:40:05 +02:00
Jason Young
2708e96fab update joystick README for webjoystick (#24413)
old-commit-hash: 0771addd144a6822fca8209be53994c0db009bbb
2022-05-03 17:03:17 -07:00
Comma Device
482801d4fd body: remove print spam
old-commit-hash: 729d7ae549315411017cc19aeae52baeca27c776
2022-04-25 20:07:12 -07:00
Adeeb Shihadeh
ae71ecf8b8 manager: start bridge and web joystick for notcars (#24212)
* manager: start bridge and web joystick for notcars

* fix that

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 76a83381977f9dd3d5b223e0dfb8e1617e2c7237
2022-04-19 14:13:05 -07:00
George Hotz
5ce06c5016 joystickd: add send thread
old-commit-hash: 13e18b605a1a2f259cea5459f34358cd12322eb8
2022-04-18 22:35:19 -07:00
George Hotz
8353786c69 joystickd: add WEB support, add logitech joystick support
old-commit-hash: e9ef6509010f3ce6881e61a6b04e8fbe11e1b312
2022-04-18 22:13:09 -07:00
George Hotz
20119b5ef6 body: web joystick handle timeout
old-commit-hash: df6c2b6af9e3089edafcda98344df3fd11273b63
2022-04-14 16:12:30 -07:00
George Hotz
d9a94cc785 body: web joystick
old-commit-hash: d7b849720cc6354543b60718414b2a07bf45a172
2022-04-13 14:29:17 -07:00
Adeeb Shihadeh
597535c014 linter: don't allow implicitly concatenated strings (#23513)
* linter: don't allow implicitly concatenated strings

* fix hyundai
old-commit-hash: 2c94f155840b49639b8bf1ec996d99e268fa9a52
2022-01-13 14:19:38 -08:00
Adeeb Shihadeh
9908210bd6 tools: better joystick instructions
old-commit-hash: 7eca4d62078b14de62c5f2ce08e382eb31cc7076
2022-01-10 12:03:27 -08:00
Cameron Clough
f9e8fb3145 Joystick: learn axis min/max (#23377)
* Joystick: learn axis min/max

* clean up updating max/min

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5a77157ea435260b3e7ecacb83f13d3753ede859
2022-01-04 14:17:30 +01:00
grekiki
9e4cc1f7ff Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6951b3271d1770297cb6bd53878463035ec0bf43
2021-12-03 22:57:19 -08:00
ShaneSmiskol
23ea456f4f Fixup joystick (#21129)
* some common changes

* rename to joystick

* add alert and update controlsd to work with joystick

* update joystickd

* Update Joystick readme

* assume we have inputs

* only send gb or steer when engaged_toggle is true

* Update instructions

* fix --ip

* Easier to understand at a glance

* much better

* -a

* receive events and send msg in same loop

* always import

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine logic and clean up

* use argparse

* outdated, and use normal class

* rm

* bit of a refactor

* refactor part 2 / 3

* much better (3 / 3)

* Simplify

* bump cereal and update readme

* capitalize

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* make joystick abstraction class clearer

* use interp, clearer without comments

* no need to use apply_deadzone

* more explicit

* define btns and axes once

* split function by use_keyboard again, but simpler

* we can use handle_button as a reset function

* need to flip sign

* remove

* invert axes map for kb, easier to read the button mapping

* apply changes from review

* new lateral log for debug mode

* bump

* add saturated

* static alert

* joystick_mode

* conditionally subscribe

* Update selfdrive/controls/controlsd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* move params instantiation

* Spoof active and enabled

* Only allow car to engage

* no startup alert if joystick

* Update controlsd.py

* Should be orange not enabled, green enabled

* no more button states

* should work

* blue

* submaster conflates, so only send when we have an update

* final change

* remove msg

* clean up a bit

sort of clean up

clean up a bit

remove msg

* this was right

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* lowercase

* suggestions from code review

* forgot laptop

* bump to latest

* fixes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
old-commit-hash: ae77f693a26527ffbee044f852cc4185718c2433
2021-06-11 14:33:17 -07:00