Robot Not a Dev? Buy Now
Not a Dev?

Misty Community Forum

Training Mission: Explore Misty's .NET SDK

Mission Objective: Set up your environment and explore the examples in the IntroSkills sample project to learn how to build and deploy skills with Misty’s .NET SDK
Mission Type: Training
Launch Date: 12/03/2019
End Date: Ongoing

Mission Overview

Misty’s .NET SDK (Beta) is here, and with it comes an advanced set of tools for building mission critical skills with Visual Studio and the .NET framework. As a quick intro, here are a few things the .NET SDK provides:

  • Powerful libraries for building skills with C#
  • Project template for setting up your own .NET skill projects with Visual Studio
  • Ability to use external .NET libraries for advanced local handling of sensor data & other input
  • Preview of a mock robot API for simulating event data & command responses, so you can test skills without deploying them to a robot

We’re eager for the community to start using these tools, which is why we chose .NET as the focus of this set of Missions!

Mission Details

As with other Missions, this one comes in two parts: a training mission, and a competitive challenge.

The training mission – the mission you’re reading now – is all about setting up your environment to build .NET skills for Misty. You’ll learn about the structure of a .NET skill by exploring the documentation and experimenting with the IntroSkills sample project. You’ll also install the Misty Skills Extension for Visual Studio, which will make it easier to start building your own .NET skills from scratch. Then, put what you’ve learned to the test by building and sharing your own .NET skill in the competitive part of the mission.

The guide below includes a set of activities you can work through to set up your environment and get familiar with the .NET SDK. These activities will give you a taste of how to use the SDK before you start working on the challenge portion of the mission.

  1. First things first. Start by setting up your environment to use the .NET SDK. Follow the steps in our Getting Started guide to install/modify Visual Studio with all the workloads and components for building .NET skills.
  2. When you have Visual Studio installed, download the C# Skill Template. The template makes it easy to create a new C# project with the background task and skill code files you need to build a .NET skill.
  3. Now for the fun part. Along with the SDK itself, we’ve prepared a sample project with several runnable C# skills that you can explore to learn about the different features of Misty’s .NET SDK. Clone or download the .NET-SDK repo from GitHub, then check out the docs and run through the contents of the IntroSkills sample project. This is a great sandbox for learning about the structure of a .NET skill, and you’ll find many examples of different ways to do things like issue commands, register event listeners, and validate event data.

Once you’re comfortable with the inner-workings of the .NET SDK, join the challenge to build and share your own .NET skill for Misty!

Other Materials

In addition to the above, the following resources will aid you on this mission:

  • Skill Class Members - Provides an overview of the required elements of your .NET skill code.
  • Command Syntax - Examples of the different ways to issue a command from a .NET skill.
  • Data Handling - Examples of the different ways to register and unregister event listeners and handle event messages with callbacks.
  • File System Access - Describes how to access files stored in Windows “Known Folders” from your .NET skill code.
  • Creating a .NET Skill App Package - Describes how to build an app package so you can deploy .NET skills from Skill Runner

Mission Support

Hit a roadblock? Find a bug? Have feedback? Let us know! As Misty’s earliest developers, you are the real superstars on the journey to making personal robots a reality. Your creativity makes all this possible, and we’re eager to hear your feedback. Reply to this post to start a conversation with a member of the Misty team.

Hi Johnathan,

I successfully ran a .NET skill on Misty with my VS2019. It’s safe to say the SDK installation procedure, tool and sample CS programs should work well for anyone currently using VS2017 and planning to upgrade to VS2019 in the future. I like this .NET version of Misty SDK. I’ll work on some new skill in .NET to demo.

Thanks,
Phillip

1 Like

Awesome. Can’t wait to see it!

The video @Chris posted helped me out, and I was able to get a C# Skill to Misty, and run it.
Link here: 2019.12.04 - Misty Uplink: C# SDK Discussion with Misty's Sr. Software Engineer

I am using Visual Studio Community 2019. My non-developer skills are showing here, and the jump from JavaScript to C# and from Visual Studio Code to Visual Studio 2019 is a little intimidating. One immediate question I have: When a .NET SDK Skill is posted to github, what should the directory structure look like and how many files? Is it the whole repo directory? Following the example in the video, I have a MistyCSharpSkillGettingStarted directory. Does the entire directory go to Github?

With JavaScript Misty Skills there are 2 files, a js and a json file. I want to keep it simple and just do one (simple) C# skill.

And if this is a really newbie question, and I should be able to figure this out on my own, just tell me to go figure it out. :slight_smile:

It’s probably easiest to publish your .NET skill project to GitHub directly from Visual Studio. This ought to ensure the relevant files are included for developers who want to deploy the skill from Visual Studio or create an app package for deployment via Skill Runner. (I’m using 2017 for these screenshots, but I’d expect the steps for 2019 to be pretty close to this.)

  1. Follow this guide to creating a new, empty repository on GitHub, but do not select the option to initialize the repo with a README or .gitignore file.
  2. Open the solution for your .NET skill project in Visual Studio.
  3. If you haven’t already initialized a Git repository for the project, then select FileAdd to source control from the top menu.
    aaa
    You should see a message in the console that reads something like this:
  4. Select ViewTeam Explorer
    aac
  5. In Team Explorer, click Sync.
  6. In the Team Explorer, you should see an option Push to Remote Repository. Click Publish Git Repo under this option and enter the URL for the empty GitHub repo you created in step 1. Should be something like https://github.com/githubUsername/repoName.git
    aad
  7. Click Publish.
  8. Share the heck out of it in the Misty Community site :slight_smile:
1 Like