![]() |
Alternative holonomic drive
Hello! I've been toying with this idea of using a trackball and joystick as a driver interface for a robot with mecanum wheels. The problem with this is that a trackball is not like a joystick. It's like a mouse (it IS a mouse, unless we can find a trackball made for some other purpose). I've been working on this in Processing, and it seems to work pretty well. I divide the screen into 360 vertical pieces, and assign each piece from 0 to 359 (with wraparound). By doing this, I can easily send a value for my simulated robot to turn to. The Processing model is great, and performs exactly as a real robot would, physics included, but in Processing, all I had to do was tell a box it's x,y, and rotation, and no real robot-applicable code was used. The problem I'm having with a real robot is that sending a specific value to rotate to is characteristic of field-centric steering (the value is the joystick angle, I think), and freedom to move without a third-person is characteristic of robot-centric steering. Is it possible to combine robot-centric strafing and field-centric rotation?
|
Re: Alternative holonomic drive
Quote:
|
Re: Alternative holonomic drive
SoftwareBug is right. Rotation won't be dependent on the gyro angle if you are specifying speed. However, if you would like to tell the robot which angle to be at (ie, point forward, point 135 degrees to the right) you need a PID loop, but I don't know of any team that has used this for their normal driving mode.
If you want to control mecanum in the traditional way with field-centric control, you need to convert the x and y desired speed to polar, add the gryo angle to theta, and convert back to x y. All of this is taken care of in the LabView, Java, and C++ libraries from FIRST. If you want robot centric control, just put 0 as the gyro angle, otherwise set the gyro angle from the output of your gyro. |
Re: Alternative holonomic drive
Why exactly would I need to use a PID loop? I've tried other methods which resemble a joystick, using mouse locking to center the mouse, then having the X and Y values mapped to -/+ 1 and constantly decrementing the values.
|
Re: Alternative holonomic drive
Quote:
user controls -> x,y relative to the robot, theta (turning speed) in an amount clockwise/counterclockwise -> motor values user controls -> x,y relative to the field, theta (turning speed) in an amount clockwise/counterclockwise -> motor values user controls -> x,y relative to the field, theta (as an orientation goal relative to the field) -> motor values If you choose the 3rd one, then you need some sort of control loop to make it so that with constant user controls, the robot will turn to the desired angle but then stop once it gets there. He is suggesting that the control loop could be PID. |
Re: Alternative holonomic drive
You'll only need PID if you'd like to be able to specify the absolute angle of the robot relative to the field. This isn't popular, as gyro drift makes this difficult to use. You won't have to use PID if you want to specify how fast your robot spins. Sorry if my original post wasn't clear.
|
| All times are GMT -5. The time now is 03:09. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi