robotpy / examples

Repository of RobotPy example projects
45 stars 53 forks source link

Add necessary examples to be linked from frc-docs #49

Open virtuald opened 2 years ago

virtuald commented 2 years ago

If RobotPy is to be included in frc-docs (see initial PR), then we need to have existing working examples that can be linked to from the documentation that match the WPILib examples closely. By running the following on frc-docs:

grep -r --no-filename remoteliteralinclude * | grep java | sort | uniq

I get the following examples required:

Here are additional examples that need to be created too:

I tried using ChatGPT to do automated translation of examples, and it's pretty good! Here's a prompt I started with that I got reasonable results with:

RobotPy code translator will translate code from WPILib Java to RobotPy python. The output python code is semantically the same as the original java code, and has identical comments. The output python code is complete and contains all of the code present in the original Java code. Here is the input code for the translator, output only the output code:

virtuald commented 1 year ago

@mrguisamuel and @BerkeSinanYetkin (or anyone else) if you're interested, now that we have a lot of these examples someone needs to add them to frc-docs? I did one of them at https://github.com/wpilibsuite/frc-docs/pull/2019, but obviously there's a lot more.

BerkeSinanYetkin commented 1 year ago

@mrguisamuel and @BerkeSinanYetkin (or anyone else) if you're interested, now that we have a lot of these examples someone needs to add them to frc-docs? I did one of them at https://github.com/wpilibsuite/frc-docs/pull/2019, but obviously there's a lot more.

Can't we complete all of them and add them through a grand PR? In my timezone it is already kickoff day, examples we haven't done don't seem like a whole lot of work. Maybe we can divide the workload and finish all of them after kickoff?

Also, happy kickoff day everyone!

virtuald commented 1 year ago

In my timezone it's almost 1am, and I still have a bunch of stuff left for the RobotPy 2023 release (mostly documentation at this point). :)

BerkeSinanYetkin commented 1 year ago

seems like we got everything rounded up

jasondaming commented 11 months ago

Still need all of these, here is the PR to add them. I noticed a few were on the list above as done but I couldn't find them in the directory: SwerveBot Axis Camera Sample AprilTagsVision Gears Bot MecanumControllerCommand SwerveControllerCommand StateSpaceFlywheelSysId StateSpaceElevator StateSpaceArm StateSpaceDriveSimulation SimpleDifferentialDriveSimulation DMA

virtuald commented 11 months ago

A bunch of those examples are in the commands subdirectory.

jasondaming commented 11 months ago

That does not seem at all intuitive. I think that should be fixed. There are many other examples that could be grouped but aren't.

auscompgeek commented 11 months ago

They're grouped by the commands dependency. I presume you mean we should group our CV examples (since we don't install OpenCV things on the robot by default)?

virtuald commented 11 months ago

Yes, the groupings suck. I like the organization idea in https://github.com/robotpy/examples/pull/74?

jasondaming commented 11 months ago

The list above has been updated

jasondaming commented 10 months ago

Still need all of these, here is the PR to add them. I noticed a few were on the list above as done but I couldn't find them in the directory:

Suave101 commented 10 months ago

Could state space elevator be checked off please? I accidentally ported the example when it was already written because I just looked at the list and my clone of the repo hadn't updated

jasondaming commented 10 months ago

Should be updated now.

Suave101 commented 10 months ago

The XRP Reference might need to be ported for the vscode-wpilib reference example: https://docs.wpilib.org/en/stable/docs/xrp-robot/programming-xrp.html

jasondaming commented 2 months ago

Additional examples that need to be ported. I saw a few in PRs.