Go to Post but you can rest assured: I have restored the balance by letting the GDC know that I know that they know that you know they have a pattern. -Leav - Leav [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-02-2008, 17:39
Mars Mars is offline
Registered User
FRC #0334
 
Join Date: Dec 2007
Location: New York City
Posts: 5
Mars is on a distinguished road
Mecanum Programming Help

Here at Brooklyn Tech, our Robotics team is, for the first time, using mecanum wheels in combination with a circular frame. Our goal is to program our robot to do what we refer to as a spiral: a motion of simultaneous spinning and going forward. If anyone could offer any help or advice in making this happen we would be eternally grateful.


M. Williams
  #2   Spotlight this post!  
Unread 26-02-2008, 17:43
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Mecanum Programming Help

Unfortunately I won't be much help with your programming question, but I do feel compelled to ask:
Why you would want to spin and move forward at the same time?
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
  #3   Spotlight this post!  
Unread 26-02-2008, 18:02
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,817
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: Mecanum Programming Help

OK, so you want the robot to travel in a straight line one way while spinning in circles in place??? Ouch.

I think the easiest way is, don't. Then again, I'm not a programmer.

From what I know of what a mecanum can do, I know they can arc while sliding in any direction (which may be what you want). They can spin in place. They can go straight in any direction. I don't think they're quite capable of doing what you apparently want. Then again, I can't think of any drive that can do that, unless you take a TechnoKat ball drive and put it on a freely rotating turret in the middle of an omnidrive base.

The only way I can think of is to have the direction and rotation separate sticks, then put something like a mouseball on the robot to tell which way you were going (set up something like the ball drive referenced above, but with a rotation sensor of some sort) and program the robot to reorient its own programming based on the feedback... I'm out of my depth now.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #4   Spotlight this post!  
Unread 26-02-2008, 19:25
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Mecanum Programming Help

1675's mecanum code this year may be able to perform what you describe...
(I admit i have not seen almost any of the driver practice, as I was sick for the last couple days of build ) but it may come out as more of an forward arc. I'm not sure.

What our algorithm does is get velocity and angle from one stick, and rotation from another, then calculates the PWM value of each individual motor taking those 3 variables into account. You can see our algorithm here:

http://team1675.org/forum/viewtopic.php?p=1352#1352

Most of the calculations are not shown (ex: getting the velocity and angle, scaling the rotation value), but the key lines are

Code:
MotorOutput = (((WORD)mySin( Heading ) * (WORD)Speed) >> 8) + ((256 - Speed) >> 1);
   
   MotorOutput += Rotation;
This is called for each motor. It first sets the value of each motor based on velocity and angle, then adds/subtracts the rotation value from each wheel.

This should create a spinning effect, but while moving forward, as I said, I am not sure, it may come out as an arc.

Last edited by BigJ : 26-02-2008 at 19:28.
  #5   Spotlight this post!  
Unread 26-02-2008, 20:27
Cow Bell Solo's Avatar
Cow Bell Solo Cow Bell Solo is offline
No Stolte No
AKA: Chris
FRC #2194 (Fondy Fire)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Minnesota
Posts: 381
Cow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the rough
Send a message via AIM to Cow Bell Solo Send a message via MSN to Cow Bell Solo Send a message via Yahoo to Cow Bell Solo
Re: Mecanum Programming Help

I don't know about programming the robot in a spiral moving forward at the same time, you would most likely have to get a compass sensor implimited onto the robot to know which way is is facing, if you need help or need some guidence in the normal programming of the robotmoving forward, backward, sideways, diagnal and then turn in place I can help you with that.
__________________
Who let the Blue Smoke Out
Team 2194 Mentor - 2012-Present - http://fondyfire.com
Team 2207 Alumni - http://whitebearlakerobotics.com
Iowa FIRST LEGO League Planning Team Member - 2010-Present - http://www.isek.iastate.edu/fll
FIRST LEGO League volunteer - 2008-Present

2008: MN Regional Quarterfinalists, Website Excellence
2009: MN North Star Quarterfinalists, recognized for safety, Website Excellence
  #6   Spotlight this post!  
Unread 26-02-2008, 23:34
LieAfterLie's Avatar
LieAfterLie LieAfterLie is offline
Registered User
FRC #2028
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Hampton, VA
Posts: 35
LieAfterLie is an unknown quantity at this point
Re: Mecanum Programming Help

It's not extremely hard, it's called operator (or field) oriented control, as opposed to robot oriented control. You need a gyro (comes in the KOP) and simple trig.

Operator oriented means that controller directions are defined (with the help of the gyro) so that 'up' is always the operator's 'up', not the robot's 'up'. Field oriented is a little more specific and means it's zeroed relative to the field's directions, so that the robot's 'up' is the same as what you might call the field's 'up'.

You can't just have it do what you say, at least not in a practical way that I can think of, without being operator oriented. When the robot is spinning and going in a straight line at the same time, 'forward' is defined relative to a reference heading kept track of with the gyro. So 'forward' can't also be whichever direction the robot is facing, not without having a switch to turn the operator oriented control on and off.
__________________
SEMPER UBI SUB UBI
  #7   Spotlight this post!  
Unread 27-02-2008, 00:18
David Bliss David Bliss is offline
Registered User
FRC #0904
 
Join Date: Jan 2008
Rookie Year: 2004
Location: Michigan
Posts: 4
David Bliss is an unknown quantity at this point
Send a message via AIM to David Bliss
Re: Mecanum Programming Help

Here's my $.02, but be warned that we're still trouble-shooting this. I don't remember what the exact bugs are right now, but I do know it doesn't frisbee very well.

There are two halves to the trick you described (also called "frisbeeing", iirc). The first is indeed having field-oriented controls. Your other option is to precisely spin the strafing joystick opposite the way the bot is spinning. I don't have that coordination.

The second step is to be able to combine spin with driving properly. As of right now, my team's mecanum code determines the strafing speeds first, sets temp vars, and adjusts the temp vars for spin, then sets the PWMs to those temp vars. If you do this, you may need to reduce your spin adjustments in order for the spin to not totally override the strafing.

Good luck!
  #8   Spotlight this post!  
Unread 27-02-2008, 15:33
Mars Mars is offline
Registered User
FRC #0334
 
Join Date: Dec 2007
Location: New York City
Posts: 5
Mars is on a distinguished road
Re: Mecanum Programming Help

Thank you all for taking the time out to help us. The programming division here at 334 isn't too psyched about it but one of our advisors insists that if we're going to do this properly we have to be able to do this also.

Last edited by Mars : 27-02-2008 at 16:32.
  #9   Spotlight this post!  
Unread 27-02-2008, 15:41
Mars Mars is offline
Registered User
FRC #0334
 
Join Date: Dec 2007
Location: New York City
Posts: 5
Mars is on a distinguished road
Re: Mecanum Programming Help

Thanks for the offer Cow Bell Solo, however we already have the front/back ect. down.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Holonomic vs Mecanum Help!! kSniper Technical Discussion 10 25-03-2008 16:57
Bizarre Mecanum Programming Bug manderson5192 Programming 10 08-02-2008 22:11
Mecanum Drive - Help Smoking_Gun Programming 22 04-12-2007 20:51
Mecanum drivetrain programming problems Mr. Freeman Programming 4 21-03-2007 17:11
mecanum programming mrmummert Programming 27 28-01-2007 13:45


All times are GMT -5. The time now is 13:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi