chopshop-166 / frc-2023

FRC Team 166's source code for the 2023 game, Charged Up
MIT License
2 stars 0 forks source link

Auto creation work #41

Open Hsaunders603 opened 1 year ago

Hsaunders603 commented 1 year ago

Autos to make:

TimB-87 commented 1 year ago

We're back!!

New Project: Auto that drives a swerve drive-base in a square (between four points drawing out a square)

Potential ways to do it:

msoucy commented 1 year ago

Test work is done in #75

TimB-87 commented 1 year ago

Notes/Thoughts

(After testing the PathPlanner square auto on 11/14 and conducting research into the auto of other teams and our own from 2022)

Waypoints, waypoints, WAYPOINTS

⬆️⬆️⬆️⬆️⬆️⬆️ *Pretty sure this is what we've been missing


In contrast to PathPlanner, there is PathWeaver, which some teams use, it seems like PathPlanner will work just fine if not better though.


Team 1678 seems to use PathWeaver, along with using modes and actions rather than sequences.


Team 4499 has a pathing tool, though I'm not sure how exactly it works. It seems like they set it up to click on their computer screen and layout a path.


Team 6328 has a lot, but they use waypoints along with Pose2d, so it could be worth more looking into


In the past (2022), we have used PathPlanner and waypoints and it seems to have worked with PathPlanner.loadPath, we might not need Pose2d for the auto paths

Overall, lets see about doing exactly what we did in 2022 and use waypoints along with PathPlanner. We might still be able to use Pose2d though, it would just require a deeper look into 6328's code.

TimB-87 commented 1 year ago

Notes / Updates

New Findings: Poses are very similar to waypoints, and they run on a coordinate system. Last year, we did not get the correct coordinate system and the robot was trying to go to the coordinates we plugged in, but those were the wrong coordinates -- Poses are what we need

Meeting of 11/16/23

End of meeting, we figured out how exactly to use the coordinates for poses. Using PathPlanner with Poses, we have an auto that will have the robot drive in a

https://github.com/chopshop-166/frc-2023/assets/119461590/6ec8c4bc-5320-434c-93a5-8bbfd463876e

https://github.com/chopshop-166/frc-2023/assets/119461590/a1e2481d-c400-4d21-baaa-600496dc57d3

Both of these autos are quite shaky, though I believe it is just because of the drive function. At the current moment, PathPlanner uses the drive function to drive the robot from one place to another. The robot speeds up just enough and then slows down to stop at a point.

Meeting of 11/21/23

First things first, we removed the wait commands in the square and triangle autos to speed them up. They worked great without the wait commands, though the robot sometimes goes a little past where it is supposed to stop and ends up thinking it's at a different coordinate then it is

We created a line auto from one side of the carpet straight to the other to test how fast the robot goes. We came to the conclusion that the further the robot drives in auto, the faster it goes to get there because it has more time to speed up.

Next, we played with rotation a bit. It seems that from one point at rotation 0 degrees, to another point at rotation 180 degrees, the robot will turn on the way and end up fully turned however much it was told to at the point.

https://github.com/chopshop-166/frc-2023/assets/119461590/31deab3b-9ed6-4673-92c9-c32b6486cc66

With this, Layth suggested a "game" where the robot would drive straight, drive to the right while turning that way, and knock one of the carpet rollers off of the carpet, then return to the starting point. This was very successful, so we came up with an auto that would do it twice, affectionately labeled the "Knockout" auto.

https://github.com/chopshop-166/frc-2023/assets/119461590/8df211a3-9c56-4e19-8779-e33cdc280fcc

Main Problems

For now, the goal is accuracy, then we will focus on speed

I am having a lot of fun with auto, so we will be doing a meeting on 11/22/23 to hopefully fix some of the main problems and create an auto involving picking up and transporting a cube.

TimB-87 commented 1 year ago

Notes / Updates

Meeting of 11/22/23

Unfortunately, some weird difficulties came up, and the drive was being very terrible for about 20-30 minutes. Luckily, it randomly went away.

Tonight, we mainly worked on

  1. A better way to reset the robot's coordinates.

    • I worked on trying to make a function for a bit, and I could not figure it out. Though, I found out that just resetting the robot code on the drive station laptop does the trick and only takes about 5 seconds!
  2. An auto that picks up a cube, returns to the "community" and then deposits the cube

https://github.com/chopshop-166/frc-2023/assets/119461590/57b4c0af-2dd7-4df7-b08c-1dda5e9c0349

Next Steps (in order)

TimB-87 commented 11 months ago

Notes / Updates 12/15/23

Above is the makeshift auto. It is our auto to fall back on if everything goes wrong, but hopefully we'll never need to use it.

We moved on to working on PathPlanner 2023 for the past couple weeks, as it seemed that would speed things up quite a bit. However, we did not get to testing it as we have not finished yet. Then, the code was updated for 2024.

Moving on to PathPlanner 2024

We have decided it is in the best interest to just move on to PathPlanner 2024 and figure it out as soon as possible. We've experimented with writing PathPlanner 2023 sufficiently enough that we are familiar with the system. However, PathPlanner 2024 takes a lot of PP 2023 and puts it in the library, making our lives a lot easier.

We hope to have running autos with PP 2024 before the build season.

*Note: in terms of vision, we will be focusing on auto first, and after that my hope is to have a simplistic vision working on the robot in the 2024 season.