NOTE: This project is under active development.
This repository builds the native components as a nuget package or Unity Package Manager package required to support ROS2 on UWP devices and Hololens. The related project ros_msft_mrtk, contains a Unity Project, ROS2.net utilities, and Mixed Reality Toolkit assets for Robotics. These projects can be used independently.
This project builds a nuget package named Microsoft.ROS.MRTK. available from the github release on this repository.
To consume the nuget package from a UWP application:
- Download the native nuget package from the github release.
- Move the downloaded nuget package to a folder on your computer.
- In Visual Studio, Create a
local
Nuget Feed by selectingTools
->Nuget Package Manager
->Package Manager Settings
, then selectingPackage Sources
. - Locate Microsoft.ROS.MRTK.Foxy, and install it from the Nubet Package Manager.
- Now you can initialize it and perform pub/sub or use Action Client.
A Native sample project for consuming the nuget package is available in the examples
directory, allowing a UWP native application to consume ROS2 libraries directly.
This project also builds and publishes a Unity Package Manager package to the npm compatible Azure Artifact Feed for ROS
To consume the output from a Unity application, follow the instructions on the Unity documentation for adding a new feed, and installing Microsoft.ROS.MRTK.Foxy
into your project.
Building ROS2 & ROS2.net for UWP requires multiple passes, ultimately generating a nuget package or Unity package manager package.
Please install ROS2 Foxy for Windows according to the instructions. (Some of the ROS tooling is required and referenced during the builds.)
Create a shortcut for building without a ROS2 environment, such as:
C:\Windows\System32\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
This repo depends on vcpkg being checked out into c:\opt
:
mkdir c:\opt
cd c:\opt
git clone https://github.com/ooeygui/vcpkg
mkdir c:\ws
cd c:\ws
git clone -b foxy https://github.com/ms-iot/ros_msft_mrtk_native
cd c:\ws\ros_msft_mrtk_native
inittree.cmd
If you only intend to target one architecture, you can pass one of /x86
, /x64
, /arm
, /arm64
, /unity
. Passing no argument will instruct the build scripts to generate binaries for all platforms. The /unity
flag creates a build of ROS2 which works within the Unity Editor or Windows Desktop Mixed Reality Application.
initvcpkg.cmd [/x86 | /x64 | /arm | /arm64 | /unity]
inittools.cmd [/x86 | /x64 | /arm | /arm64 | /unity]
NOTE: there is a sequencing problem with message generation and the .net generator; you may need to build the tree twice to generate messages.
build.cmd [/x86 | /x64 | /arm | /arm64 | /unity]
build_nuget.cmd [/x86 | /x64 | /arm | /arm64 | /unity]
build_upm.cmd [/x86 | /x64 | /arm | /arm64 | /unity]
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
This project is built on the amazing work by Open Robotics, the ROS2 technical steering committee, eProsima, the ROS2.net developers, and the ROS community.