Hello guys… This project is very cool!! I am more than happy to help!
I did not read all the comments yet, I am still familiarizing myself with the project so dont mind if I make some outdated observations! : )
I couldnt find if the thrusters are pushing or pulling the car… I mean, the propellers are the front or the back of the vehicle?
In my opinion the thrust must pull the vehicle… that is, the propellers must be the front of the car. This configuration will be inherently stable!
Darpan Pudasaini I dont know if I am missing something, but I think you switched the motors in your example.
Lets take a scenario here. Our car is moving in a straight line and then suddenly drifts towards right a little. The motorSpeed will now get a value of -10 (say). We have predifned values for leftMotorSpeed and rightMotorSpeed as 100 rpm (say) . In this case, the value of motorSpeed = -10 will change the roght and left values as :
RightMotorSpeed = 100 -10 = 90 rpm
LeftMotorSpeed = 100 - (-10) = 110 rpm
So, the car will now drift more towards left and hence keep the car in a straight line.
To move left, we need to increase the right motor and decrease the left motor in order to generate the torque to the left and vice-versa.
So, if the right drift results in a negative motorSpeed, we need to change the + and - signals in RightMotor and LeftMotor equation.
You are doing a very good job!!