Skip to content

Sample Scenes

Olivia Sculley edited this page Dec 16, 2021 · 1 revision

JunLab

JunLab Image Currently, the JunLab sample scene is the only sample scene available. Please don't hesitate to submit a pull request with your own, or add your project to the README.

Machines

The JunLab implements a number of machines under the top-level "[Machines]" GameObject. These are the Doosan and Kuka located in the Machines folder.
While there are number of ways to implement the IMachine interface, the machines in the JunLab scene utilize the Machine class with several key points:

  1. Machines are built from a series of nested Transforms corresponding to their real-world locations (1 Unity unit = 1 meter) which are named from "A1" to "A6" or more depending on their dependencies. Thus, any rotation on a base joint cascades down with forward kinematics.
  2. These Transforms are then modified in Update() with the BaseMachine's Axis class. If AxisType.Linear is specified, Axis.Value will be directly multiplied in the direction of Axis.AxisVector3 in local machine space. If AxisType.Rotary is specified, then Axis.Value will be used in degrees around the axis specified in Axis.AxisVector3.
  3. The BaseMachine's Axis class assumes that the Axis.AxisTransform property for each Axis is not null, which means they must be populated either on compile-time or in Awake().
  4. Machines must have mesh colliders in order to utilize physics-based collision checking, with CollisionReporters.

Inputs

The JunLab also implements a number of inputs which can be found in the InputSources folder under the top-level "[Inputs]" GameObject.

Outputs

JunLab implements two outputs: ROSJointPublisher and DoosanROSJointService, which implements a custom ROS publisher and service, respectively. These are located under the top-level "[Outputs]" GameObject. In addition, there are simple physics based safety triggers that will shut off all outputs under the "[SafetyTriggers]", which is loated in the "[Outputs]" GameObject.

Singletons

Singletons are located under the top-level "[Singletons]" GameObject. You can read more on the singletons page. These must be present and enabled in the Scene. In addition, there is an EventSystem which is required to detect laser pointer interactions with the Menu System.

Environment

Environment objects are located under the top-level "[Environments]" GameObject. This currently includes static elements such as the Table mesh, as well as the Menu system. The Menu system utilizes several laser pointer elements under the SteamVR "Player" top-level GameObject for interaction. The laser pointer was adapted from the default SteamVR laser pointer script. The main menu contains pages for Inputs, Outputs and Machines. Inputs and Outputs can be toggled in-game, and clicking on any of the machines listed in the Machines panel will go to the Machine Detail panel. The Machine Detail panel allows the user to directly modify Machine fields in the Machine Detail page. In addition, inverse kinematics will be activated on the current if the activateIK SteamVR Action (can be remapped in SteamVR Input Settings) is held down while in the Machine Detail panel, and the current selected machine implements the IInverseKinematics interface.

Clone this wiki locally