Go to Post In order to change the world and make it a better place we must start with ourselves. - wendymom [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 10-27-2012, 12:52 PM
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Robot "kicks out" when it goes right

We're trying to get our 2012 robot to work again

Whenever our joystick is tilted even the slightest amount to the right, the robot's wheels violently jerk right at maximum speed and then stop moving. Our robot then stops responding to any commands but if we quickly hit disable and reenable it continues responding.

We uploaded a video of our robot having the problem to YouTube, and attached is the current file on the robot.
Attached Files
File Type: cpp MyRobot.cpp (685 Bytes, 21 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 10-27-2012, 01:02 PM
akoscielski3's Avatar
akoscielski3 akoscielski3 is offline
Mentor (1114), Alumni (772)
AKA: Aaron Koscielski
FRC #1114 (Simbotics)
Team Role: Mentor
 
Join Date: Jul 2010
Rookie Year: 2006
Location: LaSalle, Ontario, Canada
Posts: 1,066
akoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond reputeakoscielski3 has a reputation beyond repute
Re: Robot "kicks out" when it goes right

I think your issue is either the program and Jagaur, a faulty jagaur, or possibly you digital side car.

Make sure that your program says slowly increase its speed as you move the controller to the right. I am not a programmer so I don't know exactly what that would be called. I think because it jerks to the right and turns off that the jagaur is just getting over loaded. I know that if we jerk our robot forward and backwords that the jaqaurs have to restart sometimes. This may be whats happening. So I would try NOT disabling the robot after this happen's, wait at least a 10 seconds (may work better if left for a longer period of time) and try moving again.

The other issue might be that your jaguar is thinking itshould be put at full power, when it shouldn't be. I'm not sure if there is a "reset" for them or not, but if there is try reseting your jaguar. If that doesn't work try replacing it with a new one.

The digital side car might be telling the jaquar to go at full power, instead of steadily increasing like it should. Try "reset" if there is one, if not replace it.

Most likely the issue is the first one, then maybe second, if not try the third. I am not a programmer of Electrical person, so dont trust me 100% with this. But I have enough experience with both to help troubleshoot. Good luck! Hope this works out for you!
__________________
Hall of Fame Team 1114 Simbotics
2013-Present
Host of Simbot Solidworks Series
Team 772 Sabre Bytes
2010-2013

Dean's List Finalist 2013 Waterloo Regional
Reply With Quote
  #3   Spotlight this post!  
Unread 10-27-2012, 01:31 PM
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Robot "kicks out" when it goes right

We tried waiting a few minutes after the robot kicked, but it did not respond. This makes it less likely the jags are overdrawing. We will try resetting the jags
Reply With Quote
  #4   Spotlight this post!  
Unread 10-27-2012, 01:40 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,000
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: Robot "kicks out" when it goes right




From the video, this looks like a code issue.

Have you done anything at all to the code in the robot -- including re-loading it -- since the last time the robot worked properly?

Reply With Quote
  #5   Spotlight this post!  
Unread 10-27-2012, 01:51 PM
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,112
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: Robot "kicks out" when it goes right

While someone looks at the code for problems, have someone else double-check the wiring from your speed controllers to your motors. If something is cross-wired, you can get really weird results that only show up under specific conditions.
Reply With Quote
  #6   Spotlight this post!  
Unread 10-27-2012, 01:51 PM
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Robot "kicks out" when it goes right

We lost our old code from last year and are trying to reprogram it for an unofficial competition coming up soon. We are using the new compact cRIO - last year we had used the cRIO I. The robot hasn't worked well since we changed cRIOs and lost the code.

Our programmer was thinking that it had to do with pointers in C++; he had been getting the "MotorSafetyController.cpp at line 123" error, but he fixed that and the problem is still present.

Quote:
While someone looks at the code for problems, have someone else double-check the wiring from your speed controllers to your motors. If something is cross-wired, you can get really weird results that only show up under specific conditions.
We'll check on that too, thanks. We are pretty certain nothing has changed since last seasons competition - where the bot worked fine - but there have been a lot of people around the robot so anything is possible.
Reply With Quote
  #7   Spotlight this post!  
Unread 10-27-2012, 01:59 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,000
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: Robot "kicks out" when it goes right


Are you using one or two Joysticks? Arcade or tank style?

Are you using the WPI library functions for this, or home brew?


Reply With Quote
  #8   Spotlight this post!  
Unread 10-27-2012, 02:09 PM
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Robot "kicks out" when it goes right

Quote:
Originally Posted by Ether View Post

Are you using one or two Joysticks? Arcade or tank style?

Are you using the WPI library functions for this, or home brew?


We attached our code in our OP and we are using WPILib. Two joysticks, one is arcade style.

@Alan: The wiring is solid.

@akoscielski: We reset the jaguars but it is still having the problems. Whenever we move the drive joystick the SLIGHTEST bit towards the right, even a tiny, indistinguishable bit, the robot kicks out.
Reply With Quote
  #9   Spotlight this post!  
Unread 10-27-2012, 02:28 PM
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Robot "kicks out" when it goes right

Quote:
Originally Posted by gyroscopeRaptor View Post
We attached our code in our OP and we are using WPILib. Two joysticks, one is arcade style.

@Alan: The wiring is solid.

@akoscielski: We reset the jaguars but it is still having the problems. Whenever we move the drive joystick the SLIGHTEST bit towards the right, even a tiny, indistinguishable bit, the robot kicks out.
Oh.
My.
GOD.

The problem was that I forgot to put the sidecar power cable in.

[sarcasm]I want to slit my wrists now.[/sarcasm]

Sorry for wasting your guys' time.
Reply With Quote
  #10   Spotlight this post!  
Unread 10-27-2012, 02:36 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,000
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: Robot "kicks out" when it goes right

Quote:
Originally Posted by gyroscopeRaptor View Post
The problem was that I forgot to put the sidecar power cable in.
I'd like to learn something here.

Could someone explain why this would cause the drivetrain would work fine in the forward, and reverse, and rotate left directions, but not in the rotate right direction?


Reply With Quote
  #11   Spotlight this post!  
Unread 10-28-2012, 01:56 AM
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,112
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: Robot "kicks out" when it goes right

Quote:
Originally Posted by Ether View Post
Could someone explain why this would cause the drivetrain would work fine in the forward, and reverse, and rotate left directions, but not in the rotate right direction?
Assume four motors, two on each side. Further assume that the wiring is such that one side's motors run "forward" and the other side's motors run "reverse" for forward travel of the robot.

The DS can "sneak" some power from the PWM signals coming from the cRIO. When the robot is being commanded neutral, it's getting four 1.5ms pulses every so often, and that's enough to make it work. When it's being commanded either forward or reverse, two of the signals get shorter, but two get longer, and it balances out. When it's being commanded to turn left, all four signals get longer. But when it's being commanded to turn right, all four signals get shorter, the DS gets starved for power, and things stop working.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-28-2012, 03:57 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,000
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: Robot "kicks out" when it goes right


Thank you. The DS "sneaking power" from the cRIO's PWM signals was the puzzle piece I was missing.


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 09:25 AM.

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