Go to Post Experience...you can't buy it, you might be able to get some for free by reading CD a lot, but usually you have to earn it, and it's not always fun. - MrForbes [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-01-2011, 15:05
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Has anyone gotten weird results from the mecanum drive?

I was working of porting the labview code to java before the kickoff.
At first, the movement was working fine
Code:
RobotDrive mecanumWheels = new RobotDrive(1,2,3,4);
Joystick joystick = new Joystick(1);
mecanumWheels.holonomicDrive(joystick.getMagnitude(), joystick.getDirectionDegrees(), joystick.getTwist());
However, after the reimage and update of java code,
Code:
RobotDrive mecanumWheels = new RobotDrive(1,2,3,4);
Joystick joystick = new Joystick(1);
mecanumWheels.mecanumDrive_Polar(joystick.getMagnitude(), joystick.getDirectionDegrees(), joystick.getTwist());
the bot doesn't strafe. Instead, the bot just goes forward, backward, and spins.
Is it a problem on my end, or on FRC's end?
__________________

Last edited by kinganu123 : 16-01-2011 at 20:28.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2011, 16:22
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Has anyone gotten weird results from the mecanum drive?

Have you put it up on blocks and made sure every wheel is powered? Some times you will get these symptoms if every wheel isn't powered for strafe.
__________________
I don't need a signature.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-01-2011, 20:28
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Has anyone gotten weird results from the mecanum drive?

like i said, it worked perfectly before the 2011 java update
so i know the wheels aren't the problem and neither is the wiring
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 16-01-2011, 21:29
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Has anyone gotten weird results from the mecanum drive?

Troubleshooting often involves checking things that you feel certain cannot be the reason for the malfunction. There are many different ways to develop a troubleshooting plan. Most succesful plans keep in mind Occam's Razor. You are inferring that discovering the malfunction after the update indicates explicit causality, however there may be other reasons for the malfunction that are simple to check first. Among the simplest is to put the robot up on blocks and make sure the correct wheels are turning in the correct direction when given an input. This simple step can, at the very least, eliminate some very probable reasons for the malfunction before you dig deeper. Another easy to check cause is to make sure there isn't some code further down that isn't modifying the code that you showed us.
__________________
I don't need a signature.
Reply With Quote
  #5   Spotlight this post!  
Unread 16-01-2011, 23:43
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Has anyone gotten weird results from the mecanum drive?

Our wierd symptoms included:
robot spinning while driving forward (gyro shorted on frame)
robot swaying like it was dancing (gyro hanging by pwm cable)
robot strafing but nothing else (two motors wired reverse)
robot spinning and strafing but not moving forward (two motors reversed in program)
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2011, 20:28
unixninja92 unixninja92 is offline
Registered User
FRC #0578 (Red Raider Robotics)
Team Role: Programmer
 
Join Date: Jul 2010
Rookie Year: 2009
Location: Faiport
Posts: 1
unixninja92 is an unknown quantity at this point
Re: Has anyone gotten weird results from the mecanum drive?

We are having the same problem.
This might fix it, but I have not had a chance to try it yet.
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2011, 21:00
devodl devodl is offline
Registered User
AKA: Steve Deal
FRC #0578 (R3 - Red Raider Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Rochester, NY
Posts: 21
devodl is just really nicedevodl is just really nicedevodl is just really nicedevodl is just really nicedevodl is just really nice
Re: Has anyone gotten weird results from the mecanum drive?

You just described our team's experience for the last week.
This thread explains the cause and solution:
http://www.chiefdelphi.com/forums/sh...ad.php?t=89525
We haven't verified the solution but kudos to team 662 for the cause.
Reply With Quote
  #8   Spotlight this post!  
Unread 20-01-2011, 23:37
bakketti bakketti is offline
Registered User
FRC #0443 (Freelance Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Denver, Co
Posts: 18
bakketti is an unknown quantity at this point
Re: Has anyone gotten weird results from the mecanum drive?

Quote:
the bot doesn't strafe. Instead, the bot just goes forward, backward, and spins.
Is it a problem on my end, or on FRC's end?
Yes! We have the exact same problem on our 2010 robot when moving to mecanumDrive_Polar()!

One quick fix is to use mecanumDrive_Cartesian() with the x and y axes as input and a fixed 0 degree angle input. Not ideal though. We have some custom magnitude and direction code for our controller.

Not sure if this issue is our code or 2011 wpilibj. I'll be looking into it this weekend.
Reply With Quote
  #9   Spotlight this post!  
Unread 21-01-2011, 00:04
bakketti bakketti is offline
Registered User
FRC #0443 (Freelance Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Denver, Co
Posts: 18
bakketti is an unknown quantity at this point
Re: Has anyone gotten weird results from the mecanum drive?

See this thread: http://www.chiefdelphi.com/forums/sh...53#post1004753
Reply With Quote
  #10   Spotlight this post!  
Unread 21-01-2011, 17:59
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Has anyone gotten weird results from the mecanum drive?

Quote:
Originally Posted by bakketti View Post
Yes! We have the exact same problem on our 2010 robot when moving to mecanumDrive_Polar()!

One quick fix is to use mecanumDrive_Cartesian() with the x and y axes as input and a fixed 0 degree angle input. Not ideal though. We have some custom magnitude and direction code for our controller.

Not sure if this issue is our code or 2011 wpilibj. I'll be looking into it this weekend.
Bug in WPILibJ...

http://firstforge.wpi.edu/sf/go/artf1315
Reply With Quote
  #11   Spotlight this post!  
Unread 21-01-2011, 18:29
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Has anyone gotten weird results from the mecanum drive?

Quote:
Originally Posted by jhersh View Post
Yea, I just saw this update
Gonna hafta update the netbook tomorrow
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 23-01-2011, 17:40
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Has anyone gotten weird results from the mecanum drive?

We ran into another issue today. When strafing the robot goes diagonal. Output from two motors on opposing sides and ends (diagonal from each other) drops to zero which makes it go diagonal.

When we bypass the gyro in the code it goes perfect but doesn't hold heading as to be expected without a gyro.

checked output on gyro and it derivatives about 0.05 degrees/second while sitting still.
Reply With Quote
  #13   Spotlight this post!  
Unread 23-01-2011, 18:48
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Has anyone gotten weird results from the mecanum drive?

Yeah, after updating the netbook, we STILL had problems
We are probably gonna write our own mecanum drive code or get the 2010 version
If anyone has the 2010 version on hand, could you direct me to the holonomicDrive.
__________________
Reply With Quote
  #14   Spotlight this post!  
Unread 23-01-2011, 18:54
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Has anyone gotten weird results from the mecanum drive?

Quote:
Originally Posted by kinganu123 View Post
Yeah, after updating the netbook, we STILL had problems
We are probably gonna write our own mecanum drive code or get the 2010 version
If anyone has the 2010 version on hand, could you direct me to the holonomicDrive.
If you are using mecanum_polar, the fix for that has not been posted yet. Don't expect it to be working in the latest update. Please keep an eye out for the next update which will fix this. Or you can just change the cos to sin and rebuild it yourself.

-Joe
Reply With Quote
  #15   Spotlight this post!  
Unread 24-01-2011, 17:55
germansamurai16's Avatar
germansamurai16 germansamurai16 is offline
Registered User
AKA: Jonathan Nagel
FRC #0224 (The Tribe)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Piscataway
Posts: 8
germansamurai16 is on a distinguished road
Send a message via AIM to germansamurai16 Send a message via MSN to germansamurai16 Send a message via Yahoo to germansamurai16
Re: Has anyone gotten weird results from the mecanum drive?

Quote:
Originally Posted by jhersh View Post
If you are using mecanum_polar, the fix for that has not been posted yet. Don't expect it to be working in the latest update. Please keep an eye out for the next update which will fix this. Or you can just change the cos to sin and rebuild it yourself.

-Joe
We already fixed the sin and cos, but it still wasn't strafing. Even before the sin/cos was found, it was obvious for us that the motors aren't inverting themselves right.

The odder thing is when we put arcade in on the mecanum wheels after inverting the back motors it was able to strafe fine. Granted, we could not go straight after the inversion but that is an entire other story.

We decided that it would probably be smoother going ahead if the code was rewritten as a way for us to not have to worry about it in future years



btw kinganu123: i was in class reading this thread on my phone and was going to respond saying our team has a similar issue, but the saw our number in the corner of my eye . Also i haven't had the chance to start yet. Wednesday I'm looking at it with one of my friends and it should be knocked out by at least Fri, or most of it at least

--Nagel
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:47.

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