SpotSharp 0.1.2
dotnet add package SpotSharp --version 0.1.2
NuGet\Install-Package SpotSharp -Version 0.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpotSharp" Version="0.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SpotSharp --version 0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SpotSharp, 0.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SpotSharp as a Cake Addin #addin nuget:?package=SpotSharp&version=0.1.2 // Install SpotSharp as a Cake Tool #tool nuget:?package=SpotSharp&version=0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Spot Sharp
This library is a third party implementation of .NET client for Spot robot of Boston Dynamics.
How to Use
Procedure
- Use
Robot.Connect(SPOT_URI, CLIENT_NAME, USERNAME, PASSWORD)
to create a Robot object, which represents an established connection to Spot. - Use
GetService<SERVICE_CLIENT_TYPE>(OPTIONAL_SERVICE_AUTHORITY)
on the Robot object, to get a client instance for the specified service. - (Optional) Invoke
UpdateToken()
method on the Robot object to refresh the token.
Example
The following code example shows how to list all available services on Spot.
var ip = "YOUR_SPOT_IP";
var client = "YOUR_CLIENT_NAME";
var username = "YOUR_USERNAME";
var password = "YOUR_PASSWORD";
var robot = await Robot.Connect(new Uri($"https://{ip}:443"),
client, username, password);
Console.WriteLine("Connected.");
var service = robot.GetService<DirectoryService.DirectoryServiceClient>();
var response = await service.ListServiceEntriesAsync(new ListServiceEntriesRequest()
{
Header = robot.Header
});
foreach (var entry in response.ServiceEntries)
{
Console.WriteLine($"{entry.Name} - #{entry.Type} - @{entry.Authority}");
}
Console.WriteLine("Robot Connected.");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Google.Protobuf (>= 3.26.1)
- Grpc.Net.Client (>= 2.63.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Current version contains generated Spot API protocol files and a `Robot` class to manage the connection to Spot.
Future versions will probably provide encapsulation of more functions.