m currently building my own ROV for obtaining my university diploma. I was heavily inspired by what openROV has developed - it is just amazing. Great work guys! Anyways Im currently at programming stage where I need to develop thruster control via gamepad. I`m building my interface on Raspberry pi using node.js and the same gamepad API.
I wan`t to control the ROV horizontal movement with a single joystick:
-joystick forward is both motors forward
-joystick left is left motor reverse and right motor forward to turn
-joystick back is reverse
-joystick right is left motor forward and right motor reverse to turn
So that is all good and simple.
But how can I control so that let
s say if the joystick is on the y=x axis (45axis)
that the motors will be controlled proportionally because on y=x there would be turning and forward movement of the rov involved so let`s say that on the middle of the top part of y=x axis then the left motor would be off and the right would turn faster than normal turning so the rov makes a arc turn.
And if the joystick was at the tip of top y=x the left motor would then have to turn forward slowly and the right motor would have to turn at full throttle.
I know I could use tank style control but I would prefer this way (to have 1 joystick for horizontal movement and 1 for lateral and vertical movement).
I want Pi to calculate according values to send to motors, because I have decided to send motor commands to my controller board (my custom designed board featuring Xmega MCU) in the following way:
< M 1500 1500 1500 Checksum
That would be stop command for motor. First 1500 is data for port motor, second for starboard motor and third for vertical motor.
How have you solved this issue?