I have a four wheeled base. i want to use the 2 rear wheels as mecanums and the front 2 wheels as omnis. How will I program these in easyc?
2 Mecanums will be useless. Theoretically you could make 2 work if they were on the same side, but since they come in sets of 4 I would not try anything besides the 4. You can also consider an H drive with 5 omni wheels as well. We had done an X drive on our first toss up robot but abandoned it pretty quickly.
Mecanums work by having front and back wheels rotating in opposite directions to strafe.
Okay. I was curious since I saw a team at the state championship actually having 2 omnis on the front and 2 mecanums on the rear.
If they were using that combination it was not for a holonomic drive. The picture below should help you understand why you need 4 mecanum wheels for them to work properly.
http://www.humanoid-robotics.com/product_images/uploaded_images/mechanum3.jpg
Thank you. That helps a lot. We decided to go for 4 wheeled mecanum base
My old tutorial goes through the details quite well for autonomous programming. As far as programming operator controlled mecanum wheels, here is the code I’m using in PROS. It should be easy enough to convert to EasyC.
void chassisSetMecanumTank(char left_axis, char right_axis, char strafe_axis)
{
if (abs(left_axis) < JOY_DEADBAND) left_axis = 0;
if (abs(right_axis) < JOY_DEADBAND) right_axis = 0;
if (abs(strafe_axis) > JOY_DEADBAND) strafe_axis= 0;
int frontLeft = left_axis + strafe_axis;
int rearLeft = left_axis - strafe_axis;
int frontRight = right_axis - strafe_axis;
int rearRight = right_axis + strafe_axis;
chassisSetIndv(frontLeft, rearLeft, frontRight, rearRight);
}
I vaguely remember EasyC support saying that the holonomic block works with mecanum wheels, except that you’ll need to toy with which wheels go where.
Holonomic block works perfectly. I used it a few years ago and just recently for my D team with no complaints.
Actually, it’s possible to use two mecanums on the back along with omnis on the front. Our first robot from Sack Attack (2012-2013) used this configuration to add shifting to an otherwise holonomic robot. The front two omnis will have to be around 45 degrees so it strafes properly.
Think of it this way, the robot would look like an X-holonomic on the front side, but on the back, there will be two mecanums (we used flip-out omnis on the front)
The problem is that you have to pull off some tweaking on the code to make it run smoothly. When we made this robot, it worked great as just a chassis. When we added weight, the tower, arms, and sacks threw the balance off by quite a bit. Way more of a defensive bot than an offensive one.
As for programming, it would be just about the same as a regular holonomic bot. Remember to adjust the motor speeds of the omnis, as the motors for them will be at 45 degrees.
Here’s a video of our robot, “Poptart” (not taken by us)
Good luck!
You are correct, but this would be a programming nightmare since the 45 degree omni wheels have an effective ratio of 1:1.4 as compared to the back due to the combined X-Y vectors. If you notice X drives strafe much faster than mecanum wheels so the robot would want to arc in a rainbow fashion due to the front moving faster than the back. This could be solved using encoders on all 4 motors and figuring out the exact ratios between front and back which could be compensated for by using PID controls. The angle of the front wheels could also be adjusted to compensate, but again this is something for a team with years of experience, lots of time, or insane physics and calculus skills.
Going with either an X drive or Mecanums would be easier, as would an H drive all of which are more within the reach of a team who’s experience is limited.