►
From YouTube: Building and managing an extensive API for Robotics and IoT - W.Vanheste & D.Hubrecht, Zora Robotics
Description
AsyncAPI Conference 2021 - Day 2
17th November 2021
This session will describe how we evolved into using AsyncAPI in a Kotlin code-driven approach, how we manage the scale of our API, how we use it in our documentation portal and no-code visual programming environment in ZBOS Control.
Zora Robotics specializes in robotics software. With the universal robot operating system, ZBOS, Zora Robotics is the worldwide leader in consumer targeted robot software. Our extensive API is based on MQTT.
A
Hey
there,
let
me
start
with
saying
what
is
zorobots:
zorobots
is
a
robotics
company,
it's
short
for
zora
robotics,
it
was
founded
in
2011
and
the
focus
is
on
making
robotics
accessible
to
all.
A
It
started
really
simple:
with
a
tv
remote
controlling
the
now
robot,
the
one
you
see
on
this
slide
and
it
evolved
into
a
crazy
operating
system
called
zvos.
Now
what
is
said
boss,
that
boss
is
the
zerabot's
operating
system,
we
started
working
on
it
back
in
2017
and
well.
It
was
based
on
on
all
the
prior
work,
of
course,
but
it
was
a
completely
new
system
meant
to
be
universal
cross-platform
and
well
you
can.
A
You
can
compare
it
to
like
windows
for
robotics,
basically,
so
there's
an
android
java
virtual
machine
and
a
web
version
via
kotlin
multi-platform.
A
This
is,
these
are
most
of
our
robots
that
we
support.
You
have
cruiser
here,
pepper
james,
the
small
one
is
robin
then
now
I
actually
saw
the
first
slide.
Billy
billy,
which
is
an
interactive
flower
pot.
Aimbots,
helps
with
the
pandemic,
and
sawyer
is
a
big,
robotic
arm.
A
We
also
support
virtually
any
android
device
and
we
have
a
version
running
on
the
web.
With
virtual
robots,
you
see
the
virtual
zora
there
in
a
virtual
home
we'll
have
a
control
application
which
works
on
your
phone
or
on
the
web.
It
allows
you
to
control
your
robots,
the
virtual
robot
or
an
actual
robot.
A
A
B
So
essentially,
we
have
two
brokers:
running
mqtt
brokers,
one
on
the
robots
which
you
can
see
on
the
left
here
and
the
one
in
the
in
the
clouds
and
these
two
brokers,
sync
each
other-
and
we
mainly
made
one
in
the
cloud.
So
we
could
remotely
access
the
robots
to
our
control
app
since
we
access
and
control
the
robots
through
an
mqtt
api.
That
also
means
that
third
parties
can
integrate
to
it.
B
These
are
some
examples
or
api
of
our
topics.
For
example,
what
we
do
a
lot
is
we
have
a
published
topic
to
request
something
in
this
case.
We
do
battery
cuts
because
we
want
to
get
the
current
battery
state
and
then
below
it.
You
see
the
response.
B
B
For
example,
in
this
case
you
get
your
battery
level
and
percentage.
You
know
if
it's
charging
or
not-
and
you
know
if
it's
docked
or
not,
because
we
don't
want
to
pull
to
for
the
battery
states.
You
can
also
listen
to
the
battery
event
topic,
which
does
the
same
as
a
response
but
publishes
its
once
in
a
while
every
time
it
changes.
B
So
that's
just
one
example:
we
have
a
lot
of
topics.
You
can
control
movements,
you
can
play
audio
or
a
set
of
volume
levels.
You
can
open
a
camera
stream.
Take
a
picture
turn
on
the
lights,
change,
the
core
of
the
lights.
If
the
robot
support
it,
I
can
play
media
play
audio
or
show
videos
on
him
or
images
on
the
screen.
If
robot
has
a
screen,
can
let
robot
say
something
to
text
to
speech
which
we
support
for
multiple
languages?
B
You
can
listen
to
sensors,
some
robots
have
like
bumpers
or
buttons,
which
can
listen
to
and
also
motion,
detection
and
phase
recognition
to
the
builds
and
cameras
or
listen
to
voice
commands.
If
a
person
says
something
to
robots,
you
can
and
then
do
something.
B
So
we
also
support
automations.
We
have
to
our
control.
We
have
a
composer
system
where
you
can
essentially
play
place,
blocks,
think
scratch
or
note
red
but
specifically
made
for
zed
balls,
and
you
also
have
a
scheduler,
so
you
can
start
automations
on
specific
time
points.
B
We
also
integrate
domotics
through
home
assistance,
so
home
assistant
publishes
data
to
our
robots
and
you
can
act
on
it.
We
also
support
third
party
apps.
They
can
integrate
into
said
bowls
by,
for
example,
adding
themselves
as
an
app.
They
can
register
send
cells
as
an
app.
So
the
user
can
see
the
app
visible
on
the
when
he
fetches
all
the
apps
and
control.
B
You
can
add
settings
which
the
users
can
then
change.
Custom
translations,
you
can
add
monitoring
if
you
have
a
monitoring
device,
for
example
co2
meter
or
something
like
that,.
B
Then,
as
we
have
an
extensive
api,
we
surely
had
to
document
it
in
the
early
days
we
just
updated
a
page
on
confluence
where
we
had
a
list
of
all
topics
and
a
description
of
them.
What
payload
had
to
be
sent
in
it?
Of
course,
it
was
hard
to
maintain
it
had
to
be
updated.
Every
time
you
changed
something
in
codes.
It
was
always
out
of
sync
and
and
well
it
contradicted
the
actual
code.
B
Also,
it
wasn't
easy
to
for
third
parties
to
read
out
the
api,
so
we
started
using
a
sync
api.
So
at
first
we
just
made
an
manually.
We
made
a
yaml
file
where
we
put
in
all
the
topics
and
payloads
and
stuff.
It
was
quite
easy
to
maintain,
but
all
developers
had
to
learn
the
sync
api
syntax
because
they
had
to
update
the
documentation
every
time
you
change
something
and
the
code,
and
it
happened
that
something
was
forgotten
and
it
was
still
out
of
sync.
B
So
what
we
essentially
did
was
we
made
multiple
yaml
files
files
per
category,
and
then
we
used
the
yaml
ink
tool
to
sync
those
files
or
merge
those
files
into
one
bitcoin
which
we
then
published.
B
So
we
wanted
to
make
that
progress
better.
We
wanted
to.
B
Automatically
generate
the
documentation,
so
we
went
one
step
further
and
we
let
the
async
api
file
generate
from
code,
so
it
was
at
that
point.
It
was
easy
to
maintain
because
we
didn't
have
to
manually
update
it.
The
code
and
documentation
was
always
in
sync,
and
we
because
we
generated
the
code,
the
file
from
code.
We
didn't
need
to
make
any
code
changes.
B
We
didn't
need
to
change
our
data
classes
or
something
like
that
downside
as
we
need
a
lot
of
annotations
in
our
code
because
we
had
to
say:
okay.
This
topic
has
this
description,
so
we
had
to
annotate
that
and
we
had
to
add
some
custom
codes
to
make
this
all
work
and
it
doesn't
always
form
nice
as
docs.
Sometimes
you
can
make
a
more
proper
dock
when
you
manually
make
it,
but
we
found
it
wasn't
that
big
of
an
issue.
B
So
why
did
we
decide
to
essentially
work
on
a
code
driven
way?
So
in
a
perfect
world
we
could
have
just
made
an
sync
api
and
then
let
the
or
kotlin
codes
generate
from
that.
For
example,
we
could
have
defined
a
battery
event
and
a
sync
api,
and
we
could
then
export
it
to
a
kotlin
class
and
it
would
look
something
like
this.
For
example,
we
would
have
our
battery
event
with
a
level
if
it's
charging
or
not,
if
it's
stopped
or
not.
B
Of
course,
that's
not
how
the
real
world
world
works,
I'm
afraid,
because
yeah
our
data
classes,
aren't
that
easy.
We
had,
for
example,
to
add
some
annotations.
We
had
to
add
today
at
serializable
annotation
for
our
json
parser.
We
had
to
add
the
js
gs
export
annotation,
because
we
wanted
to
make
the
data
class
available
from
javascript
for
our
content,
multi-platform
integration,
some
other
problems.
B
Again
we
had
some
annotations,
like
the
serial
name,
json
parser,
which
says
scotland,
not
platform,
doesn't
automatically
convert
camel
case
to
snake
case,
so
we
had
to
add
serial
names.
Sometimes
we
had
our
functions
in
the
doctor
class
itself,
for
example
this
one,
if
it
if
the
request
is
valid
or
not,.
B
Or,
for
example,
these
ones
where
we
made
some
helper
functions,
if
you
get
a
jar
and
it's
no
new
and
then
instead
return
zero,
so
we
could
work
around
it,
but
that
would
mean
we
had
to
do
a
lot
of
code
changes
some
classes,
we,
I
don't
think
we
would
be
able
to
work
rounds.
For
example,
we
have
an
enum
here
which
we
give
a
parameter
to.
B
A
B
File
from
the
code,
so
how
do
we
do
it?
B
We
essentially
have
a
kotlin
mqtt
library,
where
all
our
mpt
topics
and
other
classes
are
defined
and
we
made
a
generator
a
sync
api,
generator,
app
or
library.
If
you
will
that's
integrates
that
and
then
generates
a
sync
api
json
file
from
it.
For
that
we
made
use
of
the
jsync
api
library
link,
you
can
find
there.
B
How
does
that
work?
Well,
essentially,
you
can
define
in
the
sync
api
and
encode
instead
how
you
would
normally
do
in
a
yamal
or
json
file,
so,
for
example,
below
in
the
codes,
we
would
create
an
example
npt
api
class
and
then
we
would
serialize
it
to
json
and
then
written
to
a
file.
So
how
does
a
an
mpt
api
or
an
sync
api
class?
Look
like
so
here
on
the
right
you
can
see.
B
B
For
example,
the
get
info
function
requires
you
to
return
an
input
object
which
you
can
find
on
the
left
side
of
the
screen,
which
you
just
fill
in
with
some
meta
data.
You
normally
find
in
a
sync
api
file,
for
example
the
title:
the
description
of
the
api
contact
information,
the
version
stuff
like
that,
the
same
is
essentially
done
for
other
things,
like
servers
or
all
available
tags.
A
B
For
we
made
separate
classes
where
we
grouped
some
of
our
mqtt
topics,
for
example,
we
have
here
the
battery
channels
class
and
there
we
return
I'll,
go
to
the
codes
next
few
slides,
but
we
generate
some
publish
and
subscribes
topics
and
we
pulse
our
mqtt
topics
which
we
already
had
in
the
in
the
library.
B
B
So
what
is
that
constant?
For
example,
we
have
the
events,
so
the
battery
event
I
mentioned
on
previous
slides
is
here:
it's
just
a
static
string.
The
the
static
string
is
used
and
multiple
over
projects
where
we
pull
in
that
scotland
library
and
we
then
consume
those
constants
to
do
our
subscribes
and
publishes.
B
But
we
had
to
add
extra
information,
of
course,
to
make
to
make
sure
we
could
generate
a
sync
api
docs
from
it.
So
we
opted
to
add
annotations
to
each
constant.
B
So,
for
example,
we
would
have
the
at
the
topic
summary
annotation,
which
would
then
add
the
the
summary
and
the
I
think
api
docs
the
description
and
then
the
data
where
you
would
pulse
a
class
and
the
class
as
the
payload.
He
would
send.
Typically
for
that
topic.
B
So
in
the
in
the
class
itself,
we
also
added
some
some,
for
example,
if
you
wanted
to
add
a
description
to
a
property,
you
could
add
by
using
a
property
description,
or
we
also
made
some
small
helper
annotations,
for
example,
the
property
schema,
which
you
could
then
add.
Okay,
this
is
percentage,
the
level
of
a
battery
is
percentage
and
it
would
then
automatically
generate
like
the
minimum
s0.
The
maximum
is
100.
Add
a
description
to
it.
Stuff
like
that,
so
you
didn't
have
to
add
it.
B
B
Now
these
methods
that
I
just
mentioned,
you
can
then
call
so
we
will
by
using
the
jsync
api
library,
we
would
build
an
operation
and
then
adds
the
summary
description,
a
message
to
it
and
we
just
get
the
information
from
the
from
the
annotation
from
it
the
message
so
the
payloads
required
some
extra
codes
because
that's
more
complex.
B
The
only
constructor
data
class
normally
has
in
kotlin.
Then
we
would
loop
overall
parameters
in
it
in
the
constructor.
We
will
check
what
type
it
is.
We
will
check
if
it
has
annotations
and
and
get
those
and
fill
the
information
in
as
well.
B
If
we
see
that
the
the
type
of
that
property
is
not
a
string
or
an
integer
or
something
like
that,
we
would
but
it's
an
object.
We
would
then
recurse
and
get
properties
from
that
one.
So
we
would
have
a
nice
three
of
in
the
schema
of
course,
more
had
to
be
done,
for
example,
the
serial
names
we
used
for
our
serialization.
B
We
have
to
use
that
one-
those
ones
instead
of
the
the
camel
cased
names
we
used
in
the
code
itself.
We
also
had
some
non-constructor
fields
and
some
places
we
had
to
add.
We
had
to
add
some
special
handling
for
arrays
and
enums
and
objects.
We
also
had
to
prevent
infinite
nesting.
B
Sometimes
a
property
in
the
class
has
the
same
clause
as
a
clause
itself,
so
it
would
just
keep
looping
and
have
an
infinite
nested
codes.
So,
of
course,
that's
we
had
to
break
up
and
there
are
some
other
cases
as
well.
B
The
only
thing
we
still
added
manually
its
examples,
we
weren't
able
to
add
those
through
annotations,
but
we
just
added
them
and
after
we
generated
the
sync
api
schema,
we
just
added
an
example
for,
for
example,
battery
events,
then
level
and
and
all
the
properties
filled
in
so
it
would
show
up
nicely
as
an
example
in
the
sync
api
documentation.
B
The
outputs
from
that
library
has
done
one
big
json
file,
essentially
containing
all
topics,
but
we
also
opted
to
create
a
json
file
for
each
category
separately.
The
reason
we
did
that
is
because
we
want
it
in
our
web
portal
in
the
documentation
portal.
We
wanted
to
split
up
everything,
hence
into
separate
categories
and
then
load
one
of
those
json
files,
depending
on
the
selected
category,
showing
one
big
page:
wasn't:
user
friendly
and
not
performant
either.
So
we
opted
to
do
that.
B
The
big
json
file
mainly
exists
for
third
parties
who
just
want
to
integrate
everything
while
they
can
use
that
file.
So
it's
also
integrated
into
our
ci
cd.
Every
master
builds.
We
do.
We
run
the
the
code
to
generate
the
documentation
and
it's
then
published
to
our
public
kit
repo.
So
that
means
it's
available
immediately.
B
A
You
can
find
this
site
on
sorabot.e
everything
is
built
with
antora
fontura
is
open,
source
documentation,
tool
and
all
documentation
in
it
is
written
in
ascii
doc.
Oskidok
is
like
markdown
or
other
markup
languages,
except
that
it's
quite
advanced
to
make
structured
documents.
So
it's
perfect
for
manuals
and
technical
writing.
A
A
A
We
also
consume
our
own
asic
api
in
the
said:
boss,
control
application.
So
there's
an
mqtt
block
like
a
building
block
in
our
programming
environment,
where
you
can
publish
and
subscribe
to
topics
you
can
connect
to
multiple
mqtt
brokers,
if
you
like.
A
A
A
As
for
future
plans,
we
have
we've
been
working
a
lot
on
a
virtual
environment
and
virtual
robots
the
past
year,
and
I
would
say
that
95
of
what
we've
been
doing
is
not
even
live
yet.
So
2022
looks
really
nice
when
it
comes
to
releases.
A
It's
perfect
for
stem
classes
and
stuff
like
that,
so
our
focus
will
continue
on
virtual
robotics
as
well
as
it's
just
all
the
same
codes
as
for
the
real
robots
and
part
of
that
is
building
a
community
of
people
where
they
can
share
their
own
compositions
as
we
call
them,
so
they
can
share
their
own
programs.
They
make
with
our
software,
improve
upon
it
and
another
step
there
is
to
allow
third-party
integrators
to
easily
interact
with
our
system,
make
their
own
composer
blocks,
which
are
like
the
fundamental
building
blocks
of
our
system.
A
So
these
are
the
things
that
in
2022
we
are.
We
are
really
looking
forward
to.
If
you
are
interested
in
more
of
that,
I
set
up
a
mailing
list,
you
can,
you
can
subscribe
to
it
like
we
can
give
you
a
free
trial
to
our
virtual
robot
platform.
The
moment
we
launch
it.
So
please
do
don't
worry.
We
won't
spam,
you
with
anything
else.
This
is
basically
I
made
this
list
just
for
this
presentation.