Go to Post you should be putting forth you best effort every time you enter the field. - Protronie [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 24-11-2015, 01:25
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
[FTC]: Continuous Servo Keeps Rotating

Hey Chief Delphi,

We seem to have some trouble getting the continuous rotation servo to stop moving. The servo should move when button A on Gamepad 1 is pressed and should stop when released. Here is the code snippet we have:

Code:
if (gamepad1.a ) {
      // if the A button is pushed on gamepad1, increment the position of the servo.
      linearPosition = linearSliderLeft.getPosition()+ linearDelta;   
      linearPosition = Range.clip(linearPosition, 0.2, 0.8);
      linearSliderLeft.setPosition(linearPosition);
}
Should we have an else block in which we stop the servo with a setPosition call? We have tried setting it to 0.45, 0.5 and 0.55 but the servo still keeps moving.

Thanks,
The Charging Champions
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
Reply With Quote
  #2   Spotlight this post!  
Unread 24-11-2015, 22:01
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,674
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: [FTC]: Continuous Servo Keeps Rotating

There is not a whole lot of FTC traffic on CD, but as I see it's been a while with no posts at all, I'll post something that may or may not be helpful.

Caveat: I have not done any FTC. I have used "generic" continuous rotation servos, however, e.g. the ones on Boe Bots. If the FTC continuous servos are not like those, this will be useless.

Generic Continuous Rotation Servos either do not have a potentiometer, or have broken the link between it and the rotation shaft. The practical upshot is that it is a "servo" that thinks it is always at center. This means that the farther from center you try to "set" its position, the faster/harder it tries to go that direction. There should be some "set" value which results in the servo not rotating.

When you change the "position", does the speed and/or direction of rotation change? If so, I suggest that you interpolate/extrapolate to where the wheel should not rotate, enter that value, and iterate until you get a non-rotating shaft. (This is known numerically as Newton's Method for finding a root, if you want to Google more about it.)

If the speed does not change, I'd suggest verifying that you're addressing the correct pin. If you're sure of that, try another method to see if you're really sending a good PWM signal to the port. This could be (for example) an oscilloscope, a regular servo, or a PWM motor controller like used in FRC. Hopefully the answer to that will give you a clue which way to go from there; if not, post your results and we'll help you through it.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #3   Spotlight this post!  
Unread 25-11-2015, 20:59
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,103
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: [FTC]: Continuous Servo Keeps Rotating

The servo will not rotate when set to about 0.5 (some servos behave differently than others, 0.49 worked fine for us). And like GeeTwo said, you can't get position information from a continuous rotation servo, so you need some other method.

For 0.45 and 0.55, did the servo move in different directions? If so, the no-rotation spot is somewhere in between.
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division

Reply With Quote
  #4   Spotlight this post!  
Unread 26-11-2015, 02:46
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
[FTC]: Continuous Servo Keeps Rotating

Update: the issue was that the servo was plugged into port 6 but was programmed on the phone for port 1. The servo now works and stops at 0.5.

However, this brings up another question: why did the servo move even though no instructions were given to it (as per the phone)? Is this expected?

Thanks,
Charging Champions
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
Reply With Quote
  #5   Spotlight this post!  
Unread 26-11-2015, 05:34
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,674
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: [FTC]: Continuous Servo Keeps Rotating

Quote:
Originally Posted by FTC Team CC View Post
However, this brings up another question: why did the servo move even though no instructions were given to it (as per the phone)? Is this expected?
No, I would not expect this; I know that the Boe Bots CR servos are stationary when they do not receive a signal. Are you perhaps putting some sort of signal on port 6?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #6   Spotlight this post!  
Unread 27-11-2015, 00:50
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,103
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: [FTC]: Continuous Servo Keeps Rotating

Quote:
Originally Posted by FTC Team CC View Post
Update: the issue was that the servo was plugged into port 6 but was programmed on the phone for port 1. The servo now works and stops at 0.5.

However, this brings up another question: why did the servo move even though no instructions were given to it (as per the phone)? Is this expected?

Thanks,
Charging Champions
We ran into a similar thing, and I suspect (but do not know for sure) that when any servo is commanded to a position that all others not commanded go to position "0.0" - which for the CR servos makes them keep moving.
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division

Reply With Quote
  #7   Spotlight this post!  
Unread 28-11-2015, 10:49
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
Even if that is the case, the servo we plugged in should not have moved at all, since it was told to move to position 0.5.

By the way, we noticed the servo was always moving in only one direction regardless of whether the servo's position was 0 or 1.
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
Reply With Quote
  #8   Spotlight this post!  
Unread 28-11-2015, 11:53
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,674
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: [FTC]: Continuous Servo Keeps Rotating

Quote:
Originally Posted by FTC Team CC View Post
Even if that is the case, the servo we plugged in should not have moved at all, since it was told to move to position 0.5.
One of us has misread something. The way I read this:

Quote:
Originally Posted by FTC Team CC View Post
Update: the issue was that the servo was plugged into port 6 but was programmed on the phone for port 1.
That is, you programmed port 1 to move to 0.5, but did not program port 6.

Quote:
Originally Posted by Christopher149 View Post
I suspect (but do not know for sure) that when any servo is commanded to a position that all others not commanded go to position "0.0" - which for the CR servos makes them keep moving.
Christopher's speculation is that port 6 would be directed to position 0. If true, this would result in a full reverse for a CR servo, independent of the specific number programmed for port 1.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #9   Spotlight this post!  
Unread 29-11-2015, 12:56
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
Our bad, looks we misread what Christopher149 said.

Thanks to both of you for all of the help you have provided. Our servo now works.
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
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:27.

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