Skip to content

Filing patch#45

Open
Crusific wants to merge 2 commits into
mainfrom
filing-patch
Open

Filing patch#45
Crusific wants to merge 2 commits into
mainfrom
filing-patch

Conversation

@Crusific
Copy link
Copy Markdown
Contributor

This PR introduces a complete RGBD filing system for the Emu UAV ground station software, enabling professional storage, browsing, and measurement of OAKD camera images with integrated distance capabilities. The implementation transforms the existing layout into a 4-section interface optimized for UAV operations.

Copy link
Copy Markdown
Contributor

@fadilm777 fadilm777 left a comment

Choose a reason for hiding this comment

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

@Crusific Shoot me a text if you need some more clarity on any of my comments, I'd be happy to hop on a call as well. We can even keep the conversation going within this PR if you wish to resolve the comments.

@kaiden-keane assist me with this review, I think I've addressed all my concerns but I'd like some feedback on whether you agree with my comments and/or if you have any of your own.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These changes do not belong in this PR. This seems like a refactoring change to me. Separate PR must be created to address these issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is more than the PR comment describes.

Comment thread src/App.jsx
Comment on lines -160 to 207
function UAVStatusComponent({ label = "", value }) {
function UAVStatus({ status }) {
return (
<div className="flex justify-between items-center space-x-2">
<label className="basis-1/2">{label}</label>
<div className="basis-1/2 rounded-md border px-2 py-2 font-mono text-sm">
{value}
</div>
</div>
<Card className="w-full h-full">
<CardHeader className="pb-3">
<CardTitle className="text-sm">UAV</CardTitle>
</CardHeader>
<CardContent className="space-y-2">
<div className="flex justify-between text-xs">
<span>Connected</span>
<span className="font-mono">{status.connection}</span>
</div>
<div className="flex justify-between text-xs">
<span>Mode</span>
<span className="font-mono">{status.mode}</span>
</div>
<div className="flex justify-between text-xs">
<span>Images</span>
<span className="font-mono">{status.imageCount}</span>
</div>
<div className="flex justify-between text-xs">
<span>Time</span>
<span className="font-mono">{status.timeSinceMessage}s</span>
</div>
</CardContent>
</Card>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why change this function at all? This PR has no concern with it. If refactoring, should go in another PR

Comment on lines +47 to +52
// Save depth image
const depthPath = path.join(imageDir, "depth.png");
if (depthBuffer) {
fs.writeFileSync(depthPath, depthBuffer);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't save depth map, the frontend doesn't need it. We only need coordinates of targets. Sending depth map from drone and saving it uses a lot of bandwidth that we can skip on.

Comment thread src/App.jsx
Comment on lines +132 to +135
<FilingSystemLayout
selectedImage={selectedImage}
onSelectImage={setSelectedImage}
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confusing design... FilingSystemLayout is responsible for running onSelectImage when an image is selected inside it, but it also needs to know which image is currently selected?

Why not have a state variable inside FilingSystemLayout that keeps track of the selected image if it is responsible for selecting the images?

Comment thread src/App.jsx
Comment on lines -173 to -185
<>
<Card className="w-full h-full shadow-2xl">
<CardHeader>
<CardTitle>UAV</CardTitle>
</CardHeader>
<CardContent className="space-y-2">
<UAVStatusComponent label="Connected" value={status.connection} />
<UAVStatusComponent label="Time since last message" value={`${status.timeSinceMessage} sec`} />
<UAVStatusComponent label="Current mode" value={status.mode} />
<UAVStatusComponent label="Pictures received" value={status.imageCount} />
</CardContent>
</Card>
</>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Better to keep this current layout of UAVStatus, unless you have a better reason to change it.

Comment thread IMPLEMENTATION_SUMMARY.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read comment on DOCUMENTATION_INDEX.md

Comment thread INTEGRATION_GUIDE.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read comment on DOCUMENTATION_INDEX.md

Comment thread LAYOUT_VISUAL_GUIDE.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read comment on DOCUMENTATION_INDEX.md

Comment thread QUICK_START.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read comment on DOCUMENTATION_INDEX.md

Comment thread VALIDATION_CHECKLIST.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If re-worded, this can be the PR description rather than a file of its own

Comment thread src/server/server.js
Comment on lines -42 to +51
app.get("/api/imageTargets/:id1/:id2", (req, res) => {
const id = `${req.params.id1}/${req.params.id2}`;
const targets = getImageTargets(id);
app.get("/api/imageTargets/:imageId", (req, res) => {
const imageId = req.params.imageId;
const targets = getImageTargets(imageId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change should be undone, /:id1/:id2 is important because this is the nameing convention shepard follows

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Refactoring changes... This is actually some pretty good refactoring! great work, but this belongs in another PR

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