View unanswered posts | View active topics It is currently Mon Dec 22, 2014 3:49 am






Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Using the IR Beacon/Seeker 
Author Message
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Using the IR Beacon/Seeker
Hi! I have another quick question. Has anyone successfully used the IR reliably from the parking zone this year? The problem is we only have one beacon to use at home to test and have no idea to go about it. We tried using the zones to find out what position it was in but it wasn't reliable at all and at the competition never worked. We want to be able to do it with a seeker and 1 beacon at home but the problem with the zones is it would pick up signal from both beacons at once at the competition when we tested it. Is there any way to do it reliably at home and at the competition and be able to test it? We really want to be able to knock down the kickstand consistently at the competition. But I can't think of any way of doing it with only one beacon. We also have Xanders IR driver but have no idea how to use all 5 zones without just comparing the numbers to ones when the position is in 1,2 or 3. I think we know how to code it but just need some ideas on how to find the position reliably. Sorry if the post is badly worded. I had to type this up in a hurry. Thanks!


Wed Dec 17, 2014 11:40 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
First, have you read this thread?
viewtopic.php?f=52&t=2780&hilit=IR+Seeker+inaccuracy
Our team has planned to have an autonomous strategy to seek out the IR beacon but we haven't gotten around to do that yet and is going to try this out in the next week or so but in theory, if you park your robot in the right position, you should only see one beacon. Since we are using two IR seekers to triangulate, we could get pinpoint accuracy. In a couple of weeks, we will see how well we do on that. But based on our past performance, we were pretty accurate in seeking the IR (in the Ring It Up! games).
https://www.youtube.com/user/Frc492


Wed Dec 17, 2014 3:07 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Yeah I had read that thread. The problem is we have trouble getting into the right exact position to take the reading and it varies where the robot ends up in autonomous. And so at the competition it wasn't reliable at all and was reading centerpiece position 3 almost every time for some reason. We couldn't keep going until we see 2 or 8 like you did because on its way it could see both IR beacons and the one spot where each position gives a different reading is very hard to get to and you have to be exactly right or it does not work. So we can't think of any way of approaching this.


Wed Dec 17, 2014 6:27 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Also what does triangulating do to help you? You can use a PID to go to the beacon but in this years challenge you don't want to be at the beacon, you just want to know centerpiece position


Thu Dec 18, 2014 9:24 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
No, you need to be at the IR beacon if you want to score the center goal in autonomous. That requires precision. So what is your goal in finding the center piece position? Just to locate where to knock down the stick?


Thu Dec 18, 2014 10:01 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Yeah what we were planning to do would be to find position using ir from one spot then using multiple different autonomous for each position.


Thu Dec 18, 2014 10:27 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
We can't really use triangulation currently because we don't have 2 ir sensors anyway


Thu Dec 18, 2014 11:44 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
BTW, our team met tonight and we tested the IR beacon with our IR seekers. On position 1, our 2 IR seekers read 9 and 3. On position 2, the two IR seekers read 8 and 3 and on position 3 they read 7 and 3. Also, if the IR beacon is on the opponent's side of the center piece, all 3 positions read 0 and 0. So it means it will definitely work. The next step is to write the code to use these readings to approach the IR beacon and try to score. This is still challenging though. From these readings, it means you could use one IR seeker and still be able to differentiate the 3 positions (i.e. the one that reads 9, 8 and 7) when parked. However, one seeker may be slightly tougher to get to the beacon accurately.


Fri Dec 19, 2014 1:58 am
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Where were you taking the readings? We tested it from the parking zone and held the beacon on the opponents side and it could defenatly see ot


Fri Dec 19, 2014 9:03 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
akash329dsouza wrote:
Where were you taking the readings? We tested it from the parking zone and held the beacon on the opponents side and it could defenatly see ot

You park on the extreme left side of the parking zone.


Attachments:
ParkPos.JPG
ParkPos.JPG [ 59.17 KiB | Viewed 90 times ]
Fri Dec 19, 2014 3:06 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Ok thanks, one more question, is it possible to go down the ramp and then back up with enough power to move backward but not enough to go up the ramp? As in is there a way to turn off built in PID control in the middle of the program and turn it back on?


Fri Dec 19, 2014 4:41 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
akash329dsouza wrote:
Ok thanks, one more question, is it possible to go down the ramp and then back up with enough power to move backward but not enough to go up the ramp? As in is there a way to turn off built in PID control in the middle of the program and turn it back on?

I don't think I understand your scenario and your question. It is possible to go down the ramp and then back up. If you want to back up but not going back up the ramp, you just don't go too far back. Regarding turning PID control on and off, it depends on your PID control code. Usually PID control involves setting a target, go into a loop comparing the current position against the target then calculate the motor power according to the distance to target. Are you saying you want to "abort" PID control before it gets to target? If that's the case, sure, you just break out of the loop. I guess I don't really understand your question.


Fri Dec 19, 2014 5:05 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Yeah it was badly worded. So basically what I'm trying to ask is that we are using the normal PID control included with robotc. So we had a idea to go down the ramp and then slowly back up with enough power to go backwards but not enough power to drive the robot up the ramp. This way we could have a accurate starting point off the ramp in Autonomous. Our problem is there is no way to turn off the built in PID control. So even if we set the robot to 1 Speed it will keep going up the ramp We were wondering if there is a way to turn off the RobotC's built in PID control so we could set power instead of Speed so that it wouldn't be able to make it up the ramp. In simpler terms we're asking is there any way to turn off built in PID control halfway through the program and then turn it back on?


Fri Dec 19, 2014 5:42 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Using the IR Beacon/Seeker
akash329dsouza wrote:
Yeah it was badly worded. So basically what I'm trying to ask is that we are using the normal PID control included with robotc. So we had a idea to go down the ramp and then slowly back up with enough power to go backwards but not enough power to drive the robot up the ramp. This way we could have a accurate starting point off the ramp in Autonomous. Our problem is there is no way to turn off the built in PID control. So even if we set the robot to 1 Speed it will keep going up the ramp We were wondering if there is a way to turn off the RobotC's built in PID control so we could set power instead of Speed so that it wouldn't be able to make it up the ramp. In simpler terms we're asking is there any way to turn off built in PID control halfway through the program and then turn it back on?

RobotC's built-in PID control is per motor. You can turn PID control off for each motor in the "Motors and Sensors setup" dialog window. I guess I am still not completely understanding what you want. Are you saying you just want to come down the ramp but stop with your back at the edge of the ramp so you know exactly where you are. You want to back up because the momentum of the robot rolling down the ramp will usually go way beyond the ramp. Am I understanding you correctly?
If so, even with RobotC's PID control turned ON in the "Motors and Sensors setup", you don't have to use PID when you drive down the ramp. You can always just say:
motor[left] = 50;
motor[right] = 50;
This won't engage PID control.


Fri Dec 19, 2014 5:51 pm
Profile
Rookie

Joined: Tue Dec 16, 2014 10:25 am
Posts: 29
Post Re: Using the IR Beacon/Seeker
Yes thats correct. We have PID enabled in the Motor&Sensor Setup. But the motor[MotorA] command uses PID control we think. We use that command and even on 1 power it will drive up the ramp with a 30 pound robot


Fri Dec 19, 2014 6:10 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.