Close

Bad Architecture, Good Architecture

A project log for Zakhar the Robot

A companion for your cats and dogs.

andrei-gramakovAndrei Gramakov 10/12/2023 at 20:020 Comments

After a couple of months trying to make something meaningful of my project, we with my small team have made a soft reboot. Why do we need it? The architecture is BAD. Before starting learning software architecture, I was just trying to mimic what I've seen working in Espressif and Rockwell, I was trying to follow best practices of Python, ROS and C++. I sounded like a good idea, and when I tried to add people to the project - it got stuck.

What problems did we face? 

So here a list:

  1. We had a nice idea, but the closest milestone was miles away.
  2. The idea was nice, but not precise. What the pet companion should do exactly?
  3. We had my documentation that does describe the project architecture well enough. And even myself was not able to explain everything, because I just forgot a lot of things.
  4. We had a lot of dependencies by default, so everyone why wanted to develop something had to understand everything before start to develop.

Why did we have all this problem? 

Because I started from the middle. I wanted to build something using particular technologies implementing a new technology, and did not have the clear vision of the result. 

It was a research project and as it turned out it's very difficult to convert it to something more substantial.

The Solution

We've decided to split the work into intermediate prototypes that should do something particular. I will rebuild the architecture from scratch, taking only useful pieces of my monstrous legacy. We've started from the Use Case scenario. The use case of our first iteration is the following:

  1. The user turns on the robot
  2. The robot starts to explore the space using a camera and microphones
  3. If it recognizes a pet (cat or dog) it moves closer to the pet
  4. When it is close to the pet, it makes a sound.

That is it. The diagram looks like this:

Here is our current phase documentation:

https://zakhar-the-robot.github.io/doc/docs/architecture/phase-1/

Meanwhile, I continue working on my more mini project LeOn which is the source of our current discoveries about the project architecture: https://hackaday.io/project/192732-leon

Discussions