Go to Post Reach out to successful teams and ask them for help, rather than complain about them. I have never seen a successful team deny help to anyone. - OZ_341 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 10 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 25-11-2011, 00:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: help with mecanum drive code

Quote:
Originally Posted by Djur View Post
This is our team's custom mecanum code:

Code:
jaguarDrive((jX+jY)/2, (jY-jX)/2, -(jY-jX)/2, -(jX+jY)/2);
jX and jY are just the X and Y coordinates our joysticks read (-1 through 1).


This is by far the simplest solution I've seen.
Simplicity comes at a price:

If jX is zero, your forward command to the wheels is limited to +/-0.5.

If jY is zero, your strafe command to the wheels is limited to +/-0.5

Only when |jX|=|jY|=1 will you ever be commanding full power.


Quote:
Originally Posted by Djur View Post
That's very interesting, although I see no point at which a robot would need to do that except for showing off.
Most folks like to be able to turn while driving, rather than have to stop and rotate-in-place.





Last edited by Ether : 25-11-2011 at 00:17.
Reply With Quote
  #17   Spotlight this post!  
Unread 08-02-2012, 14:35
austin1743 austin1743 is offline
Head Programmer - Java
FRC #1743
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Pennsylvania
Posts: 56
austin1743 is an unknown quantity at this point
Re: help with mecanum drive code

well we have tried out code and it works but wants to go to the left the entire time as if it is in constant strafing mode. Also we have the joystick set-up in the code so when it goes forward to go forward but it goes backwards when we press forward.

I have tried changing the drive to being negative but this doesn't change anything. any suggestions?
__________________
Team 1743
Head Programmer
Reply With Quote
  #18   Spotlight this post!  
Unread 08-02-2012, 14:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: help with mecanum drive code

Quote:
Originally Posted by austin1743 View Post
well we have tried out code and it works but wants to go to the left the entire time as if it is in constant strafing mode. Also we have the joystick set-up in the code so when it goes forward to go forward but it goes backwards when we press forward.

I have tried changing the drive to being negative but this doesn't change anything. any suggestions?
Do you have the mec wheels mounted properly*? If so, continue:

Put the robot up on blocks.

Make an empty table on a clean sheet of paper and fill it in as you run these tests:

Give a pure forward command, and for each wheel record the direction it is spinning.

Give a pure reverse command, and for each wheel record the direction it is spinning.

Give a pure strafe_right command, and for each wheel record the direction it is spinning.

Give a pure strafe_left command, and for each wheel record the direction it is spinning.

Give a pure rotate_right command, and for each wheel record the direction it is spinning.

Give a pure rotate_left command, and for each wheel record the direction it is spinning.

Post the test results here.


* viewed from the top, rollers should form an "X" pattern, not an "O".

Reply With Quote
  #19   Spotlight this post!  
Unread 08-02-2012, 18:40
austin1743 austin1743 is offline
Head Programmer - Java
FRC #1743
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Pennsylvania
Posts: 56
austin1743 is an unknown quantity at this point
Re: help with mecanum drive code

yes we have the x made by the mecanum wheels. i will post the results up tomorrow when i go back in, thanks.

also in the code itself we have leftFrontspeed, rightFrontspeed do we need the back wheels set-up in the class the same way?
__________________
Team 1743
Head Programmer
Reply With Quote
Reply


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


All times are GMT -5. The time now is 12:50.

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