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

Full-Resolution Camera Downloads #71

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Geeoon
Copy link
Member

@Geeoon Geeoon commented Jul 18, 2024

Currently, clicking the download button will just download the client-side H264 compressed stream, which is fairly low quality. This PR adds the ability to request full-resolution jpg images from the rover, and if the camera is available, a base64 encoded image will be sent to mission control at a much higher resolution than the normal client-side video stream.

Related with huskyroboticsteam/Resurgence#331

@Geeoon Geeoon force-pushed the full-resolution-camera-download branch from 4880522 to 470151e Compare July 18, 2024 06:30
Copy link
Member

@abhaybd abhaybd left a comment

Choose a reason for hiding this comment

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

Overall good stuff, some comments

Comment on lines 95 to 96
} else if (message.type === "cameraFrameReport") {
if (message.data !== "") {
Copy link
Member

Choose a reason for hiding this comment

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

Should be combined into else if (message.type === ... && message.data === ...)

document.body.appendChild(link);
link.click();
document.body.removeChild(link);

Copy link
Member

Choose a reason for hiding this comment

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

Trailing empty line

README.md Outdated
{
type: "cameraFrameReport",
camera: string,
data: string | null
Copy link
Member

Choose a reason for hiding this comment

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

Under what circumstances would data be null? If there's no data, is it simpler to just not send back a camera frame report?

Copy link
Member

@abhaybd abhaybd left a comment

Choose a reason for hiding this comment

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

Very minor change needed. Besides that, this looks good and I'll test and merge this when I'm back in town in a couple weeks.

README.md Outdated
@@ -380,6 +380,38 @@ Sent from the rover server to inform Mission Control of a single frame of a came
- `camera` - the name of the camera: `mast|hand|wrist`
- `data` - the raw h264 frame data, or `null` if no data is available

## Camera Frame Request
### Description
Sent from Mission Control to instruct the rover server to send a Camera Frame Report.
Copy link
Member

Choose a reason for hiding this comment

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

Super minor, but mention how this works with the report. I.e. "If camera specifies a valid camera stream, the rover will respond with a camera frame report containing the latest frame from that camera."

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.

2 participants