Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
36 of 46 tasks
virtuald opened this issue Apr 28, 2022 · 14 comments
Open
36 of 46 tasks

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

virtuald opened this issue Apr 28, 2022 · 14 comments
Labels

Comments

@virtuald
Copy link
Member

virtuald commented Apr 28, 2022

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
Copy link
Member Author

virtuald commented Jan 7, 2023

@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 wpilibsuite/frc-docs#2019, but obviously there's a lot more.

@BerkeSinanYetkin
Copy link
Contributor

BerkeSinanYetkin commented Jan 7, 2023

@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 wpilibsuite/frc-docs#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
Copy link
Member Author

virtuald commented Jan 7, 2023

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). :)

This was referenced Jan 31, 2023
auscompgeek pushed a commit that referenced this issue Feb 5, 2023
Update getting-started to be inline with upstream examples.

as per #49.
virtuald pushed a commit that referenced this issue Feb 6, 2023
Following #49

In `constants.py` file, the constants are grouped in different classes
(I don't know if this style will respect the [RobotPy's porting
guide](https://github.com/robotpy/examples/blob/main/CONTRIBUTING.md)).

In `robotcontainer.py`, I created a function named `moveArm`, to adapt
in a single line (two calls in `configureButtonBindings`).
@BerkeSinanYetkin
Copy link
Contributor

seems like we got everything rounded up

@jasondaming
Copy link
Collaborator

jasondaming commented Dec 1, 2023

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
Copy link
Member Author

virtuald commented Dec 2, 2023

A bunch of those examples are in the commands subdirectory.

@jasondaming
Copy link
Collaborator

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
Copy link
Member

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
Copy link
Member Author

virtuald commented Dec 3, 2023

Yes, the groupings suck. I like the organization idea in #74?

@jasondaming
Copy link
Collaborator

The list above has been updated

@jasondaming
Copy link
Collaborator

jasondaming commented Dec 21, 2023

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
  • SysIdRoutine

virtuald added a commit that referenced this issue Dec 29, 2023
Issue #49 

Add the
[SwerveBot](https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot)
example. I added a constants.py file to remove redundant imports, since
the original Java example doesn't have a Constants.java.

---------

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>
virtuald added a commit that referenced this issue Jan 1, 2024
This was referenced Jan 4, 2024
@Suave101
Copy link
Contributor

Suave101 commented Jan 8, 2024

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

virtuald added a commit that referenced this issue Jan 8, 2024
Addresses issue #49 [Axis Camera
Sample](https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/axiscamera)
necessity! Could someone with a rio test the Axis Camera code because, I
do not have a rio or an axis camera currently.

---------

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>
@jasondaming
Copy link
Collaborator

Should be updated now.

@Suave101
Copy link
Contributor

Suave101 commented Jan 8, 2024

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

virtuald pushed a commit that referenced this issue Jan 24, 2024
#49 
Added the ```StateSpaceArm``` and ```StateSpaceElevator``` examples from
Java.
I did some adaptations in ```StateSpaceFlywheel```, it's considering the
porting guide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants