![]() |
Mecanum steering
Hello! Our team has been using tank drive for the last three years or so, but next year we'll hopefully be switching to Mecanum wheels. I was wondering if it is possible to program a robot so that one joystick controls forward/backward/strafeleft/straferight and another joystick controls rotation. I've looked at the classes provided (we're programming in C++), and I'm not sure what to think of them. I'm pretty sure we'll need to implement the gyro. Can this be done?
|
Re: Mecanum steering
Hopefully I can help you out by giving a simple answer yes it is possible in fact that is exactly how we controlled out robot in 2011 with mecanums. And you don't need a gyro (though you can if you want)
Now time for what I say every time this comes up on Delphi. I am a huge supporter of nontraditional drive systems (not tankdrive), and am glad that I was able to work with them as a student and continue to work with them as a mentor and in my place of work that being said here are somethings to really think about before making the switch to mecanum. 1. Do you want to regulate 4 CIMS to drive the wheels? This year with the increase to 6 CIMS, and the addition of the MiniCIMS it was not an issue but if this changes it can mean limits in your designs. 2. Do you have the programming support to handle the switch? Unfortunately this is sometimes over looked but it takes a lot of fine tuning on the programming side to make a great mecanum drive, without it they can be a nightmare. 3. Is your robot better at the game for having mecanums? This may seem weird coming from a member of a team who is on its third straight year using the wheels but not all games is it a good idea to use mecanums or all strategies. This year if your robot was designed as a 30 point climber who played defense for most of the match you wouldn't want mecanums you would want the power from a tank drive. Another example of previous games where mecanum drives would not have made your robot better would be 2005 or 2002 where the field was either impeded by a lot of obstacles or where pushing power was the real game changer. What i am trying to get at is the part of your post where you say next year you are switching, don't assume that till you see next years game. |
Re: Mecanum steering
It's definitely possible. Your direction and magnitude come from one stick, and the rotation comes from the other.
I'd like to remind people stumbling in here that this is the Programming subforum and not an appropriate place to start a mecanum debate |
Re: Mecanum steering
We did this in 2011, I'll ask our head programmer from that year to reply in this thread.
|
Re: Mecanum steering
See the MecanumDrive_Cartesian() function in the RobotDrive class:
Code:
void RobotDrive::MecanumDrive_Cartesian(float x,You will only need to use the gyro if you want your controls to be "field-oriented," such that pushing forward on your joystick means the robot always heads directly away from you, no matter which way it is pointing. If you want it to be "robot-oriented," such that forward on the joystick always means the robot travels in the direction that its front face is pointing, just pass a 0 to the `gyroAngle` field of the function. |
Re: Mecanum steering
We've used mecanum (and then octocanum) for quite a few years now, but this was the first year we decided to add the gyro and try to do some fancy things...
And we got a lot of drift on the gyro, so we ended up disabling it. Any ideas on how to prevent this? |
Re: Mecanum steering
How much drift? Can you quantify it in degrees/time?
Please give specifics on the gyro, how it is mounted, how it is used in the code, how the robot moves, and when the error accumulates. Greg McKaskle |
Re: Mecanum steering
Our team began using mecanum this year. We found it impossible to use without a gyro. Nearly every time we drove, it careened in an arc. Adding a gyro fixed all problems. And with the rotation aspect, we set a constant value to rotate at with the top left and right buttons on the joystick (about 50%) and it worked like a charm
|
Re: Mecanum steering
Quote:
Quote:
|
Re: Mecanum steering
Quote:
|
Re: Mecanum steering
We controlled our mecanums in 2011 and 2012 with a single joystick. It has to have the extra degree of freedom (twist) in addition to the normal x/y capability. I think it was the Attack 3D joy stick.
We also used a gyro in 2011. To deal with gyro drift, we had a gyro reset button and a gyro disable button. To reset, you spun the bot until it faces what ought to be 0 degrees, and the press the button. I think we had to reset once or twice per match... Not sure why we didn't have a gyro in 2012, but depending upon driver, it was often disable in 2011 base on driver preference. |
Re: Mecanum steering
Quote:
|
Re: Mecanum steering
So it's really that easy to drive like that? I assume that you must need encoders to ensure that the motors are spinning at exactly the same speed. How would that be done? How about field-centric steering? Is that particularly difficult to program? Like I said, we don't exactly have any Mecanum wheels to test out with (yet), so this is purely for the sake of learning.
|
Re: Mecanum steering
Quote:
|
Re: Mecanum steering
Quote:
Our team's retrospective analysis of mecanum performance in 2011 is unfortunately more qualitative than it is quantitative -- which is to say some of us would say that there was a noticeable improvement in control, whereas others would say that both our tuned and un-tuned mecanum control was relatively imperfect, perhaps because we did not tune well enough. |
| 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