CentralIllinoisRoboticsClub / wheele_gui

MIT License
0 stars 1 forks source link

Virtual Joystick Control Screen for Remote Control #3

Open mattp256 opened 3 years ago

mattp256 commented 3 years ago

Capturing some ideas from @MikeDvorsky:

Use the display in landscape mode. The right side would be a 240x240 pixel "joystick" in the form of a square area of the TFT. The message sent over LoRa would be 2 bytes: the vertical position (0-239) and horizontal position (0-239). The receiver would be responsible for mapping these to the 1000-2000 us pulse widths corresponding to a conventional RC system and sending over the CAN bus.

On the left side would be 3 buttons: Auto Mode, Manual Mode, and Exit. (Exit would return to the main menu.) Or maybe just Auto and Exit, where manual mode is assumed if not Auto.

The deadman function would be on the receiver. If LoRa reception is lost or Auto Mode is not indicated, no autonomous operation would occur. If the control area is not being touched (perhaps indicated by a value of 255 for both vertical and horizontal), no manual operation would occur.

mattp256 commented 3 years ago

Had a nice proof of concept demo at build session today. Setup was touchscreen connected to Arduino over SPI; Arduino to laptop over serial/USB. Wrote a quick Python rosnode script at the build session to receive x,y position of virtual joystick from Arduino, and publish to cmd_vel over ROS. Code is on branch joystick_concept.