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 AprilTagVision example #100

Closed
wants to merge 10 commits into from

Conversation

Suave101
Copy link
Contributor

@Suave101 Suave101 commented Jan 2, 2024

A task within issue #49. This is a port of the Java AprilTagsVision example to Python

- Added !/usr/bin/env python3 to the beginning of the file
- Added License to beginning of file
@Suave101
Copy link
Contributor Author

Suave101 commented Jan 2, 2024

This is a Draft pull request for a couple of reasons:

  1. This is my first pull request and I am not sure if all the formatting is perfect
  2. I have tested this code but, I am not confident in my test due to the following quote from the robotpy documentation:

"The child process will NOT be launched when running the robot code in simulation or unit testing mode", RobotPy Documentation

AprilTagsVision/Robot.py Outdated Show resolved Hide resolved
AprilTagsVision/Robot.py Outdated Show resolved Hide resolved
AprilTagsVision/vision.py Outdated Show resolved Hide resolved
@Suave101
Copy link
Contributor Author

Suave101 commented Jan 2, 2024

A test of the vision.py file has been conducted and bugs were found. The bugs were subsequently fixed and code reformatted into black. The robot.py file has been changed to lowercase and the comment at the beginning of the robot.py has been changed to a docstring!

@Suave101 Suave101 requested a review from virtuald January 2, 2024 08:34
@Suave101
Copy link
Contributor Author

Suave101 commented Jan 2, 2024

The following workflow does not allow the first line of vision.py to be #!/usr/bin/env python3:
https://github.com/robotpy/examples/actions/runs/7383683670/job/20099069304
The following commit changed the vision.py to meet the conventions of the workflow:
75b30b7

@Suave101
Copy link
Contributor Author

Suave101 commented Jan 4, 2024

Could someone please help me fix what is causing the failure in checks?

@auscompgeek
Copy link
Member

The new robot is missing from run_tests.sh.

@Suave101 Suave101 closed this Jan 4, 2024
@Suave101 Suave101 deleted the add-AprilTagVision-example branch January 4, 2024 05:38
@Suave101 Suave101 restored the add-AprilTagVision-example branch January 4, 2024 05:39
@Suave101 Suave101 reopened this Jan 4, 2024
@Suave101 Suave101 marked this pull request as ready for review January 4, 2024 06:00
import wpilib.cameraserver


"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a docstring – it's not the first statement of a module/class/function.

@virtuald
Copy link
Member

virtuald commented Jan 6, 2024

Please rebase and remove wpilib.run (see #106)

@Suave101 Suave101 closed this Jan 8, 2024
@Suave101
Copy link
Contributor Author

Suave101 commented Jan 8, 2024

Closing for Rebase

@virtuald
Copy link
Member

virtuald commented Jan 8, 2024

When you rebase, you can force push your branch that way you don't have to recreate the PR.

virtuald added a commit that referenced this pull request Jan 8, 2024
This is the rebased and updated 2024 version of #100
The following image is the test I ran of the vision.py file:

![image](https://github.com/robotpy/examples/assets/57422635/52de891b-efba-4cd6-88d7-d5a6c137336e)

---------

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>
@Suave101 Suave101 deleted the add-AprilTagVision-example branch January 8, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants