Despite the differences between 1.0/2.0 and 3.0, GrooveX have enabled unified software updates for all hardware versions of Lovot. Incredible achievement
“
LOVOT 3.0 Architecture Migration Journey
GROOVE X has released LOVOT 1.0 (hereinafter referred to as "1.0") and LOVOT 2.0 (hereinafter referred to as "2.0"), and in 2024, we released LOVOT 3.0 (hereinafter referred to as "3.0"). While there are some differences in hardware between the first generation and 2.0, there were no major changes in the CPU board or CPU architecture, and we continued to develop software for both the first generation and 2.0, releasing OS updates.
The CPU board for the first generation and 2.0 consists of three boards: one for LOVOT itself and two for the Nest (refer to "How LOVOT's OS is Made" for details on the three CPU boards).
In 3.0, we adopted NVIDIA(R) Jetson(TM) for LOVOT, consolidating the three CPU boards into one.
This raised the question of how to leverage the development code from the first generation and 2.0 and what could be shared.
Scope of this Article
This article discusses the changes in LOVOT's OS and software layers as the architecture evolved from the first generation and 2.0 to 3.0. Although there are topics such as changes in sensor devices and connection methods around the CPU board, this article will focus on software development.
For convenience, we define the following terms:
- The configuration of the first generation and 2.0 is referred to as Arch1.
- The configuration of 3.0 is referred to as Arch2.
Development in Arch1
In Arch1, LOVOT's OS (commonly known as LOVOTOS) shared the same OS for the first generation and 2.0, releasing three OS updates. Although there are some differences in behavior between models, the basic code is shared, ensuring high maintainability.
Microservices
LOVOT software development divides services (processes) by role. Each process communicates with others via gRPC, shared memory, or databases, achieving a microservices architecture.
Differences in CPU Architecture
Arch1 has a mix of amd64 and arm64 architectures, and development was done to accommodate both. Development was mainly done in Python, Go, and C++, and there were few issues due to CPU architecture differences.
Development in Arch2
As mentioned earlier, Arch2 adopted NVIDIA(R) Jetson(TM), consolidating the CPU boards into one. The CPU architecture is now solely arm64. From a microservices perspective, this can be seen as deploying services that were previously deployed on three instances to a single instance.
Objectives and Practices for Arch2
When developing Arch2, the team set the following objectives:
1. Reduce Nest dependencies
2. Develop an OS for Arch2
3. Improve service collaboration
Reducing Nest Dependencies
To reduce Nest dependencies, we aimed to make LOVOT more independent. However, this wasn't just about simple migration; we had to ensure that the functionality provided by Nest was also available in Arch2.
Migrating Nest Functionality to LOVOT
Examples:
- Migrating Nest's OS caching mechanism
- Enabling LOVOT and Nest to update independently
Improving Service Collaboration
Introducing the concept of capabilities
To accommodate differences in sensor configurations and models, we introduced capabilities to absorb these differences. For example, differences in ToF sensor types or mounting positions.
Code Refactoring and Organization
Arch1's codebase had many historical artifacts, and APIs were not fully abstracted. To share code while allowing for deployment on different models, we abstracted APIs.
Examples:
- Unifying status across boards
- Merging metrics from multiple boards
Releasing the Same Version
After continued development, we finally released the same OS version (24.09.2) for the first generation, 2.0, and 3.0 on November 25, 2024. With a unified codebase, we can now provide features across all models.
Development Impressions
One aspect that made development smoother was the transition from a complex architecture to a simpler one. In contrast, changing from a simple to a complex architecture can be challenging, especially when considering scalability.
Things That Were Not Fully Addressed
During Arch2 development, there were some aspects that were not fully addressed:
- API and data abstraction
- Model-specific conditional branching
- Capability utilization
- Redundant implementations
These will be addressed in future development.
Conclusion
LOVOT software development combines historical embedded development with web development expertise. Recent robot development architectures, such as ROS, also employ microservices-like concepts to build ecosystems.
While it's unclear what the "right" approach is, it's essential to consider the development history and apply those lessons to future development.”
Source:
https://tech.groove-x.com/entry/lovot3-arch-note