Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Killer Robots 101 with Go

Killer Robots 101 with Go

A talk about ROS (Robot Operating System) and Gobot at Golang Melbourne July 2018

Avatar for Thejana Satanarachchi

Thejana Satanarachchi

July 06, 2018

Other Decks in Programming

Transcript

  1. Architecture Ubuntu 14.04 (trusty64) ROS node graph ROS services ROS

    topics Baxter Drivers ros_master rospy baxter_interface IK Solver param_server baxtervr_ws_proxy baxtervr_action_server UNITY VR
  2. 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) ]
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. • 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
  10. • 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