It should be in feet
Thanks! Can l change the limelight’s angle besides changing it height?
Per What is field of view (FOV)? - the spec for the camera’s horizontal field of view usually refers to the whole angular range (extreme to extreme), while the diagram defines a_2 as being only half that (centerline to one extreme).
Based on that convention, I agree with your assessment - solve for a_1 such that a_2 numerically falls in the range (-20.5, 20.5) for the range of d that you want vision processing to work in.
Yeah, it’s the \theta_b slider
l guess the unit of Xd and Yd is meter. Is that the case?
Edit: I guess the post is ignored😂. Can you help me confirm the unit? @RisenFalcon It seems that the unit here is not feet?
There is nothing that says you can’t change the angle of the limelight. As long as you know the angle, you can adjust your code to interpret the visual information with that new angle.
On our robot this year, we mounted our limelight to our shooter hood. Our hood had a row of top rollers that we would tilt out of the way (such that they would not engage the ball) when we were shooting close shots and then we would tilt it back in place (such that they would engage the ball) when we were shooting from further away. The extra row of top rollers would change the exit angle of the ball to provide good sets of trajectories for different shooter wheel speeds for a range of distances. By mounting the limelight to this hood, the limelight camera would be pointed more upward for close in shots and would be pointed at a lower angle for longer distance shots.
We had two sets of shooting parameters (basically shooter speed) in our code, one for each setting of the hood/camera angle. The code would know whether the hood was in or out and select between these two sets of shooting parameters. This system worked great for us.
You can see our adjustable hood and attached limelight camera in action at around the 10 minute mark in the recent Behind the Bumpers interview that Tyler Olds did with our team at IRI. Between 10:00 and 10:10 in the video, you can see the last row of rollers flipping into position as the students move the target in closer and then out further away (there was some retroreflective tape on that grey cube that you can see them holding in some of the shots). The code also automatically switched the hood between the two settings as the target got close to the upper or lower edges of the field of view.
Thanks, l guess your hood is controlled by a solenoid and it only has two angles? However, as most teams which have used the hood this year, our hood can change its angle between a range. It seems that in this way, it is not wise to mount the Limelight on the hood since the Limelight’s vertical angle is always changing and l also need to plus the extra angle because of the thickness of the Limelight.
l am curious about what your shooting parameters are? Are they interpolation table? And you only have the shoot’s speed in this interpolation table?
That’s pretty good. So, does you hood only have two angle? @wgorgen
Yes, our hood has only 2 positions. This was done intentionally to simplify the design and make it as quick as possible to adjust the shooter. The hood is adjusted by two pneumatic cylinders (one on either side of the hood). Rather than a direct acting cylinder, we use a linkage between the main part of the shooter and the structure for that extra roller so that we could overcenter the linkage to “lock” the hood in place to avoid it deflecting due to recoil and compression of the ball. This is explained earlier in the video.
Once the hood position is set, the only parameter that is adjusted is the shooter speed. We had two interpolation tables (one for each setting of the hood).
The short range shot position was viable out to a little past the outer tape of the tarmac zones. The long range shot position was viable from the farthest points on the field in to a bit inside the outer tape of the tarmac zone such that there was some overlap between the two shooting ranges.
The point is that the limelight angle was also adjusted with the hood to help create a wider range of positions on the field where the limelight could see the goal and make targeting adjustments. This same concept could be used by either a) adjusting the angle of the limelight independently of the hood or b) mounting the limelight to a variable hood and then feeding the hood position into the code. By only having 2 positions of the limelight, it made the tuning of the shooter speed relatively easy, but again, if you wanted to mount it to a continuously variable hood and you know the angle of the hood (which you would need to know anyway if you had an adjustable hood) then you can feed that hood position and the associated viewing angle into the code to calculate your shooting parameters.
Looking back at the diagram that @gerthworm posted, a1 becomes a variable that is known because you know the hood position (or whatever other mechanism that the limelight is attached to that can adjust the viewing angle).
If your limelight can see the goal over the full range of shooting distances that your shooter is viable for, then you can obviously use a fixed limelight position. Many teams did that very successfully this year. As with most things FRC, there are many solutions to the problem.
That appears to be the older LL. Current home with LL2+ has different FOV
Sorry - link is right but didn’t land in the right place from here in CD
We just also wanted to use pneumatics to control the hood in the past. However, l just think an adjustable hood can make the shot more smooth so that the balls won’t bump out (l don’t know why l have this thought😂)
Yes, you are right. But l just want to minimize the possibility that if the hood’s encoder is broken on the field and that Limelight won’t work so we can’t shoot.
It seem like the consensus is that that reducing the backspin of the ball is the best way to reduce the tendency for bounce out. This is why we added the top rollers to our shooter. Many teams were able to be successful without top rollers. Again - many different possible solutions to the same problem.
I understand your concern with the encoder being broken. However, in this case, you probably cannot reliably use the adjustable hood, so you would probably manually over-ride the hood and drive it to one of the two end points so that you had a known shooting angle. If you did this, you could also use a fixed interpolation table for this hood position and associated limelight viewing angle. Since the code knows that the drivers manually over-rode the hood position, it would also know to use the associated lookup table for this endstop hood position. You could easily make 2 manual over-ride positions (one at each endstop of the hood and have two lookup tables for these manual modes.
Thanks for your advice! However, l am curious about if the hood’s ecnoder is broken, it means l can’t control the hood manually if l only use position control (liek MotionMagic) to control my hood. If l have an alternative to use velocity or voltage to control the hood, it seems that l won’t know the hood’s position and it is also hard for the code to know which lookup table it should use. l think the two end points you have mentioned is a problem of the shooter’s mechanism and these two end points shouldn’t be the minimal or the maximal angle of the hood. Because if so, it would be hard to shoot l think.
If ever concerned about a critical component failing, have a backup. We added a cheap IR distance sensor to our hood with the IR shooting off a fairly small target plate. It actually was pretty accurate and was essentially maintenance-free compared to trying to align the rotary encoder on a connecting shaft.
And we too had terrible performance in 2022 with shots bouncing out using one powered flywheel. We added a second powered flywheel and it gave amazingly better trajectory and spin.
Would you mind providing a link?
I agree. Making the Limelight angle a variable adds complexity to your design that introduces potential new problems and failure modes.
However, one thing you might want to consider is using the limelight itself to provide backup to the encoder for the position of the hood. For example, you can measure the vertical position of the hub targets in your field of view. You can also measure the width of the hub target array (width of the bounding box). The width could be used to give you a pretty good estimate of the distance you are from the hub (the further away you are the smaller the target appears). Then, once you have an estimate of the distance (d in the diagram above) you can determine a2 based on where the target is vertically in the field of view and then from a2 and d you can calculate a1. This would probably not be as accurate as an encoder, but might be a suitably accurate backup system to use in the event that the encoder breaks to allow you to keep shooting.
We mounted our LL on the moveable hood. The hood was articulated about 0 - 40 degrees through 3D printed herringbone gears. The code simply adjusted the hood until the Y of the camera was zeroed on the target. No trig needed. We were able to shoot from tarmac although back to alliance wall.
LL is not shown but mounts to the 4 holes on the sheet metal plate at the top right of the image.
Were you able to use the same shooter speed for all distances once the LL was zeroed in on the target? That would be pretty awesome if it worked out that way.
The shooter rpm was adjusted based upon the resulting hood angle. We used a linear equation. Nothing fancy.
I remember when these were about $1; sorry - not cheap anymore; I see them for as much as $15.
Pick the range you need. We keep a supply of 2y0a21 as all-around generally useful range but buy the correct range if you know it. Beware they measure well below their marked minimum but it’s ambiguous - you must assure you are on the correct side of the peak output voltage. That is 5 cm may register about the same as 12 cm (wild guess but you can see what I mean from the datasheet).
I need to hire @gerthworm to do my graphic arts. Here are the sketches I made three seasons ago trying to explain to the students what I meant. We used a LifeCam HD-3000 camera turned 90 degrees to give us the wide range in the vertical direction instead of the horizontal direction.
And in the end this always works and is a favorite of mine: