Skip to content
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

Implement bluetooth gamepad connection between Esp32Cam and PS3 controller. #9

Open
Ezward opened this issue Feb 15, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ezward
Copy link
Owner

Ezward commented Feb 15, 2021

Why
As discussed in issue #8, we would like to reduce the input latency between the rover and the gamepad. Currently we are using a gamepad attached to the web application's browser, so it incurs the latency across the websocket connection. Further, we (in another issue) would like to implement a peer-to-peer FPV video solution, so attaching a gamepad to the browser would not make sense.

What
Implement bluetooth gamepad connection between Esp32Cam and PS3 controller. See these:

We will need to turn the returned values into wheel speed (tank style) inputs from 0 to 1.0. We do this in the javascript code now. This involves a mapping of gamepad axis to command inputs. We should put this into config in a header file; they can be fairly static because we intend to use us a PS3 joystick for now. However, we do want these in constants so we could change them if we implement another gamepad.

See these javascript files for current gamepad implementation.

Compare the resulting input latency between the bluetooth gamepad implementation and the web application's HTML5 Gamepad API/Websocket implementation,

@Ezward Ezward added the enhancement New feature or request label Feb 15, 2021
@Ezward Ezward self-assigned this Feb 15, 2021
@cgrrty
Copy link

cgrrty commented Feb 18, 2021

Hi
Can both modes be supported(Retain the previous mode), Let users choose.
For users who require low latency, can use the PS3 controller
For users who not require low latency, can use the web application controller
I don't know if it will have any impact on the program.

@Ezward
Copy link
Owner Author

Ezward commented Feb 18, 2021

Yes, we will make it so the user can choose. I think I will add a panel to the Rover Control section that will facilitate pairing with a bluetooth gamepad. So it will be just one more input type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants