pamino / Sketching-with-hardware

0 stars 2 forks source link

General #1

Open pamino opened 7 months ago

pamino commented 7 months ago

First draft of issues, please extend/refactor and link new issues

j-freimuth commented 7 months ago

Thinking about the whole thing, I think we should go with an ESP32 and just make it as dumb as possible. Just create something that streams everything to our server and takes remote control commands from the server. That simplifies of our robot to something inherently manageable and gives us most freedom.

Downside, we have to deal with latency. So what we need is some commands with constraints. So instead of "forward" we will have to have a command like "forward for 20ms" or alternatively "forward until a hindrance is found."

About the backend:

A quick poll which languages you guys are familiar with would be nice. Here are a few on the top of my head that I know have okay frameworks for an API. This would mostly decide in which language we would code the algorithms. Add more languages if I missed something.

If you have no experience in either language, fastApi with Python3 is the easiest, followed by Typescript with Nestjs. And obviously, Rust with Rocket is pretty much the coolest choice... But that just might be personal preference. Full disclosure, also the choice I have the least experience with.

pamino commented 7 months ago

Isn't python too slow?

I disagree. Why would be more work and abstraction(creating a communciation protocoll for the sensors and orders, it needs to updated every x ms) be easier? We could literally get our robot going in a session without this.

j-freimuth commented 7 months ago

Edited your reply? I liked your previous version better. The one where you think Python3 is 10 seconds slow and you call my idea nonsense.

Anyway, you are right. I will not annoy you with any more nonsense. I just thought that we might run into some issues with Arduinos. Maybe the Arduino I have is smaller than the one they gave us, but I just coded up a little example. It makes randomly two LEDs, the built-in LED and an LED on a bread board, blink. Mine is an Arduino Uno. Maybe the ESP32 is a lot bigger.

VID_20240429_095131(2)

This if fairly simple code, here is a screenshot of the code. I highlighted a portion that worries me. And yes, that's all the code in the project.

Screenshot from 2024-04-29 10-06-42_highlighted

About backend and speed. Python is blazing fast compared to the network latency. We will have the same network latency no matter which language.

pamino commented 7 months ago

Maybe I am frustrated, that the first answer comes after one week and we still don't know what parts to buy?

So what we really should do is ask the specifications, instead of speculating. But the esp should have around 1MB, so I don't see the problem right now. We need the Wifi capabilities either way, so this discussion can be delayed.

I am very busy today, maybe we should meet tomorrow early and discuss the parts(with some preperation)

j-freimuth commented 7 months ago

I care little about how frustrated you are. We are not behind, we have an estimate part list and we have to understand the domain, which we clearly do not. Anyway, I won't be there tomorrow. We can do it in the evening online or whenever. Let's talk about when in the WhatsApp group. I'll ask the question there.