How to make the limelight control an adjustable hood properly?

So this is my team’s second year using the limelight and our first year with an adjustable shooter. Last year we simply used the drivetrain to do the aiming, but this year we want to be able to aim by tilting the shooter and/or varying shooter wheel speeds.
I considered making a few different pipelines to shoot from various areas of the field, and use the drivetrain to aim and just put the shooter at a different angle and different speed for each area. Is this the right way to do this? Or should we develop a way to change speed and angle instead of driving forward and back? If so, how do we do this?

Thanks!

You could find what speed and angle values work for different ty limelight values and build a table. You could then interpolate between the two bounding values in the table. That would avoid driving. This assumes you can adjust your shooter angle and or speed quickly enough. We are looking at just varying angle if at all possible

Also if you are outside of known bounded ty values you could drive forward or back.

3 Likes

Adding on to Bmongar, I suggest using an InterpolatingTreeMap for this (original 254 code)

2 Likes

254’s interpolatingTreeMap is excellent code. In case it’s a bit overwhelming, our team has more simple implementation that’s all in one file and only works on doubles.

4 Likes

Thanks! I’ll look into using this.

Update: I have added this to the official WPI library so it should be available maybe next year

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.