public void LoadAbleBodiedAvatar() { // Load SaveSystem.LoadUserData("MD1942"); AvatarSystem.LoadPlayer(SaveSystem.ActiveUser.type, AvatarType.AbleBodied); AvatarSystem.LoadAvatar(SaveSystem.ActiveUser, AvatarType.AbleBodied, false); // Initialize UI. //InitializeUI(); // Change the number for the forearm tracker being used GameObject faTrackerGO = GameObject.FindGameObjectWithTag("ForearmTracker"); SteamVR_TrackedObject steamvrConfig = faTrackerGO.GetComponent <SteamVR_TrackedObject>(); steamvrConfig.index = SteamVR_TrackedObject.EIndex.Device5; // Configure the grasp manager GameObject graspManagerGO = GameObject.FindGameObjectWithTag("GraspManager"); if (graspManagerGO == null) { throw new System.Exception("Grasp Manager not found."); } GraspManager graspManager = graspManagerGO.GetComponent <GraspManager>(); graspManager.managerType = GraspManager.GraspManagerType.Assisted; graspManager.managerMode = GraspManager.GraspManagerMode.Restriced; }
public void LoadTHAvatar() { SaveSystem.LoadUserData("MD1942"); AvatarSystem.LoadPlayer(UserType.Ablebodied, AvatarType.Transhumeral); AvatarSystem.LoadAvatar(SaveSystem.ActiveUser, AvatarType.Transhumeral); // Initialize prosthesis GameObject prosthesisManagerGO = GameObject.FindGameObjectWithTag("ProsthesisManager"); elbowManager = prosthesisManagerGO.AddComponent <ConfigurableElbowManager>(); elbowManager.InitializeProsthesis(SaveSystem.ActiveUser.upperArmLength, (SaveSystem.ActiveUser.forearmLength + SaveSystem.ActiveUser.handLength / 2.0f), 1.5f); // Set the reference generator to jacobian-based. elbowManager.ChangeReferenceGenerator("VAL_REFGEN_LINKINSYN"); //elbowManager.ChangeReferenceGenerator("VAL_REFGEN_JACOBIANSYN"); // Initialize UI. //InitializeUI(); // Configure the grasp manager GameObject graspManagerGO = GameObject.FindGameObjectWithTag("GraspManager"); if (graspManagerGO == null) { throw new System.Exception("Grasp Manager not found."); } GraspManager graspManager = graspManagerGO.GetComponent <GraspManager>(); graspManager.managerType = GraspManager.GraspManagerType.Assisted; graspManager.managerMode = GraspManager.GraspManagerMode.Restriced; // set syn elbowManager.SetSynergy(theta); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { DestroyImmediate(this); } }
// Start is called before the first frame update void Start() { // Initialize ExperimentSystem InitialiseExperimentSystems(); // Initialize UI. InitializeUI(); // Configure the grasp manager GameObject graspManagerGO = GameObject.FindGameObjectWithTag("GraspManager"); if (graspManagerGO == null) { throw new System.Exception("Grasp Manager not found."); } GraspManager graspManager = graspManagerGO.GetComponent <GraspManager>(); graspManager.managerType = GraspManager.GraspManagerType.Controller; graspManager.managerMode = GraspManager.GraspManagerMode.Open; // SetWaitFlag(5.0f); }
public FakeTactileHand(GraspManager ingameGraspManager) { this.ingameGraspManager = ingameGraspManager ?? throw new System.ArgumentNullException("The providede Grasp Manager is empty."); interactionInputs.Add(force); interactionOutputs.Add(roughness); }