Open Ezward opened 3 years ago
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.
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.
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,