GithubHelp home page GithubHelp logo

binhnguyen1984 / spot.net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharks-interactive/spot.net

0.0 0.0 0.0 1.34 MB

๐Ÿ•A .NET SDK for communicating with Boston Dynamics Robots from C#.

License: MIT License

C# 100.00%

spot.net's Introduction

Spot .NET logomark

npm version npm downloads license

Spotโ€‹โ€‹ .NET

Spot .NET is a lightweight C# SDK for controlling Boston Dynamics robots.

Functionality

  • Easily connect and authenticate to multiple robots of different types over grpc connection
  • Support for commands for standing, sitting, walking and more!
  • Containerised and easily extensible commands for adding new functionality
  • Full C# compiled Boston Dynamics protobufs, for building out your own commands
  • Exposes authenticated Spot Channel to add your own functionality such as receiving data from Spot

Usage:

PM:

Install-Package Spot.NET -Version 0.1.0

.NET CLI:

dotnet add package Spot.NET --version 0.1.0

Package Reference:

<PackageReference Include="Spot.NET" Version="0.1.0" />

Quick Examples:

Connecting to Spot

using Sharks.Spot;

// Or whatever your entrypoint/function is
public static int main()
{
	// Create Spot Robot object with credentials to authenticate with it
	Robot Spot = new Robot(
		new ContactInfo()
		{
			Credentials = new RobotCredentials
			{
				Username = "SpotUsername",
				Password = "SpotPassword",
				Address = "192.168.0.0:443"
			}
		},
		"Program Name"
	);

	// When your ready call connect to create the authenticated channel
	Spot.Connect();

	// Calling this will aquire a lease if we haven't already
	Sit(Spot); // Call a sit command on the Robot we've connected to
}

Walk (with callback)

using Sharks.Spot;

// Or whatever your entrypoint/function is
public static int main()
{
	// Create Spot Robot object with credentials to authenticate with it
	Robot Spot = new Robot(
		new ContactInfo()
		{
			Credentials = new RobotCredentials
			{
				Username = "SpotUsername",
				Password = "SpotPassword",
				Address = "192.168.0.0:443"
			}
		},
		"Program Name"
	);

	Spot.Connect();

	// Api subject to change
	Walk(Spot, 5.0f, Direction.Forwards, WalkFinishedCallback);
}

private void WalkFinishedCallback()
{
	Console.WriteLine("Done walking!");
}

Features:

  • .Connect() authenticates and connects to a Robot
  • AquireLease(Robot) Gets a lease for the given robot
  • Sit(Robot) sends a command for a Robot to sit
  • Stand(Robot) sends a command for a Robot to stand
  • Walk(Robot, Distance, Direction, Callback(optional)) sends a command for a Robot to walk
  • .Shutdown() disconnects from a Robot and cleans up all channels
  • .ContactInfo struct with all the information you need to contact a Robot for custom commands

Options (Required)

Option Type Description
ContactInfo ContactInfo A struct containing all the necessary credentials to talk and authenticate with the Robot.

How it works:

This library opens an authenticated GRPC channel to a Robot and contains Boston Dynamics protobufs compiled to C#, allowing you to send whatever commands you want to it.

Read the wiki for extra documentation.

Project created and maintained by Sharks Interactive.

Developing:

  • Commit to staging and pr to prod for changes

Code Style:

  • Continuous Integration will handle formatting for you.. Eventually. Do your best to adhere to what's already there if you're contributing.

Acknowledgements:

README.MD and general SDK structure, styling, practices etc, modelled after and taken from the excellent Toucan-JS

spot.net's People

Contributors

sharkgamedev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.