How to shoot on the fly?

Hey guys, my team is currently trying to implement shooting on the fly but I have no idea how to do it. Any suggestions, resources, ideas that might help me? Thanks in advance!

By “shooting on the fly” do you mean shooting while moving/driving?

Well this could be a programming thing or something the driver does or both, the real question is do you have swerve or a turret? If you don’t have either well I don’t know how much shooting on the fly will help. If you have a turret then its entirely programming, I don’t have experience working with turrets nor does my team to advice you on that, I’m sure others definitely have resources on that. If you’re on swerve this could be a programming thing, where like with a turret I’d assume you’d use pose estimation and some things to attempt to predict the pose the shooter will be shooting at to try and predict your location so you can shoot while move. But I know programming at a rudimentary level so I can’t help with that. However, I can say in the WCP competitive concept reveal video of this year (https://youtu.be/TKs_UDj4Ej0?t=53 like 00:53 is a good place to start), they shoot on the move where it doesn’t seem like they use vision software. So you could for the simplest form of shoot while moving have drivers do most of the work. You could have a button to slow down the drivebase for more control but so you can still move (if you want), use polar locking I think its called to be straight on to the speaker (if you want) and have the drivers shoot at a certain point the path they drive. This is the easiest way to shoot while moving without heavy programming stuff. You could also use whatever autoaiming and slow down your drivebase to probably be able to shoot while moving. But I think there are simple and intermediate ways to shoot while move with some programming accommodations and driver practice which I’d recommend unless you have a large programming team and a lot of time before competition, if you want to get more complex then I have less direct advice but you could definitely scour conversations that have already been on here. If you need a visual of what I was talking about or a better explanation of something I can clarify.

Either way it’s purely software. Even if you don’t have a turret, and just a omnidirectional drive, the entire drivetrain can act as a “virtual turret” so to speak, and rotate the robot such that it is locked on target, just as a turret might do.

We’ve done this in our codebase.

2 Likes

Yeah the method is similar for turret and swerve, and a drive train that can turn can auto aim, swerve can just do it while moving (I might’ve been confusing but I said “where like with a turret” meaning the methods are somewhat similar in terms of prediction), but drivers can make up for where their programming capabilities potentially couldn’t, especially with some quality of life programming that is simpler than shooting on the fly.

Is your code public? We’d love to take a look

Yes it is.

1 Like

I think it would beneficial to conceive a method that does not rely on Pose.

A lot of teams start by learning the 2D method of aiming directly at a specific tag and doing a P loop by (tx * kP) for simple servoing to the target.

I would assume that simple method could be enhanced by a method that takes velocityX direction and distance into account to calculate a “shot lag” factor to add/subtract in to the tx.

*Corrected to say shot lag instead of lead

3 Likes

You actually want to “lag” the target so to speak, so that you cancel out the motion of the robot imparted onto the game piece. As in shoot “behind” where you normally would based on your current motion.

2 Likes

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