Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 1409b68

Browse files
authored
Docs and Prefabs (#15)
* Update for Foxy * Update onboarding docs (not quite ready); Start porting pinning * First Pass Space Pinning Refactor to QR Code * Spatial Lidar Visualization fixes. * Docs and Prefabs
1 parent d9ef6b3 commit 1409b68

12 files changed

+788
-15
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*.userosscache
1212
*.sln.docstates
1313

14+
upm/com.microsoft.ros_mrtk/*.tgz*
1415

1516
# User-specific files (MonoDevelop/Xamarin Studio)
1617
*.userprefs

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ and the SDK NuGet package adheres to [Semantic Versioning](http://semver.org/spe
77
Refer to the [Getting Started](https://github.com/microsoft/MapsSDK-Unity/wiki/Getting-started) documentation for instructions about how to import and upgrade the SDK.
88
# Mixed Reality Toolkit for ROS
99

10+
## 0.0.1 - ROSWorld 2021
11+
* Spatial Pinning
12+
* Lidar Visualization
13+
* Simulated Sensor data
14+
1015
## 0.0.0 - Bootstrap

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Microsoft IoT
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+72-9
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,98 @@
11
# Mixed Reality Toolkit for ROS2 Overview
22
> The MRTK for ROS is being developed in the open: Feature requests are very much welcome at the [issues page](https://github.com/ms-iot/ros_msft_mrtk/issues).
33
4-
The Robot Operating system - also called ROS [^1] - is an open source middleware for creating Robots. This repository implements glue which connects your Mixed Reality Robotics application with Robots and infrastructure running using ROS2. It works with [ROS2.net](https://github.com/ros2-dotnet/ros2_dotnet) within the Unity Game engine.
4+
The Robot Operating system - also called ROS [^1] - is an open source middleware for creating Robots. This repository implements glue which connects your Mixed Reality Robotics application with Robots and infrastructure using ROS2. ROS2 runs directly on the Hololens without going through ROS Bridge - reducing latency and improving network efficiency.
5+
The ROS2 MRTK extension works with [ROS2.net](https://github.com/ros2-dotnet/ros2_dotnet)[^2] within the Unity Game engine, allowing you to write ROS2-like code directly in Unity.
56

67
The Mixed Reality Toolkit is an Open Source framework for building Virtual Reality and Augmented Reality applications, which target numerous platforms - including Hololens.
78

8-
The MRTK for ROS Unity Extension is being developed by the ROS2.net maintainers, the Microsoft Edge Robotics team and the Mixed Reality Robotics team.
9+
## Getting started with ROS2 on Hololens 2.
910

10-
## Getting started with ROS2 on Hololens.
11-
This depends on [ROS2 Foxy UPM supplied by Microsoft](http://aka.ms/ros/mrtk_native). Windows is required for Hololens and Windows Mixed Reality development. MRTK for ROS development will not be supported on other platforms.
11+
This depends on [ROS2 Foxy UPM supplied by Microsoft](http://aka.ms/ros/mrtk_native). Windows is required for Hololens and Windows Mixed Reality development. MRTK for ROS2 development will not be supported on other platforms.
1212

1313
### Prerequsitites
1414
* [Unity 2020.3 or later](https://unity.com/)
1515
* [Microsoft Mixed Reality Toolkit](https://docs.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/?view=mrtkunity-2021-05)
1616
* [Nuget for Unity 3.02 or later](https://github.com/GlitchEnzo/NuGetForUnity/releases)
1717
* [Microsoft Mixed Reality QR Nuget](https://nuget.org/Packages/Microsoft.MixedReality.QR)
18+
* Download the Unity release for the ROS2 native from [http://aka.ms/ros/mrtk_native](http://aka.ms/ros/mrtk_native)
19+
* Download the Unity release for the Mixed Reality Toolit for ROS2 from [http://aka.ms/ros/mrtk](http://aka.ms/ros/mrtk)
1820

1921
### Create your application
2022

21-
* Create a 3D Unity application, and set up for Windows Mixed Reality using the instructions provided by the [Microsoft Mixed Reality Toolkit](https://docs.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/?view=mrtkunity-2021-05) documentation.
22-
* Add Nuget for unity to your application by double clicking the the `NuGetForUnity.3.0.2.unitypackage`. Restart Unity for this to take effect.
23+
* Create a 3D Unity application
24+
* Use the [Microsoft Mixed Reality Feature Tool](https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/welcome-to-mr-feature-tool), and select the following features:
25+
* Azure Mixed Reality Services
26+
* Azure Spatial Anchors SDK Core
27+
* Azure Spatial Anchors SDK for iOS
28+
* Azure Spatial Anchors SDK for Windows
29+
* Mixed Reality Toolkit
30+
* Mixed Reality Toolkit Extensions
31+
* Mixed Reality Toolkit Foundation
32+
* Mixed Reality Standard Assets
33+
* Mixed Reality Toolkit Tools
34+
* Platform Support
35+
* Mixed Reality OpenXR Plugin
36+
* Spatial Audio
37+
* Microsoft Spatializer
38+
* World Locking Tools
39+
* WLT Core
40+
* Wait for Unity to deploy these components.
41+
* If asked about the `new Input System`, select `Yes`.
42+
* When Unity restarts, you should now see a window titled `MRTK Project Configurator`
43+
* Select `Unity OpenXR Plugin`
44+
* Select `Show XR Plug-in Management`
45+
* In the new window, with the monitor icon on the tab, select `OpenXR`.
46+
* Switch to the Microsoft icon, ans select `OpenXR`
47+
* Close the Unity Configuration Window
48+
* Return to the `MRTK Project Configurator` Window and select `Apply Settings`, then select `Next`
49+
* Select `Microsoft Spatializer` in the `Audio Spatializer` dropdown, then click `Apply`
50+
* When Unity Restarts (again), Select the `Mixed Reality` Menu item, `Toolkit`, `Add to Scene and Configure`
51+
* Add Nuget for unity to your application by double clicking the the `NuGetForUnity.3.0.2.unitypackage`. Import the assets into your project.
2352
* In the Menu for Unity, select `NuGet`, then `Manage Packages`.
2453
* In the Search edit box, enter `Microsoft.MixedReality.QR`, then click search. Install 0.5.3 or later.
2554
* In the `Window` Menu, select `Package Manager`.
26-
* Select `+`, then `Add Package from Git Url`. enter `http://aka.ms/ros/mrtk_native`
27-
* Select `+`, then `Add Package from Git Url`. enter `http://aka.ms/ros/mrtk`
55+
* Select `+`, then `Add Package from tarball`. select the Unity release for ROS2 Native downloaded above.
56+
* Select `+`, then `Add Package from tarball`. select the Unity release for the Mixed Reality Toolkit for ROS2 downloaded above.
57+
* In the `Project` tree view in Unity, expand `ROS2 and ROS2.net Native components for Unity` and locate the `link.xml` file. Drag and copy this file into your asset folder.
58+
* This is needed to prevent optimizations which break ROS2.net Messages.
59+
60+
* Configure your project for Hololens:
61+
* Select `Edit` then `Project Settings`
62+
* Select `Player`. Select the Windows icon.
63+
* Under Capabilities, ensure that the following are checked:
64+
* InternetClient
65+
* InternetClientServer
66+
* PrivateNetworkClientServer
67+
* WebCam
68+
* Microphone
69+
* SpatialPerception
70+
* Select `File` Then `Build Settings`
71+
* Select `Add Open Scenes` to add your current scenes to the project.
72+
* Select `Universal Windows Platform` and `Switch Plaform` if needed.
73+
* Select `Build`
74+
* In the save dialog, right click on the background and select `New Folder`, name it `App`, ensure `App` is selected, then click `Select Folder`
75+
* Open the resulting Visual Studio Solution in the `App` folder
76+
* Configure Visual Studio
77+
* Select the `Release` build type. (This is important, as the ROS2 binaries are only delivered as release)
78+
* Select `ARM64`.
79+
* Build and Deploy
80+
81+
2882

2983
You can now add scenes from the ROS MRTK extension or use individual components in your application.
3084

85+
### Sample Scene to bootstrap your application
86+
One you have configured the application above, you can now add components to your scene to define your application. A Sample scene is provided which demonstrates spatial pinning and Lidar visualization.
87+
88+
* In the Unity Package Manager Window, select `ROS2 and ROS2.net Native components for Unity`.
89+
* Under the Samples dropdown, select `Basic ROS World` and select Import.
90+
* Drag this scene to the Unity Hierarchy Window.
91+
* Remove any existing scenes.
92+
93+
3194
# Contributions
3295
Contributions are welcome. Refer to the [Contribution Process](CONTRIBUTING.md) for more details.
3396

34-
3597
[^1]: ROS is a trademark of Open Robotics.
98+
[^2]: ROS2.net is maintained by the ROS2.net maintainers and community.

upm/com.microsoft.ros_mrtk/Examples/SpiralLidarPublisher.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using sensor_msgs.msg;
77

88

9-
public class SpiralLidar : MonoBehaviour
9+
public class SpiralLidarPublisher : MonoBehaviour
1010
{
1111
IPublisher<LaserScan> scanPub;
1212
LaserScan scan = new LaserScan();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_CorrespondingSourceObject: {fileID: 0}
8+
m_PrefabInstance: {fileID: 0}
9+
m_PrefabAsset: {fileID: 0}
10+
m_Name: Comet
11+
m_Shader: {fileID: 4800000, guid: 5bdea20278144b11916d77503ba1467a, type: 3}
12+
m_ShaderKeywords: _ALPHABLEND_ON _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT
13+
_DISABLE_ALBEDO_MAP _LIGHTMAPPING_REALTIME _SPECULAR_HIGHLIGHTS
14+
m_LightmapFlags: 1
15+
m_EnableInstancingVariants: 0
16+
m_DoubleSidedGI: 0
17+
m_CustomRenderQueue: 3000
18+
stringTagMap:
19+
RenderType: Transparent
20+
disabledShaderPasses: []
21+
m_SavedProperties:
22+
serializedVersion: 3
23+
m_TexEnvs:
24+
- _BumpMap:
25+
m_Texture: {fileID: 0}
26+
m_Scale: {x: 1, y: 1}
27+
m_Offset: {x: 0, y: 0}
28+
- _ChannelMap:
29+
m_Texture: {fileID: 0}
30+
m_Scale: {x: 1, y: 1}
31+
m_Offset: {x: 0, y: 0}
32+
- _DetailAlbedoMap:
33+
m_Texture: {fileID: 0}
34+
m_Scale: {x: 1, y: 1}
35+
m_Offset: {x: 0, y: 0}
36+
- _DetailMask:
37+
m_Texture: {fileID: 0}
38+
m_Scale: {x: 1, y: 1}
39+
m_Offset: {x: 0, y: 0}
40+
- _DetailNormalMap:
41+
m_Texture: {fileID: 0}
42+
m_Scale: {x: 1, y: 1}
43+
m_Offset: {x: 0, y: 0}
44+
- _EmissionMap:
45+
m_Texture: {fileID: 0}
46+
m_Scale: {x: 1, y: 1}
47+
m_Offset: {x: 0, y: 0}
48+
- _IridescentSpectrumMap:
49+
m_Texture: {fileID: 0}
50+
m_Scale: {x: 1, y: 1}
51+
m_Offset: {x: 0, y: 0}
52+
- _MainTex:
53+
m_Texture: {fileID: 0}
54+
m_Scale: {x: 1, y: 1}
55+
m_Offset: {x: 0, y: 0}
56+
- _MetallicGlossMap:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
- _NormalMap:
61+
m_Texture: {fileID: 0}
62+
m_Scale: {x: 1, y: 1}
63+
m_Offset: {x: 0, y: 0}
64+
- _OcclusionMap:
65+
m_Texture: {fileID: 0}
66+
m_Scale: {x: 1, y: 1}
67+
m_Offset: {x: 0, y: 0}
68+
- _ParallaxMap:
69+
m_Texture: {fileID: 0}
70+
m_Scale: {x: 1, y: 1}
71+
m_Offset: {x: 0, y: 0}
72+
m_Floats:
73+
- _AlbedoAlphaMode: 0
74+
- _AlbedoAssignedAtRuntime: 0
75+
- _BlendOp: 0
76+
- _BlendedClippingWidth: 1
77+
- _BorderLight: 0
78+
- _BorderLightOpaque: 0
79+
- _BorderLightOpaqueAlpha: 1
80+
- _BorderLightReplacesAlbedo: 0
81+
- _BorderLightUsesHoverColor: 1
82+
- _BorderMinValue: 0.1
83+
- _BorderWidth: 0.1
84+
- _BumpScale: 1
85+
- _ClippingBorder: 0
86+
- _ClippingBorderWidth: 0.025
87+
- _ClippingPlane: 0
88+
- _ClippingPlaneBorder: 0
89+
- _ClippingPlaneBorderWidth: 0.025
90+
- _ColorWriteMask: 15
91+
- _CullMode: 2
92+
- _CustomMode: 2
93+
- _Cutoff: 0.5
94+
- _DetailNormalMapScale: 1
95+
- _DirectionalLight: 1
96+
- _DstBlend: 10
97+
- _EdgeSmoothingValue: 0.002
98+
- _EmissionScaleUI: 0
99+
- _EnableChannelMap: 0
100+
- _EnableEmission: 0
101+
- _EnableHoverColorOpaqueOverride: 0
102+
- _EnableHoverColorOverride: 0
103+
- _EnableLocalSpaceTriplanarMapping: 0
104+
- _EnableNormalMap: 0
105+
- _EnableProximityLightColorOverride: 0
106+
- _EnableTriplanarMapping: 0
107+
- _EnvironmentColorIntensity: 0.5
108+
- _EnvironmentColorThreshold: 1.5
109+
- _EnvironmentColoring: 0
110+
- _FadeBeginDistance: 0.85
111+
- _FadeCompleteDistance: 0.5
112+
- _FadeMinValue: 0
113+
- _FluentLightIntensity: 1
114+
- _GlossMapScale: 1
115+
- _Glossiness: 0
116+
- _GlossyReflections: 1
117+
- _HoverLight: 0
118+
- _HoverLightOpaque: 0
119+
- _IgnoreZScale: 0
120+
- _InnerGlow: 0
121+
- _InnerGlowPower: 4
122+
- _InstancedColor: 0
123+
- _Iridescence: 0
124+
- _IridescenceAngle: -0.78
125+
- _IridescenceIntensity: 0.5
126+
- _IridescenceThreshold: 0.05
127+
- _Lightmapping: 1
128+
- _Metallic: 0
129+
- _Mode: 2
130+
- _NearLightFade: 0
131+
- _NearPlaneFade: 0
132+
- _NormalMapScale: 1
133+
- _OcclusionStrength: 1
134+
- _Parallax: 0.02
135+
- _ProximityLight: 0
136+
- _ProximityLightSubtractive: 0
137+
- _ProximityLightTwoSided: 0
138+
- _Reflections: 0
139+
- _Refraction: 0
140+
- _RefractiveIndex: 1.1
141+
- _RenderQueueOverride: -1
142+
- _RimLight: 0
143+
- _RimPower: 0.25
144+
- _RoundCornerMargin: 0
145+
- _RoundCornerRadius: 0.25
146+
- _RoundCorners: 0
147+
- _Smoothness: 0.5
148+
- _SmoothnessTextureChannel: 0
149+
- _SpecularHighlights: 1
150+
- _SphericalHarmonics: 0
151+
- _SrcBlend: 5
152+
- _Stencil: 0
153+
- _StencilComparison: 0
154+
- _StencilOperation: 0
155+
- _StencilReference: 0
156+
- _TriplanarMappingBlendSharpness: 4
157+
- _UVSec: 0
158+
- _VertexColors: 0
159+
- _VertexExtrusion: 0
160+
- _VertexExtrusionSmoothNormals: 0
161+
- _VertexExtrusionValue: 0
162+
- _ZOffsetFactor: 0
163+
- _ZOffsetUnits: 0
164+
- _ZTest: 4
165+
- _ZWrite: 0
166+
m_Colors:
167+
- _ClipPlane: {r: 0, g: 1, b: 0, a: 0}
168+
- _ClippingBorderColor: {r: 1, g: 0.2, b: 0, a: 1}
169+
- _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1}
170+
- _Color: {r: 0, g: 0.75, b: 0.75, a: 0.5019608}
171+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
172+
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
173+
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
174+
- _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1}
175+
- _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1}
176+
- _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1}
177+
- _HoverColorOpaqueOverride: {r: 1, g: 1, b: 1, a: 1}
178+
- _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1}
179+
- _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75}
180+
- _ProximityLightCenterColorOverride: {r: 1, g: 0, b: 0, a: 0}
181+
- _ProximityLightMiddleColorOverride: {r: 0, g: 1, b: 0, a: 0.5}
182+
- _ProximityLightOuterColorOverride: {r: 0, g: 0, b: 1, a: 1}
183+
- _RimColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}

0 commit comments

Comments
 (0)