|
|||||||
| Technical Discussion Open Technical Discussion of the VEX Robotics System. |
![]() |
|
|
Thread Tools |
|
#11
|
||||
|
||||
|
Re: Programming Mecanum drive
That is a very good idea for a software breaker! I used a timeout function this year, although I think I'm going to implement this in sack attack.
|
|
#12
|
||||
|
||||
|
Re: Programming Mecanum drive
We had a Mechanum drive on our robot this past year.
A simple three axis (stick) drive code would be: Code:
motor[frontRight] = Y1 - X2 - X1; motor[backRight] = Y1 - X2 + X1; motor[frontLeft] = Y1 + X2 + X1; motor[backLeft] = Y1 + X2 - X1; We made sure all our wheels went straight when the drive motors were set to full power. In Autonomous, we just made the motors go full power for the duration we wanted the robot to go straight. That would be the simplest approach. If that weren't accurate enough, I'd lower the output power and use a gyro and a PID loop to correct the drive by + or - some value to make sure it goes straight. Third, I'd use encoders on two of the wheels and make sure that they were going the same Speed/Derivative/Delta. There still would be one problem left though; how would the robot make sure it was not unintentionally strafing off to the side? |
|
#13
|
||||
|
||||
|
Re: Programming Mecanum drive
You might want to check out this video I mad back when they were released: http://www.youtube.com/watch?v=v7CujEW0wgc
|
|
#14
|
|||
|
|||
|
Re: Programming Mecanum drive
Last year we used a single encoder and a gyro to do all our autonomous controls, and this worked perfectly fine. We were able to consistently score 4 of the 5 isolation game pieces, with the errors coming mostly from how the driver set the robot up on the field.
The robot is field-orientated, meaning that it does not matter how the robot is orientated, the driver will always push forward to move the robot away from him backwards for towards him, ect. The same code that was used in telly-op for the drive, was also used in our autonomous. The only thing different was that, instead of the driver setting the drive values by moving the joystick, the values were coded into the drive function calls. To answer the question about gyro drift/accuracy, they are accurate down to 1/10 of a degree, and we were seeing only about 1/10 of a degree of drift every 10 seconds, or 1/100 of a degree a second. This puts the total drift for a match under 2 degrees, which is well below vales that might effect performance. I was also pleasantly surprised about how well they did when they got hit. I expected them to quickly get misaligned, but that rarely ever happened. I'm willing to help out anyone that would like it, and I can also put up the code for our field-orientated drive. |
|
#15
|
||||
|
||||
|
Re: Programming Mecanum drive
Quote:
Excellent Tutorial!! Paint might be simple, but it gets the Point Across to the Viewer. You might Post your Pseudocode, or at least a Screen Shot of it in the Video... I have Subscribed to your YouTube Channel.. I am expecting more excellent work in the Future... |
|
#17
|
||||
|
||||
|
Re: Programming Mecanum drive
Quote:
Yes, I tend to Over Capitalize..... I do it for Emphasis. ( I do use italic and bold on the Forum too, or Better Yet, Combine Both.. ) I realize that I tend to do this Emphasizing while Speaking as well. My written words are a reflection of my speech. But the written word is much harder for me to bring the points across. ( There... bold rather than Capitols... ) Also, I really am Excited about this stuff..... ( I also use multiple periods at the ends of sentences, to imply a Longer Pause. As well as liberal whitespace between thoughts, just to slow you down...) |
|
#18
|
||||
|
||||
|
Re: Programming Mecanum drive
Quote:
. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|