Skip to content

julio-matarranz/xpider

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a first cut at a driver for the Xpider robot for golang.

Picture of a Xpider Robot

There are a few assumptions:

* You've already connected to the Xpider WIFI
	* Xpider_XXX, Pass: 12345678
* The Xpider is listening for commands on the IP address 
	* 192.168.100.1

This driver does not capture the video feed from the robot, to do this you'll needa to fire up a connection to rtsp://admin:[email protected]:554/cam1/h264

Getting started

	go get github.com/celer/xpider

Connect to the robot

To get to this point you'll need to connect to the wifi network that the Xpider robot uses, mine appears as Xpider_242, yours will probably look similar. The robot is simply listening on an IP address on the network it's setup.

	// Connect to the xpider
	x := &xpider.Controller{}
	err := x.Connect("192.168.100.1:80")
	if err != nil {
		panic(err)
	}

Send a command to the robot

	// Set our front LEDs to be green and red
	x.FrontLED(0, 0xFF, 0, 0xFF, 0, 0)

	// Move to some location
	x.AutoMove(100, r, 100, 10)

Get the state of the robot

	state:=x.GetState()
	fmt.Printf("Observed Distance %d\n", state.ObsticalDistance)

See examples/ for examples

About

Golang Xpider Controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%