hybridgroup.gobot/platforms/parrot/bebop
Thomas Kohler a8f47eaae8
build(go, deps): switch to Go 1.22 and update modules (#1093)
2024-11-01 12:54:20 +01:00
..
client build(go, deps): switch to Go 1.22 and update modules (#1093) 2024-11-01 12:54:20 +01:00
LICENSE Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
README.md examples: fix missing checks of return values (#1060) 2024-02-11 15:34:50 +01:00
bebop_adaptor.go neurosky: use serialport adaptor and move driver to drivers/serial (#1061) 2024-02-12 16:27:08 +01:00
bebop_adaptor_test.go lint(all): fix issues of errorlint etc (#1037) 2023-11-15 20:51:52 +01:00
bebop_driver.go lint(all): fix issues of errorlint etc (#1037) 2023-11-15 20:51:52 +01:00
bebop_driver_test.go lint(all): fix issues of errorlint etc (#1037) 2023-11-15 20:51:52 +01:00
doc.go doc: update links to release or tagged branch (#1069) 2024-02-13 15:58:31 +01:00
pitch.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
pitch_test.go test(all): switch to test package stretchr testify (#1006) 2023-10-20 10:27:09 +02:00
test_helper.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00

README.md

Bebop

The Parrot Bebop and Parrot Bebop 2 are inexpensive quadcopters that can be controlled using their built-in API commands via a WiFi connection. They include a built-in front-facing HD video camera, as well as a second lower resolution bottom-facing video camera.

How to Install

Please refer to the main README.md

How to Use

package main

import (
  "time"

  "gobot.io/x/gobot/v2"
  "gobot.io/x/gobot/v2/platforms/parrot/bebop"
)

func main() {
  bebopAdaptor := bebop.NewAdaptor()
  drone := bebop.NewDriver(bebopAdaptor)

  work := func() {
    drone.HullProtection(true)
    drone.TakeOff()
    gobot.On(drone.Event("flying"), func(data interface{}) {
      gobot.After(3*time.Second, func() {
        drone.Land()
      })
    })
  }

  robot := gobot.NewRobot("drone",
    []gobot.Connection{bebopAdaptor},
    []gobot.Device{drone},
    work,
  )

  if err := robot.Start(); err != nil {
		panic(err)
	}
}

How to Connect

By default, the Parrot Bebop is a WiFi access point, so there is no additional work to establish a connection to a single drone, you just connect to it.

Once connected, if you want to stream drone video you can either:

  • Use the RTP protocol with an external player such as mplayer or VLC.
  • Grab the video frames from the drone's data frames, and work with them directly.