Skip to content

justinkyi9/summer_hololens_unity_workspace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Set up Colocated Workspace in Unity

Follow the steps in the parent repository to configure ASA before beginning these steps.

ROS

After installing the Unity Ros Hub configure the IP of your ROS computer in the Robotics setting tab.

image

Calibration

Similar to the parent repo a menu can be summoned by raising your left hand. Uppon pressing the create anchor button the project will begin searching for the calibration QR code. Once found a frame will be drawn on the QR code. If this position is correct press the "Create Anchor" button. The resulting anchor ID will be printed on the console as long as the device is plugged into the computer. To find the anchor ID, go to the output log and searched for the term "saved" using ctrl+F.

image

Feed this anchor ID into the "Anchor ID" field of the ASA Script. Upon rebuilding the unity and ROS enviornments should be succesfully colocated.

Creating Tracked Objects

image

  1. Open an instance of the TFManager script in the inspector (NOTE: There should only be one instance of this script in the project)
  2. Add a new subscriber to the subscriber list by clicking the + icon
  3. Make the "Name" field the name of the frame ID provided by the ROS message
  4. Make the "Game Object" field the object of the model to be moved (If a selector is used make this object a paerent of both the model and selector objects)
  5. Optional Make the "Selector" object a selector to be used for this object. After doing so check the "Selectable" box

The tracked object should now work automatically.

Velocity Tracking Triggers

The VelocityTracker script can be used in order to invoke actions when an object stops moving. The "Scale" property adjusts the scale of the velocity vector drawn on the object. The "Thresh" property adjusts the theshold at which an object is considered stopped.

image

The + icon under the OnStop list can be used to add unity events to invoke when the object is stopped. By adding a script with public methods to an object you can call the methods via this invoke list.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 57.0%
  • C# 38.1%
  • HLSL 4.9%