Go to Post I wouldn't want to face THAT bad boy in competition... - Iain McLeod [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 25-01-2011, 00:40
Vikesrock's Avatar
Vikesrock Vikesrock is online now
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: Wheels spinning at different speeds program or electrical error?

Your CIMs may or may not be biased, but that's not the issue you need to chase first.

this line from your first post is what you need to address first
Quote:
When reading on the driver station the pwms to the jaguars show me that two are getting less than the other two.
If you expect the wheels to all be getting the same speed command and they aren't you need to look at your code. I am not particularly familiar with the Labview holonomic drive VI and I don't have a copy of Labview this year to play around with so I'm not sure which direction to point you in terms of diagnosing the problem with the code.
__________________


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)
Reply With Quote
  #17   Spotlight this post!  
Unread 25-01-2011, 00:47
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 545
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
Re: Wheels spinning at different speeds program or electrical error?

The reason (or a possible reason) Grim Tuesday brought up encoders is because they can help you in correcting any bias that may pop up due to any issues, be it a mechanical or an electronic issue.

With an encoder, you can perform some higher-level programming and include features such as PID (proportional–integral–derivative) loops to account for error.

For example, if your code is telling the wheels to spin at 2,000 RPMs (I know, not how it actually works, but bear with me), and the encoder says the wheels are only spinning at 1,800 RPMs, you can use your code to dynamically adjust the output until the wheels are all spinning at the same (and/or correct) rate.

Simply multiplying the output by .96 because that's the error you measured once or twice is not a good programming habit to get in to. These "magic numbers" are bad practice because they make the code difficult to adapt later and the magic number that indeed performs magic may vary depending on the situation.


Quote:
When reading on the driver station the pwms to the jaguars show me that two are getting less than the other two.
This would indicate to me that there is something wrong with the code. Assuming you are not using the CAN bus or any encoders, the PWM values the DS shows are for all intents and purposes what your Victors/Jags are running at. Thus if those values are off, the wheels are not getting the correct values.

However, be aware that if you aren't pushing your joystick perfectly in one direction, all four values shouldn't be the same. I would recommend taking the joysticks' values and running them through the code yourself to see what is happening and what should (in your eyes) be happening.

Also make sure you are working with freshly charged batteries. Poorly charged batteries can cause a number of problems.
__________________
Team 2052- KnightKrawler
Mentor and volunteer

Last edited by Bryan Herbst : 25-01-2011 at 00:56.
Reply With Quote
  #18   Spotlight this post!  
Unread 25-01-2011, 00:49
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Wheels spinning at different speeds program or electrical error?

I think the problem may be from me inverting some crap, which I was also thinking through and guess I'll just have to see that. My program makes it so that the joystick is directly controlling each motor. I have not subtracted the speed from any of the motors or interfered with that, so that's what is perplexing me. Again this basically only happens when strafing left and right, so that's just making me think more and more that it's my code since forward/reverse are near perfect

Edit: Oh that brings up another thing too we did test the voltmeter having the joystick in different directions and the voltage did go up when I was very close to horizontal. I probably need to get a joystick with notches or disable the y axis when the x axis is active then?

Last edited by DFZXA : 25-01-2011 at 00:52.
Reply With Quote
  #19   Spotlight this post!  
Unread 25-01-2011, 01:03
Bryan Herbst's Avatar
Bryan Herbst Bryan Herbst is offline
Registered User
AKA: Bryan
FRC #2052 (KnightKrawler)
Team Role: Mentor
 
Join Date: Sep 2007
Rookie Year: 2007
Location: Minneapolis, Minnesota
Posts: 545
Bryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond reputeBryan Herbst has a reputation beyond repute
Re: Wheels spinning at different speeds program or electrical error?

Quote:
Originally Posted by DFZXA View Post
Edit: Oh that brings up another thing too we did test the voltmeter having the joystick in different directions and the voltage did go up when I was very close to horizontal. I probably need to get a joystick with notches or disable the y axis when the x axis is active then?
Part of that will determine how your team/driver wants to control the robot.

My team has used mecanum for a number of years now with two joysticks. One joystick essentially provides arcade drive (y-axis controls forward/back, x-axis controls rotation), and the second joystick provides strafe on the x-axis. You don't need to disable the y-axis on the second joystick, you simply don't use any of the values it gives you.

There are of course other control options that would require tweaking this a little. How are you planning on controlling it?
__________________
Team 2052- KnightKrawler
Mentor and volunteer
Reply With Quote
  #20   Spotlight this post!  
Unread 25-01-2011, 01:11
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Wheels spinning at different speeds program or electrical error?

Right now it's set up so one joystick does it all (I just did it for fun and ease of carrying things around) Rotation of the joystick rotates the bot (working fine) Forward/reverse on joystick=forward/reverse on bot lastly left and right is strafing. My other set up was one joystick does strafe and forward/backward and the other joystick rotates on the x axis (like call of duty controls) and thinking about it that set up would cause the strafe value to be read a little weird since it's also reading the y axis and it's hard to strafe unless all the motors are the same speed
Reply With Quote
  #21   Spotlight this post!  
Unread 25-01-2011, 08:45
JCharlton's Avatar
JCharlton JCharlton is offline
Registered User
AKA: JC
no team
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Montreal
Posts: 125
JCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to behold
Re: Wheels spinning at different speeds program or electrical error?

A simple debugging strategy you could try is swap the Jaguars' pwms front and back. That will tell you if it's programming or calibration of the Jags.

Encoders are the best way to make both sides match exactly, if you've got some programming help to get them working. Another way you could do it is with a gyro, it may be a little simpler, but it does have other issues. One advantage to the gyro is it will compensate for differing traction between the wheels (within reason).
__________________
"There is no problem so bad that you can’t make it worse." - via Chris Hadfield
Reply With Quote
  #22   Spotlight this post!  
Unread 25-01-2011, 09:49
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Wheels spinning at different speeds program or electrical error?

Found it it's just a joystick issue so I gave strafing its own joystick and its fine. Only problem is when going back it curves slightly. Pwm 2 is going slightly slower so I guess it's time for the encoders.
Reply With Quote
  #23   Spotlight this post!  
Unread 25-01-2011, 09:51
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Wheels spinning at different speeds program or electrical error?

Quote:
Originally Posted by DFZXA View Post
Right now it's set up so one joystick does it all (I just did it for fun and ease of carrying things around) Rotation of the joystick rotates the bot (working fine) Forward/reverse on joystick=forward/reverse on bot lastly left and right is strafing.
So the picture you put in your first post doesn't actually match the code you're running right now?

When I read your description of what was happening, the first thing I thought was that the robot was trying to rotate a little whenever you told it to strafe. Since the picture showed the rotate input coming from a separate joystick, that didn't make sense. Now that you say otherwise, it seems a likely possibility. When you're pushing the joystick to the side, it's easy to twist it a little without realizing it.
Reply With Quote
  #24   Spotlight this post!  
Unread 25-01-2011, 15:31
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Wheels spinning at different speeds program or electrical error?

Quote:
Originally Posted by Alan Anderson View Post
So the picture you put in your first post doesn't actually match the code you're running right now?

When I read your description of what was happening, the first thing I thought was that the robot was trying to rotate a little whenever you told it to strafe. Since the picture showed the rotate input coming from a separate joystick, that didn't make sense. Now that you say otherwise, it seems a likely possibility. When you're pushing the joystick to the side, it's easy to twist it a little without realizing it.
Yeah everything is fine now thanks for the help
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 15:13.

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