Machines with Traits: How Orb Will Change the Future of Robotics
A vision for the future of automation in the Arab world
Introduction
Imagine a world where you don't need to write thousands of lines of code to make a robot move intelligently. A world where you declare a machine's behavior the same way you describe the motion of planets in their orbits.
That is the world of Almadar.
In this series we'll explore how the Orb language can transform robotics and industrial automation, and how the Arab world can lead that shift.
The Problem: Why Is Robot Programming Hard?
The Traditional Way
When engineers program a robot today, they run into enormous difficulties:
# The traditional way - tangled, complicated code
class RobotArm:
def __init__(self):
self.position = (0, 0, 0)
self.is_holding = False
self.speed = 0
self.error_state = None
def move_to(self, target):
if self.error_state:
self.handle_error() # where is this function defined?
return
if self.is_holding and self.weight > MAX_WEIGHT:
self.emergency_stop() # and what happens after that?
return
# ... hundreds more lines
The problems:
- Compounding complexity — every new condition multiplies the complexity
- Hidden bugs — what happens if we forget a particular state?
- Hard to test — how do we know every path is covered?
- Documentation drift — the code says one thing and the docs say another
The Solution: Traits as a Way of Thinking
The Physics of Software
In physics, we describe the motion of bodies with simple laws:
- A body is either at rest or in motion
- Moving between the two requires a force (an event)
- Laws govern when that transition may happen
Orb applies the same logic to software:
| Physics | Orb |
|---|---|
| State (at rest / in motion) | State machine states |
| Force | Events |
| Laws | Guards |
| Reaction | Effects |
Example: A Robotic Arm in Orb
{
"ime": "RoboticArm",
"entiteta": {
"ime": "Arm",
"trajnost": "runtime",
"polja": [
{
"ime": "position",
"tip": "objekt"
},
{
"ime": "speed",
"tip": "stevilo"
},
{
"ime": "holding",
"tip": "logicno"
},
{
"ime": "weight",
"tip": "stevilo"
}
]
},
"znacilnosti": [
{
"ime": "MotionTrait",
"strojStanj": {
"stanja": [
{
"ime": "idle",
"jeZacetno": true
},
{
"ime": "moving"
},
{
"ime": "holding"
},
{
"ime": "error"
}
],
"dogodki": [
{
"kljuc": "MOVE",
"ime": "Start moving"
},
{
"kljuc": "STOP",
"ime": "Stop"
},
{
"kljuc": "GRIP",
"ime": "Grip an object"
},
{
"kljuc": "RELEASE",
"ime": "Release an object"
},
{
"kljuc": "EMERGENCY",
"ime": "Emergency stop"
}
],
"prehodi": [
{
"iz": "idle",
"do": "moving",
"dogodek": "MOVE",
"strazar": [
"in",
[
"ne",
"@entiteta.holding"
],
[
"manj",
"@podatki.speed",
100
]
],
"ucinki": [
[
"shrani",
"update",
"Arm",
{
"speed": "@podatki.speed"
}
],
[
"oddaj",
"MOTION_STARTED",
{
"cilj": "@podatki.target"
}
]
]
},
{
"iz": "moving",
"do": "idle",
"dogodek": "STOP",
"ucinki": [
[
"shrani",
"update",
"Arm",
{
"speed": 0
}
]
]
},
{
"iz": "idle",
"do": "holding",
"dogodek": "GRIP",
"strazar": [
"manj",
"@podatki.weight",
50
],
"ucinki": [
[
"shrani",
"update",
"Arm",
{
"holding": true,
"utez": "@podatki.weight"
}
],
[
"obvesti",
"info",
"Object gripped"
]
]
},
{
"iz": "*",
"do": "error",
"dogodek": "EMERGENCY",
"ucinki": [
[
"shrani",
"update",
"Arm",
{
"speed": 0
}
],
[
"oddaj",
"EMERGENCY_STOP",
{
"reason": "@podatki.reason"
}
],
[
"obvesti",
"error",
"Emergency stop!"
]
]
}
]
}
}
]
}
What Does This Mean?
- Every state is explicit — idle, moving, holding, error
- Every transition is declared — no surprises
- Guards protect you — you cannot grip anything heavier than 50
- Emergency from anywhere —
"from": "*"means from every state
The Arab Opportunity
Vision 2030 and Automation
Saudi Arabia is investing billions of dollars in:
- NEOM — the smart city of the future
- Industry 4.0 — factory automation
- Healthcare — surgical robots
- Services — hospitality robots
Why Orb Fits
| Need | The Orb answer |
|---|---|
| Development speed | 60% faster than traditional |
| Reliability | Guaranteed state machines |
| Safety | Guards prevent incorrect behavior |
| Documentation | The schema is the documentation |
| Training | Arabic-first language |
Example: A Delivery Robot in NEOM
;; app DeliveryRobot
orbitala Navigation {
entiteta Route {
id : niz!
destination : niz
}
znacilnost NavigationTrait -> Route [interakcija] {
stanje idle {
ZACETEK -> idle
(pridobi Route)
(izrisi-vmesnik main { type: "entity-table", entity: "Route", fields: ["destination"], itemActions: [{ event: "VIEW", label: "View" }] })
VIEW -> idle
}
}
stran "/navigation" -> NavigationTrait
}
orbitala Delivery {
entiteta Package {
id : niz!
status : niz
}
znacilnost DeliveryTrait -> Package [interakcija] {
stanje idle {
ZACETEK -> idle
(pridobi Package)
(izrisi-vmesnik main { type: "entity-table", entity: "Package", fields: ["status"], itemActions: [{ event: "VIEW", label: "View" }] })
VIEW -> idle
}
}
stran "/delivery" -> DeliveryTrait
}
orbitala Communication {
entiteta Notification {
id : niz!
message : niz
}
znacilnost CommunicationTrait -> Notification [interakcija] {
stanje idle {
ZACETEK -> idle
(pridobi Notification)
(izrisi-vmesnik main { type: "entity-table", entity: "Notification", fields: ["message"], itemActions: [{ event: "VIEW", label: "View" }] })
VIEW -> idle
}
}
stran "/notifications" -> CommunicationTrait
}
Three orbitals communicating automatically:
- Navigation — controls movement
- Delivery — manages packages
- Communication — notifies the customer
When Delivery emits a DELIVERED event, Communication listens and sends the customer a confirmation automatically.
Next Steps
For Developers
- Download the compiler —
curl -fsSL https://orb.almadar.io/install.sh | sh - Read the docs — Getting Started
- Try the example — build your first robotics trait
For Companies
- Get in touch — hello@almadar.io
- Book a demo — we'll show you Orb on your own project
- Start with a pilot — a small project to prove the value
For Universities
We offer:
- Guest lectures — an introduction to Orb
- Capstone projects — supervision and mentoring
- Research partnerships — joint development
Conclusion
"Machines no longer need thousands of lines. They need traits that are clear and precise."
Orb is not just a programming language. It is a new way of thinking about machine behavior — a way that brings programming closer to physics, and development closer to design.
The Arab world has a historic opportunity to lead this shift. An opportunity to build the future with our own tools, in our own language.
Are you ready?
In the Next Part
Part Two: building an industrial robot controller (coming soon) — together we'll build a complete robotic arm in Orb, step by step.
Written by the Almadar Team
January 2026
Share this post: