5 ms·
"Naturally?" lol while(true) { read sensors update world model decide what to do act } You should only deviate from this when you have a specific rea
by cheeselip420 3y ago
"Naturally?" lol
while(true) {
read sensors
update world model
decide what to do
act
}
You should only deviate from this when you have a specific reason (concurrency, libraries, IPC, etc). You can attach a debugger. You can deterministically play sensor data through and get great reproducibility for end-to-end testing. Starting with a distributed system is a handicap 80% of the time.
- toxik 3y agoDecision making and sensor reading happen at vastly different timescales.
- cheeselip420 3y agoYou could have a lidar coming in at 15Hz, a camera at 30Hz, odometry at 60 or 100Hz - but typically you'll want to plan within that same range, at least for navigation (20-50Hz). "Vastly different" is a bit of a stretch. Also - we have used queues to deal with different time scales for a really long time. It works fine here too. For higher-level behaviors around grasping or manipulation, your point is super valid though. I suppose I'm mostly focusing on navigation-type tasks.
- ModernMech 3y agoYou aren’t thinking broad enough. Algorithms can run at megahertz, sensors can run at 10s of kilohertz to 10s of Hz, control loops can run at 5Hz. Remote database calls can run of course much longer than that, and then you have very long range planning tasks that can cycle days or weeks depending on deployment. I’d say that’s quite the range. And you mention queues, yes exactly. Abstract a little more and you get pub sub. Abstract a little more and you have the actor model, which is a lovely way of building resilient, reliable, fault tolerant systems — exactly what we want out of robots.
- snovv_crash 3y agoControl loops also need to run at kilohertz and if you can't schedule them to run without jitter the whole system is useless. Realtime systems need to have an understanding of time budgets otherwise they will never be reliable enough for actually running in places where if they work suboptimally money is lost.
- ModernMech 3y agoIndeed, there are many different levels of control loops.
- ModernMech 3y agoWhat do you do when your control software is on one computer and your perception software is on a different computer?
- cheeselip420 3y agoDesign a system to efficiently partition the state between the two? I'm not saying that message passing is bad, just that it shouldn't be the default choice...
- ModernMech 3y agoBut that’s the thing, robots are supposed to interact with the world by default. They are supposed to integrate into society. At some level, there is a necessary distributed processing boundary, and in fact there are many - from the need to communicate with multiple internal heterogeneous processing units, multiple sensors running at different frequencies, external databases and cloud compute, remote operators or telemetry, ground stations, and even other robots. If you want them to be useful at all that is. How in the world do you integrate that system into a synchronous while loop?
- snovv_crash 3y agoThis is a non-falsifiable argument. Of course there need to be abstraction layers between various systems. The question is whether pubsub, and all the baggage and difficulty that brings with it, is the correct abstraction mechanism. Tossing your data to the wind and hoping the next system picks it up correctly and runs with it is not how I envision building reliable, deterministic systems.
- deleted 3y ago[deleted]
- ModernMech 3y agoMy argument is that robotics systems are naturally distributed. Pub sub works okay there, but the actor model is better in my opinion. Either way, I don’t see how it’s possible to argue a while loop is the main abstraction roboticist need. Maybe we're talking about different kinds of systems. I work with robot teams, human-robot interaction, and long-term autonomy.