![]() |
Holonomic Drive System Issues, Robot Drives Diagonally...
1 Attachment(s)
Our robot is acting a bit wonky. We have a holonomic drive system made with the omni wheels, and mechanically everything seems sound. So, all that is left is the code. Here is our code:
Code:
public void operatorControl() {Code:
private void getReadings() {Code:
Joystick leftStick = new Joystick(1);Attached is a diagram of what our robot tends to do. The green arrow is the direction that it is supposed to travel, and the red arrow is the direction that it actually travels. :confused: We are using the Logitech Attack3 Joysticks, and yes I have tried to read most of the documentation that is already present on this forum. Specifically the posts by "Ether," those posts really helped... The problem exists in the fact that I don't really understand the calculations and diagrams presented in them. Thanks in advance. 2745 OH! and all of our PWM cables are plugged in properly/in the right slot |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
If you are using omniwheels, they should be mounted at 45 degree angles from your frames edges. If you mount them parallel to your frames edges, the robot will travel diagonally when you command it straight if you use the holonomic code from wpilib. What does your drive system look like?
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
1 Attachment(s)
Our wheels are mounted at the 45 degree angles needed.
Here is a link to our frame pictures: http://www.chiefdelphi.com/media/photos/36312 |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
I am working with this team as a mechanical mentor but I am not an engineer. (just an old chemistry teacher with 10 years of FRC experience)
Here is an image of their drive-base prior to mounting of the electronics board. http://www.chiefdelphi.com/media/photos/36312 The battery is currently mounted just behind the front right wheel and other than that massive object, all of the current weight distribution is very symmetrical. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
- put the robot up on blocks And one more thing: you don't need to understand all the calculations and diagrams if that is not your area of interest. There are some posts and papers which just show how to program, for example: http://www.chiefdelphi.com/media/papers/download/2906 |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
We have a similar drive base as you do. I don't see anything wrong with your code but I know that we switched from the Meccanum Polar method to the Meccanum Cartesian because polar seemed to be giving odd results. (I know it shouldn't matter but it seemed to help us and it makes positioning easier for us).
When you put the robot on blocks and run the code does it still not power all the wheels? It may be that they are all trying to go strait but without some sort of programmed correction they are at such different speeds that it drives diagonally. Wheel slip with an omni holonomic platform is really hard to remove completely with a mechanical solution. We corrected for this by getting field centric control working with the gyro. Without that our drive base becomes much harder to control. The gyro is able to control our angle and keeps our heading. If we do drift off of strait the driver has a much easier time correcting because he only has to correct one axis (the X axis if we are trying to drive strait forward). This is a link to our code repository. If you have any questions please ask. Our Code We are also attempting to get Velocity control working but haven't been successful yet because our encoders have been giving us some problems. Hope this helps and I look forward to seeing you at Alamo, Allen Gregory |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
http://www.chiefdelphi.com/forums/sh...ad.php?t=89153 http://www.chiefdelphi.com/forums/sh...ad.php?t=89257 |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Usually two motors need to be inverted. Are any of yours inverted in HW, because I don't see them inverted in the code.
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
1 Attachment(s)
Quote:
He meant mount each one parallel to its respective edge, like the attached image. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
My apologies for doubting you, Joe. Thanks Ether |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
One thing to note about the plus configuration is that you will travel slower in the robots orthogonal directions then you would traveling at 45 degree angles. Omni wheeled holonomic robots gain velocity when all 4 wheels are powering them because each wheel actually has a velocity vector perpendicular to it's normal velocity. The whole robot is able to travel faster than any one wheel velocity. In a perfect world a 4 wheeled omni wheel holonomic platform with wheels 90 degrees apart will travel ~1.4 times faster than wheel velocity when traveling 45 degrees to any wheel. You could just redesign the robot so the "front" is on one of the corners but that could make things tricky for manipulators. I agree that the plus would be harder to balance as well. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
Quote:
Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
There are several research papers published on this (mostly for robocup). Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
A chart comparing omni, mecanum, and standard wheels can be found here. A force analysis of mec vs omni can be found here. A kinematic analysis can be done using a similar approach. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Quote:
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
So, judging by the responses that I have seen so far, the consensus is that it is not a coding problem? ::rtm::
|
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
I would say that it is not a problem with the code that you posted here.
It may be a problem with cRIO or the electronics. (Have you updated your cRIO image to the one that was released this week?) Also you may want to try using mecanumDrive_Cartesian(giving x and y axis instead of magnitude and direction) instead of polar and see if that works better for you. Have you tested on blocks and seen which wheels spin when you move each joystick axis? When you move the joysticks, do all four wheels ever spin? If you apply full power forward do your Jaguars light up in the way they are supposed to? (two red and two green most likely) If you are still having this problem at Alamo(I hope you resolve it by than), I'll try and stop by your pit and see what we can do. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Thanks for all the suggestions and looking over the code. Current and most recent "fix" was to broaden the deadbands. It is now driving much more as expected. Possibly the deadband was too narrow and minor off-center stick movements where exagerated when translated into robot movement.
I'd still like to compare robot performance between the Discobots and this omnidrive robots and continue the evolution of our design process.:) |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
Yes, hopefully at some point we will be on the same alliance at Alamo. I think we will definitely give the other alliance some problems. They will be trying to figure out which way we are going and only we will know :)
See you guys in 8 days. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
I keep envisioning a pivot move aka some great NFL running back that is heading down field and spins around a defender or your favorite NBA point guard for a driving layout:)
What would it take to program such a spin around either the front right or front left wheel:cool: We currently have drive/strafe and then zero degree spin coded to two joysticks. Maybe it is just driver control with drive input coming from one joystick and a spin componant coming from the other.... |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
1 Attachment(s)
Quote:
Calculate how fast you want to rotate. Call that omega. That's your rotation command. Multiply omega by |AC|. That's your translation magnitude. Theta is your translation direction angle. Translation velocity vector V is perpendicular to |AC|. |
Re: Holonomic Drive System Issues, Robot Drives Diagonally...
The way we do it is with driver practice. To be able to pivot you have to give the robot some rotation (in our set up the x axis of the drivers right hand) and move the robot in an arc which is to keep the y constant while moving the x from positive to negative (this happens on the left stick).
We were also trying to figure out if the driver could drive around the minibot pole while holding orientation to the pole. This is not easy in our current control scheme but possible you have to make a circle with left joystick and hold a constant rotational velocity with the right one. This is all with field centric control. Without that the first move becomes much harder while the second is much easier. |
| All times are GMT -5. The time now is 10:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi