I had an idea to use the accelerometer reading in the Inertial Sensor to immedatiely execute code like grabbing a goal. It would probably do this by reading the velocity and executing actions when it hits a certain threshold (eg. when it hits the goal). For example, when the velocity goes down (should be derivative of the accelerometer reading), it would proceed. I was just wondering if anyone had tried this, and if not, what other people use for an effective goal rush. Thanks for reading!
A limit switch is a far simpler way to accomplish what seems to be the same task. My robot uses a mechanical onetime system as a deploy and grabs the goal.
What you mentioned would work but seems needlessly complex. It could be fun to get it to work though.
I feel like using a limit switch would be much more effective than calculating when you hit a goal in the goal rush. I have however found many teams (including my own) using the inertial sensor to detect if the robot is in a tug of war over the goal, and makes it so the robot just pulls back and never releases the goal.
Edit: dang @seenSeal posted that like 2 seconds before I did
I wouldn’t recommend doing this, I’d definitely use rotations or a limit switch, but since I’m here you’d actually be taking the integral of the accelerometer reading in order to calculate velocity.