The road to getting full path following ready will probably have multiple steps involved, and we can probably do development on these tasks in parallel if we plan them out well. I'm going to just write a list of things I can think of that we'll need to work on, then you guys can decide who wants to do what.
Firstly, we should revisit any research that we've done and collect all of our resources in one place. The first task is therefore:
[ ] Collect links to libraries, code samples, blog posts, chief delphi, or other resources that we know about and paste them in a comment-reply to this issue. Give a description of what you'll find at each link. We'll be using the "PathPlanner" library, whose homepage is here: https://pathplanner.dev/home.html
Don't spend any more than 5 minutes on this
From my understanding, the auto-mode path planner workflow looks like this:
Drive a defined path from A to B
Execute a Command
Drive a defined path from B to C
Execute a Command
etc.
As important as it is to be able to follow a path, it is just as important to have the correct Auto commands ready to execute when we reach the end of each path segment. I'm going to write a "specification" for a handful of commands I think we need to have:
[ ] Create an AutoAimPickupNote command with the following behavior:
[ ] Auto-aim at the note using the camera
[ ] Drive (slowly) toward the note until either:
A timeout occurs, or
We detect that we've picked up the note via our sensor
[ ] Create an AutoAimShootNote command with the following behavior:
[ ] Auto-aim at the speaker using the camera
[ ] Rev-up the shooter. Wait for long enough to reach the correct speed
[ ] Shoot the note by feeding with the indexer
Additionally, you'll need to integrate with the PathPlanner library to make sure it is capable of executing your Auto commands.
[ ] Create a dummy "auto path" that does no path movement, but executes one of your Commands, e.g. AutoAimPickupNote
Next, we need to get into actual path following. I don't know a lot about how this works, so somebody should volunteer to do the research and try to figure out how we make this happen. What I do know is how we can go about testing it, which is with small, simple test cases. Somebody should use the PathPlanner tool to create the following test paths for us to test with:
[ ] Create a straight-line-distance command that moves the robot in a perfect line a distance of 1 meter. The goals of this test are:
Assert that the robot drives in a pretty straight line without drift
Assert that the robot drives the correct distance that we want, plus or minus some small variance
[ ] Create an arc-and-return command that moves the robot in the following way:
The robot should not rotate relative to the field
The robot should strafe (move x and y) along a curve shaped like a quarter-circle
If we were drawing on a clock-face, the robot should travel from 12 o'clock to 3 o'clock, then return to 12 o'clock
We want to assert that the robot moves smoothly along this curve and returns to the exact spot it started in (with some variance)
The road to getting full path following ready will probably have multiple steps involved, and we can probably do development on these tasks in parallel if we plan them out well. I'm going to just write a list of things I can think of that we'll need to work on, then you guys can decide who wants to do what.
Firstly, we should revisit any research that we've done and collect all of our resources in one place. The first task is therefore:
From my understanding, the auto-mode path planner workflow looks like this:
As important as it is to be able to follow a path, it is just as important to have the correct Auto commands ready to execute when we reach the end of each path segment. I'm going to write a "specification" for a handful of commands I think we need to have:
[ ] Create an
AutoAimPickupNote
command with the following behavior:[ ] Create an
AutoAimShootNote
command with the following behavior:Additionally, you'll need to integrate with the PathPlanner library to make sure it is capable of executing your Auto commands.
AutoAimPickupNote
Next, we need to get into actual path following. I don't know a lot about how this works, so somebody should volunteer to do the research and try to figure out how we make this happen. What I do know is how we can go about testing it, which is with small, simple test cases. Somebody should use the PathPlanner tool to create the following test paths for us to test with:
[ ] Create a
straight-line-distance
command that moves the robot in a perfect line a distance of 1 meter. The goals of this test are:[ ] Create an
arc-and-return
command that moves the robot in the following way: