![]() |
mecanum programming
Hello...
Last year someone posted a link for information on programming for mecanum wheels usage. Does anyone remember what it was. Our team is concidering this this year. Any help will be greatly appreciated. Thank You |
Re: mecanum programming
We're considering it this year; I'd PM or email the main programmer. His forum name's cprogrammer.
|
Re: mecanum programming
well....
Start here... and then use the search tool to look for keywords like omni wheel and holonomic and kiwi There are numerous posts and good info out there ;) SPAM built an omni wheel 'bot for the 2004 game. It was successful, but you will trade off agility for traction and pushing power. Do you wish to run with the big dogs? Or dance around them! Eric |
Re: mecanum programming
This is what we use for a simple open-loop mecanum drivebase. Default_Routine() computes internal speed, turn rate, and slide (sideways travel) values from the joystick inputs, then computes motor speeds from the internal values.
The p1 joystick is on the left, and p2 is on the right. pwm01 is the right front motor, pwm02 is the left front, pwm03 is the right rear, and pwm04 is the left rear. rc_dig_in01 is a "deadman" switch which sets the motors to neutral unless it is closed. This was intended to be used by people "riding" the robot. Code:
/******************* |
Re: mecanum programming
Quote:
It's easy for things like variations in the carpet and motor differences to cause your drive mechanism to drive slightly off. You should consider adding a gyroscope and feedback loop so your bot can drive 100% straight (and there's good code examples out there for doing this). And, with the USB Chiklet available this year, it's really easy to use a three-axis joystick, so it's not hard to control an omni-robots three degrees of freedom direct from one joystick. |
Re: mecanum programming
It looks like we aren't the only team who is going to be trying out mecanums this year... just a couple of tips when searching for info, so far I have found results by searching for a couple of common spellings:
meccanum mechanum and mecanum All produce results. FIRST has info at http://www.usfirst.org/uploadedFiles...heels_Hine.ppt and the CD white papers have a great power point presentation called "strafing", I believe that runs you through the derivation of the formulas used for a variety of omni-drive systems. Good luck, and have fun going sideways. Jason |
Re: mecanum programming
Thanks guys...Hmmmm....will send this along to our programmers
|
Re: mecanum programming
Our team's programmer (<--Yes singular!!) worked out all the math to use the omniwheels, and the mechanum twice, with the wheels oriented differently. Turns out, since we have no money, that we won't be using any holonomic drive this year.
|
Re: mecanum programming
I am trying to use the code posted above but I am not able to make it strafe using the code. Is there as simple way of doing this. Help is appreciated.
|
Re: mecanum programming
If by "strafe" you mean travel sideways, the code I posted does that when the joysticks are pushed sideways.
|
Re: mecanum programming
I am using your code but when I move both joysticks to one side the wheels spin but the robot stays in place. All the wheels either spin inward or all wheels spin outward but never one side spins inward and the other spins outward.
|
Re: mecanum programming
You're using terms that I don't understand. How does a wheel spin "inward" or "outward"?
This code is for a mecanum drive base, with four mecanum wheels all mounted so they spin either forward or backward. The "handedness" of the wheels is important, and it's possible to set things up in one of two ways. One way has the angled rollers contacting the floor so that the robot can very nearly spin in place without any of the wheels turning. This code assumes the other way, where the angled rollers resist spinning in place when the wheels are stationary. The "meat" of the code is these four lines: Code:
front_r = speed-turn+slide;You might need to change the sign of some of these parts based on how your motors are wired. |
Re: mecanum programming
I got your code to work and it works great. One problem: speed controls orange light goes off or blinks about every 5 minutes and we have to recalibrate the speed controls. Is there any way to alleviate or completely fix this. Help is greatly appreciated.
|
Re: mecanum programming
Quote:
|
Re: mecanum programming
We'll try that. That's what I think the problem is but our drivers think it's all because of the code. We are using black joysticks from a while ago. They have a square base.
|
| All times are GMT -5. The time now is 13:02. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi