![]() |
H-Drive Programming
Our drive team is developing a H-Drive system with omnis this year (4 corners and 2 across). Anyone have any tips on how to best program this so it can be driven with a single joystick. We're using Java.
|
Re: H-Drive Programming
Quote:
Provide a little more detail. Without knowing what you want the drive to do, one suggestion for a 2-axis joystick would be to program it in two separate modes, with the desired mode selectable using a botton or buttons. ModeA could be simple tank or arcade driver interface (sideways motors not used). ModeB could be strafe mode (power only the 2 sideways motors and leave the corner ones unpowered). |
Re: H-Drive Programming
Thanks for the reply.
We will have a 3-axis joystick available. Guidance we have is that going forward/backward (y-axis) the corner wheels would do the driving, going left/right (x-axis) the cross wheels would do the driving and turning in place (z-axis) the motors would work together to "twist" the bot. We'll be using CIMs, but don't have info on gearing. We're just getting started dissecting this problem but thought I'd reach out to see what others with experience had to say. Thanks again. |
Re: H-Drive Programming
Hi!
My team's off-season project was to build an H-Drive drive train. Our drive train is controlled by an XBox controller where the Y-Axis of the left joystick controls vertical movement, the X-Axis of the left joystick controls horizontal movement through the strafe wheel, and the X-Axis of the right joystick controls turning. If you are attempting to use a single joystick, I suggest you use a three axis joystick. A two axis joystick with separate modes may work, but it prohibits some movements that are possible when using H-Drive. For example, with a two axis joystick, you could never strafe while moving forward or strafe while turning. You will never be able to move diagonally or turn while strafing with separate modes. A three axis joystick would allow you do this. I also believe another aspect to take into account is how responsive the drivers can be with separate modes. Separate modes may require more practice to be used successfully because the driver has to remember which mode he or she is in. It is just another button to worry about when the driver already has enough on his or her mind. A three axis joystick would eliminate this problem. Another thing to take into account when programming H-Drive is maintaining a constant angle when strafing. The point of strafing is to add horizontal movement without having to turn. Without code to fix for this, your robot will most likely arc when it is strafing. To eliminate this, I used a PID Loop (well a PD loop) that's main function was to keep the robot facing towards one angle. Of course this is only activated when you are strafing or moving forward and strafing (which would move you diagonally) Hope this helped |
Re: H-Drive Programming
Quote:
Math's based on this paper (http://people.idsia.ch/~foerster/200...t_preprint.pdf) |
Re: H-Drive Programming
I figure I might as well throw in my two cents. The code (at least for my team's untested implementation) will look a lot like RobotDrive's mecanumDrive_Polar/Cartesian.
|
Re: H-Drive Programming
Quote:
|
Re: H-Drive Programming
Huh, I did not think about that at all! Looks like I'll have to bring the programmers back to the white board.
|
Re: H-Drive Programming
Quote:
|
Re: H-Drive Programming
Quote:
|
Re: H-Drive Programming
Quote:
I can think of several solutions to this issue, none of them perfect. They pretty much come down to variations on:
|
Re: H-Drive Programming
So we ended up doing is making our own Gaussian function to adjust the y speed based upon the angle of the x and y vectors from the joysticks. The major downside is that we won't be able to go diagonally at "full speed," but as you said, this may be something we'll just have to accept.
We should be able to actually test this approach on tomorrow and I'll try to update this post with the result. |
Re: H-Drive Programming
Quote:
|
Re: H-Drive Programming
Quote:
|
Quote:
So I wasn't there when we actually tested the drive train, but from my understanding, it seems like we are having dinner center of gravity issues that essentially messes with it values, so we're going to wait for the elevator to be put on before we do more extensive testing and tuning. But it went reasonably well for the most part. |
| All times are GMT -5. The time now is 13:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi