-
Notifications
You must be signed in to change notification settings - Fork 60
Camera Implementation [AARD-1925]
#1250
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
base: dev
Are you sure you want to change the base?
Conversation
[AARD-1925]
[AARD-1925]
Chorus detected one or more security issues with this pull request. See the Checks tab for more details. As a reminder, please follow the secure code review process as part of the Secure Coding Non-Negotiable requirement. |
Can't seem to get the stream to show up |
6bebe2d
to
1981929
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you been able to get this to work with someone else's computer?
I'm able to reproduce the solution on both work and personal laptop. Alexey said he will also test on his laptop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexD717 what process did you undergo to make this work? |
I was having a lot of build issues on macos, so today I tried doing it on windows. I just installed Java 17 and wpilib. Ran the required ./gradlew build and other commands and it just showed up. |
5a2d9a1
to
ae8e477
Compare
Task
Implement a camera "sensor" for code sim that sends a video stream to the robot that can be processed for vision (the equivalent of using a usb webcam).
Jira Ticket
Symptom
Part of the quest to make Code Simulation for Synthesis more robust. This PR is also a building block for the Coprocessor Implementation Ticket.
Solution
The solution implements a virtual camera sensor by rendering the 3D scene from the robot's perspective, capturing real-time video frames, and streaming them to the robot simulation via WebSocket communication. The rendered frames are processed and integrated with WPILib's standard CameraServer infrastructure, making the video stream automatically available in dashboard applications like Shuffleboard and accessible to robot code for vision processing using standard OpenCV and WPILib APIs.
Verification
To test, replace these two functions in
Robot.java
inJavaSample
Before merging, ensure the following criteria are met: