Blog

Jan
09
2017

Gobot - The 1.1 Release

by Ron Evans

It was just a few weeks ago since the release of version 1.0 of Gobot.

Thanks to the enthusiasm and work of our community, we've just had our 1.1 release already.

We are now up to 1500 commits from 56 contributors, and we're going strong.

Here are a few highlights from this new release:

ESP8266 and wireless Arduino

We now offer support for the ESP8266 wireless microcontroller.

Check out a short code sample:

package main

import (
  "time"

  "gobot.io/x/gobot"
  "gobot.io/x/gobot/drivers/gpio"
  "gobot.io/x/gobot/platforms/firmata"
)

func main() {
  firmataAdaptor := firmata.NewTCPAdaptor("192.168.1.27:3030")
  led := gpio.NewLedDriver(firmataAdaptor, "13")

  work := func() {
    gobot.Every(1*time.Second, func() {
      led.Toggle()
    })
  }

  robot := gobot.NewRobot("bot",
    []gobot.Connection{firmataAdaptor},
    []gobot.Device{led},
    work,
  )

  robot.Start()
}

You can also use the new firmata.TCPAdaptor() with a WiFi-connected Arduino.

New I2C Drivers

Thanks to contributors @elopio and @schmidtw we now have support for the following new I2C devices:

  • BMP180 barometer/temperature sensor
  • L3GD20H gyroscope
  • SHT3X temperature/humidity sensor

Parrot Bebop

We have several improvements and bugfixes for the Parrot Bebop and Bebop 2, including support for the latest firmware and RTP video streaming.

Full Changelog

There is lots more in this new release, check out the release info at https://github.com/hybridgroup/gobot/releases/tag/v1.1.0.

Keep Up To Date

Keep up to date with the project by following us on Twitter at @gobotio. Thank you!

Dec
21
2016

Gobot - The Big One Oh!

by Ron Evans

It's been a long time coming, and version 1.0 of Gobot is finally here!

We're really excited to share this big news with all of you.

If you want a "media-friendly" version of the story, here is our press release about it: http://gobot.io/news/gobot-1.0-release/

However, if you want the serious technical details, then read on!

You can now use "Classic Gobot" to write the fewest possible lines of Golang code that can control physical devices.

Or you can use "Metal Gobot", and use the low-level Gobot adaptors and drivers directly.

Lastly, you can use "Master Gobot", to include the entire Gobot API and control swarms of devices.

These are just some of the major changes we've made for the 1.0 release.

Classic Gobot

We've reduced the amount of Golang code to control physical devices down as simple as possible, but no simpler.

Here is the "Hello, World of Things" aka a program that blinks an LED. In this case the platform is an Arduino microcontroller.

package main

import (
        "time"

        "gobot.io/x/gobot"
        "gobot.io/x/gobot/drivers/gpio"
        "gobot.io/x/gobot/platforms/firmata"
)

func main() {
        firmataAdaptor := firmata.NewAdaptor("/dev/ttyACM0")
        led := gpio.NewLedDriver(firmataAdaptor, "13")

        work := func() {
                gobot.Every(1*time.Second, func() {
                        led.Toggle()
                })
        }

        robot := gobot.NewRobot("bot",
                []gobot.Connection{firmataAdaptor},
                []gobot.Device{led},
                work,
        )

        robot.Start()
}

Metal Gobot

Metal Gobot gives the developer the lowest-level control over the hardware interfaces themselves. If you want discrete control over exactly how your application handles concurrency, failover, and everything else, then Metal Gobot is looking pretty shiny.

This is a program that blinks an LED using "Metal Gobot" style. The platform is an Intel Edison single-board Linux computer.

package main

import (
        "time"

        "gobot.io/x/gobot/drivers/gpio"
        "gobot.io/x/gobot/platforms/intel-iot/edison"
)

func main() {
        e := edison.NewAdaptor()
        e.Connect()

        led := gpio.NewLedDriver(e, "13")
        led.Start()

        for {
                led.Toggle()
                time.Sleep(1000 * time.Millisecond)
        }
}

Master Gobot

Master Gobot adds the built-in RESTful APIs, along other internal structures you need to control groups of robots.

This program controls a swarm of four Sphero robots:

package main

import (
        "fmt"
        "time"

        "gobot.io/x/gobot"
        "gobot.io/x/gobot/api"
        "gobot.io/x/gobot/platforms/sphero"
)

func NewSwarmBot(port string) *gobot.Robot {
        spheroAdaptor := sphero.NewAdaptor(port)
        spheroDriver := sphero.NewSpheroDriver(spheroAdaptor)
        spheroDriver.SetName("Sphero" + port)

        work := func() {
                spheroDriver.Stop()

                spheroDriver.On(sphero.Collision, func(data interface{}) {
                        fmt.Println("Collision Detected!")
                })

                gobot.Every(1*time.Second, func() {
                        spheroDriver.Roll(100, uint16(gobot.Rand(360)))
                })
                gobot.Every(3*time.Second, func() {
                        spheroDriver.SetRGB(uint8(gobot.Rand(255)),
                                uint8(gobot.Rand(255)),
                                uint8(gobot.Rand(255)),
                        )
                })
        }

        robot := gobot.NewRobot("sphero",
                []gobot.Connection{spheroAdaptor},
                []gobot.Device{spheroDriver},
                work,
        )

        return robot
}

func main() {
        master := gobot.NewMaster()
        api.NewAPI(master).Start()

        spheros := []string{
                "/dev/rfcomm0",
                "/dev/rfcomm1",
                "/dev/rfcomm2",
                "/dev/rfcomm3",
        }

        for _, port := range spheros {
                master.AddRobot(NewSwarmBot(port))
        }

        master.Start()
}

Other Major Changes

Here is a list of some of our other major changes. If you want the complete CHANGELOG, we've got that as well.

  • Refactor events to use channels all the way down. Allows 'metal' development using Gobot libs
  • No longer return slices of errors, instead use hashicorp/go-multierror
  • Use canonical import domain of gobot.io for all code
  • Add golang 1.7 & 1.8 to build matrix for TravisCI
  • Reduce Travis builds to golang 1.4+ since it is late 2016 already
  • Complete move of test interfaces into the test files where they belong
  • Add missing godocs for everything

We've also added support for the NATS open source messaging server.

Also, many updates to our hardware support, such as:

  • I2C
  • GPIO
  • Beaglebone
  • Bluetooth LE
  • Intel Edison
  • Intel Joule
  • Arduino
  • C.H.I.P.
  • Sphero BB-8

We Had To Change The Interface

This is a big release, and makes breaking changes to a number of APIs. Normally this is frowned upon in the Golang programming world.

However, we recognized that we could greatly simplify how code could be written, in particular by removing things that were redundant or repetitive.

We're sorry about any inconvenience this may bring.

Now the interfaces are stable, and we don't anticipate any more breaking changes in the near future.

Thanks To The Contributors

We'd really like to extend a massive thanks to the many contributors who've helped get Gobot to this 1.0 release milestone.

We couldn't have done this without you. Thank you.

Keep Up To Date

To keep up with the project, please follow us on Twitter at @gobotio, as our team and many contributors work together to make Gobot the best it can be.

Feb
17
2016

Gobot - This One Goes To 0.11

by Ron Evans

Forgive us, dear friends, that it has been a couple of months since our last update, but we wanted to release our newest version as part of the Golang 1.6 release party.

So, without further ado, say hello to version 0.11 of Gobot, our open source robotics and Internet of Things (IoT) framework written in the Go programming language.

Welcome, C.H.I.P.

Once of the most exciting parts of the new 0.11 release, is adding support for C.H.I.P the $9 computer. Yes, you read that correctly. Thanks to awesome contributor Hrishikesh Tapaswi, we now have support for one of the most exciting pieces of hardware we've seen for a while. Check it out in action:

The code is as you would expect, just classic Gobot:

package main

import (
        "time"

        "github.com/hybridgroup/gobot"
        "github.com/hybridgroup/gobot/platforms/i2c"
        "github.com/hybridgroup/gobot/platforms/chip"
)

func main() {
        gbot := gobot.NewGobot()

        board := chip.NewChipAdaptor("chip")
        screen := i2c.NewGroveLcdDriver(board, "screen")

        work := func() {
                screen.Write("hello")

                screen.SetRGB(255, 0, 0)

                gobot.After(5*time.Second, func() {
                        screen.Clear()
                        screen.Home()
                        screen.SetRGB(0, 255, 0)
                        // set a custom character in the first position
                        screen.SetCustomChar(0, i2c.CustomLCDChars["smiley"])
                        // add the custom character at the end of the string
                        screen.Write("goodbye\nhave a nice day " + string(byte(0)))
                        gobot.Every(500*time.Millisecond, func() {
                                screen.Scroll(false)
                        })
                })

                screen.Home()
                <-time.After(1 * time.Second)
                screen.SetRGB(0, 0, 255)
        }

        robot := gobot.NewRobot("screenBot",
                []gobot.Connection{board},
                []gobot.Device{screen},
                work,
        )

        gbot.AddRobot(robot)

        gbot.Start()
}

Imagine what kinds of new applications and devices you will be able to create using Gobot on C.H.I.P. Imagine, and now create them!

Changelog

You can find the changelog here, but if you want to see every detail, as always you can take a look at the compare view on GitHub.

  • Support for Golang 1.6
  • Determine I2C adaptor capabilities dynamically to avoid use of block I/O when unavailable
  • chip
    • Add support for GPIO & I2C interfaces on C.H.I.P. $9 computer
  • leap motion
    • Add support additional "hand" and "gesture" events
  • mqtt
    • Support latest update to Eclipse Paho MQTT client library
  • raspberry pi
    • Proper release of Pi Blaster for PWM pins
  • bebop
    • Prevent event race conditions on takeoff/landing
  • i2c
    • Support added for new i2c device:
      • MCP23017 Port Expander
    • Bugfixes:
      • Correct init and data parsing for MPU-6050
      • Correct handling of errors and buffering for Wiichuk
  • gort
    • Update bluetooth commands for more logical order
    • Update arduino to support many more board types
  • docs
    • Many corrections and updates for docs, primarily contributed by the awesome community.

Need To Report Issues?

When you find any issues with Gobot, please let us know by entering a GitHub issue and we'll take a look as soon as possible. We're also frequently around on IRC (#gobotio on freenode).

Keep Up To Date

To keep up with the project, please follow us on Twitter at @gobotio, as our team and many contributors work together to make Gobot the best it can be.

Oct
27
2015

Gobot 0.10 - Less Is More

by Ron Evans

We've just released the new 0.10 version of Gobot, our open source robotics and Internet of Things (IoT) framework written in the Go programming language. This new version incorporates many changes and community contributions to make Gobot much faster, leaner. And of course, add lots more hardware support.

We've got a list of the new changes below, but if you want to see the gory details, please check out the compare view on GitHub.

What Happened To The 0.9 Release?

There were so many important changes, especially ones worked on by the amazing participants at the "sold-out" Gophercon hardware hackday, that we decided to hold off on that version, and instead go right on to this new 0.10 release.

Changelog

  • Refactor core to cleanup robot initialization and shutdown
  • Remove unnecessary goroutines spawned by NewEvent
  • api
    • Update Robeaux to v0.5.0
  • bebop
    • Add support for the Parrot Bebop drone
  • keyboard
    • Add support for keyboard control
  • gpio
    • Support added for 10 new Grove GPIO devices:
      • Grove Touch Sensor
      • Grove Sound Sensor
      • Grove Button
      • Grove Buzzer
      • Grove Led
      • Grove Light Sensor
      • Grove Vibration Sensor
      • Grove Rotary
      • Grove Relay
      • Grove Temperature Sensor
  • i2c
    • Support added for 2 new Grove i2c devices:
      • Grove Accelerometer
      • Grove LCD with RGB backlit display
  • gort
    • Update bluetooth Linux support for BlueZ 5.x
    • Bugfixes
  • docs
    • Many useful fixes and updates for docs, mostly contributed by our wonderful community.

Contributors

So many people helped with this release, both formally via code or documentation contributions, as well as helpful feedback, comments, and hallway chats. Gobot could not be what it is without all of us in this community working together. We really appreciate it!

Issues

As always, if you find any issues with the new Gobot release, please let us know by entering a GitHub issue and we'll get back to you as soon as possible. We're also around on IRC (#gobotio on freenode) as much as we can be.

Keep Informed

To stay informed on our progress, please follow us on Twitter at @gobotio, as our team and contributors continue our work together.

Sep
14
2015

Gobot in Vice

by Staff

Just recently, a wonderful interview was published in Vice with The Hybrid Group's Ringleader Ron Evans about the "Internet of Toys", open source, and how The Hybrid Group is bringing programming of the physical world to the masses. Read the full article titled "Opening Up the World of Robotics: 'The Internet Of Toys'" here.

Sep
01
2015

Gobot mentioned in SD Times

by Staff

Gobot was mentioned in the recent interview with The Hybrid Group Ringleader Ron Evans in the venerable SD Times about the Internet of Things (IoT) and future implications of a connected world.

Evans describes his real-world experiences, open source IoT, security & privacy, and why he thinks the Intel Edison is so interesting. Read the full post titled "Internet of Things: Closing the gap between customers, business" here.

Apr
13
2015

Gobot featured in Wired

by Nathan Zankich

The Hybrid Group's own Ringleader Ron Evans got to speak with Wired about the Internet of Things (IoT) and open source robotics. The interview covers our robotics frameworks Cylon.js, Artoo, and Gobot, as well as what direction we see them moving towards in the future.

Evans also went into detail about his experiences working on Apple's program Hypercard, and how that open source mentality went on to influence The Hybrid Group's other projects such as KidsRuby later on. Read the full article titled "Internet of Anything: Simple Tools Make It Possible for Anyone to Hack Robots" here.

Dec
24
2014

Gobot 0.8 - The Happy Holiday Release

by Adrian Zankich

This release brings a number of very large and necessary changes to Gobot. Over time our interfaces have grown out of hand and are becoming unmanagable and largely unecessary. With the Gobot 0.8 release, we have completely changed the core interfaces as well as our gpio and i2c driver interfaces.

In addition to this, we are finally correctly passing errors throughout the system and have removed all panics! Altough this is very exciting, this also means that there are many breaking api changes, especially if you have written your own drivers and adaptors.

If you're not ready to update to the new interfaces or errors handling, then you're in luck! We create a tag with every new Gobot release, so rolling back to the previous release is as easy as:

$ go get -d -u github.com/hybridgroup/gobot/...
$ cd $GOPATH/src/github.com/hybridgroup/gobot
$ git checkout 0.7.1
$ go build -a github.com/hybridgroup/gobot

You really should update to the latest release however, it's much better!

Here's a overview of the changes, but if you want to see more check out the compare view on GitHub.

Changelog

This release includes a number of breaking api changes!

  • Refactor core, gpio, and i2c interfaces
  • Correctly pass errors throughout packages and remove all panics
  • Numerous bug fixes and performance improvement
  • api
    • Update robeaux to v0.3.0
  • firmata
    • Add optional io.ReadWriteCloser parameter to FirmataAdaptor
    • Fix thread exhaustion error
  • cli
    • generator
      • Update generator for new adaptor and driver interfaces
      • Add driver, adaptor and project generators
      • Add optional package name parameter

Contributors

A special thanks to everyone who made this release possible. You've been very nice!

Documentation

We are now generating our platforms pages directly from our README files for easier editing and collaboration, thanks zankavrogin! You can find the latest documentation on the docs page.

Issues

If you find any issues with Gobot, please let us know. We try to be on IRC (#gobotio on freenode) as much as possible, but if we're not around leave us a GitHub issue and we'll get back to you as soon as possible.

Stay In Touch

Please follow us on Twitter at @gobotio for the latest updates, as we continue to work on this amazing platform.

Nov
11
2014

Gobot 0.7 - The Big Release

by Adrian Zankich

We've been quietly (and not so quietly) working these last couple of months, and we've just released Gobot 0.7! This is a very big release, that adds a lot of new capabilities, adds a lot of test coverage, refactors code, and adds support for a whole bunch of new hardware platforms too.

Here's a overview of the changes, but if you want to see more check out the compare view on GitHub.

Changelog

  • Dramatically increased test coverage and documentation
  • api
    • Conform to the cppp.io spec
    • Add support for basic middleware
    • Add support for custom routes
    • Add SSE support
  • ardrone
    • Add optional parameter to specify the drones network address
  • core
    • Add Once Event function
    • Rename Expect to Assert and add Refute test helper function
  • i2c
    • Add support for MPL115A2
    • Add support for MPU6050
  • mavlink
    • Add support for common mavlink messages
  • mqtt
    • Add support for mqtt
  • raspi
    • Add support for the Raspberry Pi
  • sphero
    • Enable stop on sphero disconnect
    • Add Collision data struct
  • sysfs
    • Add generic linux filesystem gpio implementation

Contributors

A very special thanks to strongh, tangsoft, derailed, trevrosen, nathany, zmichaelh, and everyone else who made this release possible.

Documentation

We are now generating proper godoc docs from our code. In addition, we're constantly updating the Gobot docs site with additional info to keep them up-to-date. You can find the latest info on the docs page.

Issues

If you find any issues with Gobot, please let us know! We try to be on IRC (#gobotio on freenode) as much as possible, but if we're not around leave us a GitHub issue and we'll get back to you as soon as possible.

Stay In Touch

Please follow us on Twitter at @gobotio for the latest updates, as we continue to work on this amazing platform.

Sep
24
2014

Run Golang On The Intel Edison With Gobot

by Ron Evans & Adrian Zankich

The Gobot team was in attendance at the recent Intel Developer Forum in San Francisco, and we were able to get one of the new Intel Edison single board computers. Our mission: get Golang running on the Edison, so we can use it with Gobot for robotics or connected devices.

The Edison is a very small System-on-Chip (SoC) single board Linux computer. Its dual-core Atom processor, 1GB of RAM, and built-in WiFi/Bluetooth LE all make it a very powerful machine in a very tiny package. The base Edison itself requires that at least one of the Edison's breakout boards, known as "blocks", be connected via the 70-pin Hirose connector. This is rather different from most other single-board computers. This extreme modularity is a very interesting design approach, and Sparkfun has an entire line of blocks that will be coming out in the coming weeks.

We had previously tried running Golang code on the Intel Galileo when we first got our Gen1 board a few months ago, but were unable to run anything compiled in Golang on it at all, due to the Galileo not supporting the MMX instruction set.

Once we got ahold of the Edison, we immediately retired to a corner of the conference, and set to work putting the new board through its paces. The results were successful! The Edison is able to run Go code.

Of course, for us running Golang was just the beginning. We wanted to use the Edison's many bult-in GPIO & i2c pins, so we can communicate with many devices.

So we rolled up our sleeves, and got to work. In many cases, we made good progress from reading the code helpfully provided by the Intel IoT team's MRAA library. In others, we were simply blazing a trail of code.

With that, we now present to you gobot-intel-iot, our support in Gobot for the Edison board's wonderful capabilities.

Here is a short video using Gobot to control the Edison's GPIO for reading analog input, and then using PWM output to turn on the LED:

Here is the code we used to run the above sample:

import (
  "fmt"

  "github.com/hybridgroup/gobot"
  "github.com/hybridgroup/gobot/platforms/gpio"
  "github.com/hybridgroup/gobot/platforms/intel-iot/edison"
)

func main() {
  gbot := gobot.NewGobot()

  edisonAdaptor := edison.NewEdisonAdaptor("edison")
  sensor := gpio.NewAnalogSensorDriver(edisonAdaptor, "sensor", "0")
  led := gpio.NewLedDriver(edisonAdaptor, "led", "3")

  work := func() {
    gobot.On(sensor.Event("data"), func(data interface{}) {
      brightness := uint8(
              gobot.ToScale(gobot.FromScale(float64(data.(int)), 0, 4096), 0, 255),
      )
      fmt.Println("sensor", data)
      fmt.Println("brightness", brightness)
      led.Brightness(brightness)
    })
  }

  robot := gobot.NewRobot("sensorBot",
    []gobot.Connection{edisonAdaptor},
    []gobot.Device{sensor, led},
    work,
  )

  gbot.AddRobot(robot)

  gbot.Start()
}

We also have implemented i2c support. In the following video, we are showing an Edison, running Gobot, reading analog input, and then communicating via i2c with a BlinkM.

Here is the code:

package main

import (
  "fmt"

  "github.com/hybridgroup/gobot"
  "github.com/hybridgroup/gobot/platforms/intel-iot/edison"
  "github.com/hybridgroup/gobot/platforms/gpio"
  "github.com/hybridgroup/gobot/platforms/i2c"
)

func main() {
  gbot := gobot.NewGobot()

  edisonAdaptor := edison.NewEdisonAdaptor("edison")
  blinkm := i2c.NewBlinkMDriver(edisonAdaptor, "blinkm")
  sensor := gpio.NewAnalogSensorDriver(edisonAdaptor, "sensor", "0")

  work := func() {
    gobot.On(sensor.Event("data"), func(data interface{}) {
      brightness := uint8(
        gobot.ToScale(gobot.FromScale(float64(data.(int)), 0, 4096), 0, 255),
      )
      fmt.Println("sensor", data)
      fmt.Println("brightness", brightness)
      blinkm.Rgb(0, brightness, 0)
    })
  }

  robot := gobot.NewRobot("sensorBot",
    []gobot.Connection{edisonAdaptor},
    []gobot.Device{blinkm, sensor},
    work,
  )

  gbot.AddRobot(robot)

  gbot.Start()
}

Here is how we got it "go"-ing, if you will. You must first configure your local Go environment for 386 linux cross compiling:

$ cd $GOROOT/src
$ GOOS=linux GOARCH=386 ./make.bash --no-clean

Then compile your Go program, like this:

$ GOARCH=386 GOOS=linux go build edison_blink.go

Then you can simply upload your program over the network from your host computer to the Edison

$ scp edison_blink [email protected]:/home/root/

and execute it on your Edison itself, by SSHing in, and running it

$ ./edison_blink

We are very excited about the possibilities of this new board from Intel, now that we can run Golang and Gobot on it!

Please follow us on Twitter at @gobotio to keep up to date on the latest news and information about Golang powered robotics using Gobot.

Aug
08
2014

Flying Iris At Distill 2014

by Ron Evans

Team Gobot was speaking at the Distill 2014 conference in San Francisco this week. Held at the Palace of Fine Arts, we were very lucky to fly a 3DRobotics Iris around using a pre-release of our new support of the Mavlink protocol for Unmanned Aerial Vehicles (UAVs).

During a group photo that took place the day after our talk about "The 10 Rules of RobotOps", we had a golden opportunity to fly around a little inside the facility, and captured some rather unique footage, as you can see above.

We will be releasing our code for the Golang MAVLINK generator, along with gobot-mavlink itself, very soon. Here is a little taste of what we can do:

package main

import (
  "fmt"
  "net/http"
  "strings"

  "github.com/hybridgroup/gobot"
  "github.com/hybridgroup/gobot/api"
  "github.com/hybridgroup/gobot/platforms/mavlink"
  common "github.com/hybridgroup/gobot/platforms/mavlink/common"
)

type telemetry struct {
  Status    string
  Roll      float32
  Yaw       float32
  Pitch     float32
  Latitude  float32
  Longitude float32
  Altitude  int32
  Heading   float32
}

func main() {
  if gobot.Version() != "0.7.dev" {
    panic("this requires the dev branch!")
  }

  summary := &telemetry{Status: "STANDBY"}
  gbot := gobot.NewGobot()

  a := api.NewAPI(gbot)

  a.Get("/mavlink/:a", func(res http.ResponseWriter, req *http.Request) {
    path := req.URL.Path
    t := strings.Split(path, "/")
    buf, err := Asset("assets/" + t[2])
    if err != nil {
      http.Error(res, err.Error(), http.StatusNotFound)
      return
    }
    t = strings.Split(path, ".")
    if t[len(t)-1] == "js" {
      res.Header().Set("Content-Type", "text/javascript; charset=utf-8")
    } else if t[len(t)-1] == "css" {
      res.Header().Set("Content-Type", "text/css; charset=utf-8")
    }
    res.Write(buf)
  })

  adaptor := mavlink.NewMavlinkAdaptor("iris", "/dev/ttyACM0")
  iris := mavlink.NewMavlinkDriver(adaptor, "iris")

  work := func() {

    iris.AddEvent("telemetry")

    gobot.Once(iris.Event("packet"), func(data interface{}) {
      fmt.Println(data)
      packet := data.(*common.MAVLinkPacket)

      dataStream := common.NewRequestDataStream(10,
        packet.SystemID,
        packet.ComponentID,
        0,
        1,
      )
      iris.SendPacket(common.CraftMAVLinkPacket(packet.SystemID,
        packet.ComponentID,
        dataStream,
      ))
    })

    gobot.On(iris.Event("message"), func(data interface{}) {

      fmt.Println("message: ", data.(common.MAVLinkMessage).Id())
      if data.(common.MAVLinkMessage).Id() == 0 {
        statusCodes := map[uint8]string{
          1: "BOOT",
          2: "CALIBRATING",
          3: "STANDBY",
          4: "ACTIVE",
          5: "CRITICAL",
          6: "EMERGENCY",
          7: "POWEROFF",
          8: "ENUM_END",
        }
        summary.Status = statusCodes[data.(*common.Heartbeat).SYSTEM_STATUS]
        if summary.Status != "" {
          gobot.Publish(iris.Event("telemetry"), summary)
        }
      }

      if data.(common.MAVLinkMessage).Id() == 30 {
        roll := data.(*common.Attitude).ROLL
        pitch := data.(*common.Attitude).PITCH
        yaw := data.(*common.Attitude).YAW

        if roll < 4 || roll > -4 {
          summary.Roll = (roll * 180 / 3.14)
        }
        if yaw < 4 || roll > -4 {
          summary.Yaw = (yaw * 180 / 3.14)
        }
        if pitch < 4 || roll > -4 {
          summary.Pitch = (pitch * 180 / 3.14)
        }
        gobot.Publish(iris.Event("telemetry"), summary)
      }

      if data.(common.MAVLinkMessage).Id() == 33 {
        summary.Latitude = float32(data.(*common.GlobalPositionInt).LAT) / 10000000.0
        summary.Longitude = float32(data.(*common.GlobalPositionInt).LON) / 10000000.0
        summary.Altitude = data.(*common.GlobalPositionInt).ALT
        summary.Heading = float32(data.(*common.GlobalPositionInt).HDG) / 100
        gobot.Publish(iris.Event("telemetry"), summary)
      }
    })
  }

  gbot.AddRobot(gobot.NewRobot("irisBot",
    []gobot.Connection{adaptor},
    []gobot.Device{iris},
    work,
  ))

  a.Start()
  gbot.Start()
}

Want to keep up to date on the latest news and information about Gobot? Please follow us on Twitter at @gobotio!

Jul
11
2014

Gobot 0.6 is out!

by Adrian Zankich

Here's a overview of the changes, but if you want to see more check out the compare view on GitHub.

Changelog

  • api
    • Robeaux support: Robeaux is now included with the api package thanks to go-bindata. For more information check out the README
  • core
    • Refactor Connection and Device:
      • Connections are now a collection of Adaptors
      • Devices are now a collection of Drivers
    • events:
      • Add Event(string) function instead of Events[string] for retrieving Driver event
      • Add AddEvent(string) function to register an event on a Driver
  • firmata
    • Fix slice bounds out of range error
  • sphero
    • Fix issue where the driver would not halt correctly on OSX

Contributors

A huge thanks to our contributors who made this release possible.

Documentation

We're constantly updating the Gobot docs to keep them up-to-date. You can find the latest info on the docs page.

Issues

If you find any issues with Gobot, please let us know! We try to be on IRC (#gobotio on freenode) as much as possible, but if we're not around leave us a GitHub issue and we'll get back to you as soon as possible.

Jun
18
2014

Gobot 0.5 is out!

by Adrian Zankich

We're happy to announce the release of Gobot 0.5! This release is the culmination of lessons learned at GopherCon and many weeks of hard work.

Here's a overview of the changes, but if you want to see more check out the compare view on GitHub.

Changelog

  • Idomatic clean up: All files and tests have been refactored and ran through golint

  • Removed reflections throughout packages: We used reflection in a few situations to retrieve elements from structs and execute functions. Those reflections have been removed in favor in better interface design

  • All officially supported platforms are now in ./platforms: Instead of each platform being in a seperate repo, they are all now included in the main Gobot repo.

  • API is now a new package ./api: The RESTful API is now in a seperate api package and must be explicitely imported for use in your Gobot program.

  • All platforms examples are in ./examples: All examples has now been moved into a shared examples folder.

  • Replaced martini with net/http: We no longer use Martini as our API server, and now use the standard net/http package with pat as our pattern muxer.

  • Replaced ginkgo/gomega with system testing package: We now use the system testing package for testing

  • Refactor gobot/robot/device commands: User defined API commands have been completely refactored and now have an easier definition. You may now attach a command to your robot like this

  • Added Event type: Added a new type for registering and responding to device events

  • Replaced Master type with Gobot type: The Master type is now known as Gobot

  • Every and After now accept time.Duration

  • Removed reflection helper methods: We had a few helper methods for retrieveing fields from structs and executing functions on structs. Those have been removed.

  • And many more small changes throughout the system

Contributors

A huge thanks to our contributors who made this release possible. And a special thanks to Matt Aimonettit and Jeremy Saenz!

Documentation

We're constantly updating the Gobot docs to keep them up-to-date. You can find the latest info on the docs page.

Issues

If you find any issues with Gobot, please let us know! We try to be on IRC (#gobotio on freenode) as much as possible, but if we're not around leave us a GitHub issue and we'll get back to you as soon as possible.

Apr
29
2014

Taking The Stage At GopherCon

by Ron Evans

We just left the amazing GopherCon in Denver, the first conference dedicated to the Go programming language. A remarkable array of speakers and attendees were present, including Rob Pike and many members of the Golang core team.

It was a great honor for Team Gobot to be invited to speak to such an illustrious crowd, and we worked hard to prepare some demos worthy of the event. When you do live coding of flying objects, there is of course, always some element of aerial risk. However, the talk went off without a hitch! We will post a link once the video is online.

One new demo we've added, is running Gobot on the ARDrone's own internal board in parallel to their firmware, while controlling it using a different Gobot running on a separate computer controlling the drone. How meta!

The next day was the open hack day, and we brought lots of Sphero robots to play with. It was especially fun and exciting to pair up with the master himself. When Rob Pike sat down to play, and to help us improve our code, we were giddy to say the least. Thanks, Rob!

Thank you to the conference organizers, staff, the other presenters, and especially the attendees for making it a great experience. We really enjoyed showing our robotics road show to so many of the best and brightest in the Golang community.

Please follow us on Twitter at @gobotio to keep up to date on the latest news and information, as the community continues to work together on Golang powered robotics using Gobot.

Apr
10
2014

National Robotics Week at Boston Golang

by Ron Evans

Continuing our robot road show in recognition of National Robotics Week, we brought Gobot (http://gobot.io) our Golang robotics framework, to Boston to speak to BostonGolang. Boston has a thriving technology community, and we were happy to present our work to one of the most quickly growing meetup groups focusing on the Go programming language.

Held at the Akamai offices in Cambridge, we had just introduced our new "10 Rules Of Robot Ops" site earlier in the day, so we used that as the theme for the talk. We had also just finished support for the Neurosky Mindwave Mobile EEG, and it was neat to incorporate Brain-Computer Interfaces (BCI). We also demoed our Golang powered version of Conway's Game of Life using Sphero robots.

Thanks to all of you who came out to see us, we had a great time sharing our latest work with Boston's Golang community of enthsuiasts!

Please follow us on Twitter at @gobotio for the latest news and information, as we continue to work on this exciting platform.

Oct
21
2013

Go, Gobot, Go! Golang Powered Robotics

by Ron Evans

We are very excited to introduce Gobot (http://gobot.io), a new and powerful open source robotics platform written using the Go programming language. Go has remarkable abilities when it comes to massive concurrency with only modest use of system resources. In addition, the expressive nature of the programming language makes it really nice code to work with.

Our team will post here with all our exciting developments, as well as anything else of interest to the robot community. We've got a lot of plans in store for all of you, our dear users, so please follow us on Twitter at @gobotio to follow our progress.