Killer Robots 101
Golang edition
about(self):
Thejana Satanarachchi (TJ)

EstimateOne Pty Ltd.

github.com/thejanasatan

https://estimateone.com/our-team
Video!
Architecture
Ubuntu 14.04 (trusty64)
ROS node graph ROS services ROS topicsBaxter Drivers
ros_masterrospybaxter_interface IK Solverparam_server
baxtervr_ws_proxy
baxtervr_action_server
UNITY VR
SENSOR CONTROLLER ACTUATOR
Software Output DevicesInput Devices
Things I wish I knew
• Inverse Kinematics

• Physics thing

• Calculates the angles for joints on a limb based on the tip

• Could also be the force needed to move each joint to the
appropriate position so that the tip of the limb arrives at a given
coordinate as a result

• Quaternion

• Another physics thing

• Used to calculate the rotation of a limb/joint of a robot

• The coordinates of a joint would be in the form

[ (x, y, z) (x, y, z, w) ]
ROS: A Gentle Intro
TL;DR;
Robot OS (not really)
• ROS is a meta-operating system

• Supports Ubuntu on amd64 and ARM + more debian distributions

• Started in 2007 at Stanford - a place called Willow Garage primarily for
PR2

• Licensed under permissive BSD

• Supported by OSR foundation

• Mostly a message passing infrastructure

• Helpful libraries for robot-y things (IK, path planning etc)

• Used in a lot of real world robots

• RMIT University has a fleet of drones running on ROS
ROS Core
• Is an anonymous PubSub infrastructure - asynchronous

• Uses ROS topics

• Based on custom message formats over TCP - can use UDP too

• RPC based ROS Services

• Lock-step behaviour when passing messages

• Based on XMLRPC

• Node Graph

• Addressed like a unix filesystem

• Has local and global namespaces

• Node registry - resides in master
ROS Core cont.
• Distributed Parameter Server

• Resides in the master node

• Key-value database

• Types

• Message Types (msg)

• Service Types (srv)

• Packages - with manifests (build + dependencies) - package.xml

• Manifests and Configs

• Based on XML

• URDF - used to define a robot
Let’s talk Gobot
Gobot
• www.gobot.io

• github.com/hybridgroup/gobot

• Is an layer of semi-idiomatic abstraction for robotics and IoT for Go

• Already supports a lot of platforms and popular interface drivers both
standard and proprietary

• Extensible:

• Platforms

• Drivers

• Supports combination of platforms

• Has a lot of examples to learn from on https://gobot.io/documentation/
examples
Gobot Platforms
What the heck is a platform?
go get -d -u gobot.io/x/gobot/platforms/raspi
Gobot Core
• Robots

• Primary abstraction in Gobot

• Can represent a rover, drone or any other machine

• Takes in slices of Adaptors/Drivers to compose a robot

• Adaptors

• Packages to control platforms

• Usually specific to a platform targeted

• Drivers

• Packages that control hardware interfaces

• Supports popular interfaces such as I2C, SPI, GPIO, PWM

• Uses a custom implementation of the sysfs package
go get -d -u gobot.io/x/gobot/drivers/gpio
Let’s look at code…
YAY!
Gobot Flavours
• Classic Gobot

• Simplest way to use gobot

• gobot.NewRobot()

• Metal Gobot

• Like Sphero

• Not using gobot abstractions directly

• Master Gobot

• Master-slave pattern

• Enables control over swarms of robots
Is this enough?
• Go has experimental support for - in exp/io:

• spi

• i2c

• There are more up and coming packages for interfacing with h/w

• ROS client libraries for Go

• https://github.com/akio/rosgo
• Working on a ROS2 client library

• Calling it rosco

• Based on rcl - official C library

• github.com/thejanasatan/rosco

• Contributions welcome!

• ROS/Gobot Workshops for students at RMIT

• Do some robotics work in Rust too - shoutout to any rustaceans

Killer Robots 101 with Gobot

  • 1.
  • 2.
    about(self): Thejana Satanarachchi (TJ) EstimateOnePty Ltd. github.com/thejanasatan https://estimateone.com/our-team
  • 3.
  • 4.
    Architecture Ubuntu 14.04 (trusty64) ROSnode graph ROS services ROS topicsBaxter Drivers ros_masterrospybaxter_interface IK Solverparam_server baxtervr_ws_proxy baxtervr_action_server UNITY VR
  • 5.
    SENSOR CONTROLLER ACTUATOR SoftwareOutput DevicesInput Devices
  • 6.
    Things I wishI knew • Inverse Kinematics • Physics thing • Calculates the angles for joints on a limb based on the tip • Could also be the force needed to move each joint to the appropriate position so that the tip of the limb arrives at a given coordinate as a result • Quaternion • Another physics thing • Used to calculate the rotation of a limb/joint of a robot • The coordinates of a joint would be in the form
 [ (x, y, z) (x, y, z, w) ]
  • 7.
    ROS: A GentleIntro TL;DR;
  • 8.
    Robot OS (notreally) • ROS is a meta-operating system • Supports Ubuntu on amd64 and ARM + more debian distributions • Started in 2007 at Stanford - a place called Willow Garage primarily for PR2 • Licensed under permissive BSD • Supported by OSR foundation • Mostly a message passing infrastructure • Helpful libraries for robot-y things (IK, path planning etc) • Used in a lot of real world robots • RMIT University has a fleet of drones running on ROS
  • 9.
    ROS Core • Isan anonymous PubSub infrastructure - asynchronous • Uses ROS topics • Based on custom message formats over TCP - can use UDP too • RPC based ROS Services • Lock-step behaviour when passing messages • Based on XMLRPC • Node Graph • Addressed like a unix filesystem • Has local and global namespaces • Node registry - resides in master
  • 10.
    ROS Core cont. •Distributed Parameter Server • Resides in the master node • Key-value database • Types • Message Types (msg) • Service Types (srv) • Packages - with manifests (build + dependencies) - package.xml • Manifests and Configs • Based on XML • URDF - used to define a robot
  • 11.
  • 12.
    Gobot • www.gobot.io • github.com/hybridgroup/gobot •Is an layer of semi-idiomatic abstraction for robotics and IoT for Go • Already supports a lot of platforms and popular interface drivers both standard and proprietary • Extensible: • Platforms • Drivers • Supports combination of platforms • Has a lot of examples to learn from on https://gobot.io/documentation/ examples
  • 13.
    Gobot Platforms What theheck is a platform?
  • 15.
    go get -d-u gobot.io/x/gobot/platforms/raspi
  • 16.
    Gobot Core • Robots •Primary abstraction in Gobot • Can represent a rover, drone or any other machine • Takes in slices of Adaptors/Drivers to compose a robot • Adaptors • Packages to control platforms • Usually specific to a platform targeted • Drivers • Packages that control hardware interfaces • Supports popular interfaces such as I2C, SPI, GPIO, PWM • Uses a custom implementation of the sysfs package
  • 17.
    go get -d-u gobot.io/x/gobot/drivers/gpio
  • 18.
    Let’s look atcode… YAY!
  • 19.
    Gobot Flavours • ClassicGobot • Simplest way to use gobot • gobot.NewRobot() • Metal Gobot • Like Sphero • Not using gobot abstractions directly • Master Gobot • Master-slave pattern • Enables control over swarms of robots
  • 20.
  • 21.
    • Go hasexperimental support for - in exp/io: • spi • i2c • There are more up and coming packages for interfacing with h/w • ROS client libraries for Go • https://github.com/akio/rosgo
  • 22.
    • Working ona ROS2 client library • Calling it rosco • Based on rcl - official C library • github.com/thejanasatan/rosco • Contributions welcome!
 • ROS/Gobot Workshops for students at RMIT • Do some robotics work in Rust too - shoutout to any rustaceans