Quote:
Originally Posted by austin1743
Ross, i have added the js1 (joystick1) into the code thanks for catching that
Joseph thanks for the mecanum in a nut shell. I know mecanum wheels have some weird math vectors behind them which i sort of understand but how does that relate to the controller? I ask this as I am a little confused on why the code would have magnitude from the controller?
|
If the driver is using a joystick, the magnitude can be computed using sqrt(X^2+Y^2), or perhaps max(abs(X),abs(Y)). That is used as a speed command - how fast the driver wants the vehicle to go.
The direction is computed using for example theta = atan2(-Y,X). It is the clockwise angle with zero in the forward direction. It is the driver command to tell which direction the driver wants the vehicle to move.