codaris / Anki.Vector.SDK

The Anki Vector .NET SDK provides programmicatic access to the Vector Robot from .NET and is published as a NuGet package.
Apache License 2.0
74 stars 19 forks source link

How can i connect with wirepod vector? #10

Open hgedik opened 1 month ago

hgedik commented 1 month ago

How can I connect to vector connected to wirepod? Is it possible to use it this way?

codaris commented 1 month ago

I actually do have an in-development version of this SDK that can connect to wirepod vectors. Maintaining this SDK and related applications has not been a priority and I haven't been keeping up too much on the state of wirepod so I don't know if it still works.

I really need to setup my wirepod environment and give it another test.

hgedik commented 1 month ago

Hi codaris,

I can connect to vector on wirepod now. I'm writing about how I did it to serve as an example to others.

var robotConfiguration = new RobotConfiguration
{
    IPAddress = new IPAddress(new byte[] { X, X, X, X }), //vector ip
    RemoteHost = "http://X.X.X.X:8080/", // wirepod ip
    SerialNumber = "XXXXXXXX",  // vector serial
    RobotName = "Vector-XXXX", // vector name 
    Guid = "XXXXX", // vector guid from \AppData\Roaming\wire-pod\jdocs\botSdkInfo.json
    Certificate = "-----BEGIN CERTIFICATE-----XXXXXXXX-----END CERTIFICATE-----\n" //vector certificate from \AppData\Roaming\wire-pod\session-certs\{vectorSerial} file
};

try
{
    using (var robot = await Robot.NewConnection(robotConfiguration, 10000))
    {
        await robot.Control.RequestControl();
        await robot.Behavior.SayText("Hello World");
    }
}

Thanks :)