// Use this for initialization void Start() { if (!this._graspable_object) { this._graspable_object = this.GetComponent <GraspableObject>(); } if (!this._gripper) { this._gripper = FindObjectOfType <ScriptedGripper>(); } this._grasp = this._graspable_object.GetOptimalGrasp(this._gripper).First; this._rigid_body = this._grasp.GetComponentInParent <Rigidbody>(); this._rigid_bodies = this._graspable_object.GetComponentsInChildren <Rigidbody>(); this._initial_position = this._rigid_body.transform.position; this._initial_rotation = this._rigid_body.transform.rotation; NeodroidUtilities.RegisterCollisionTriggerCallbacksOnChildren( this, this.transform, this.OnCollisionEnterChild, this.OnTriggerEnterChild, this.OnCollisionExitChild, this.OnTriggerExitChild, this.OnCollisionStayChild, this.OnTriggerStayChild, this._debugging); }
void Start() { if (!this._gripper) { this._gripper = FindObjectOfType <ScriptedGripper>(); } if (!this._target) { this._target = FindObjectOfType <Grasp>(); } //print ("GPU supports depth format: " + SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)); //print ("GPU supports shadowmap format: " + SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Shadowmap)); File.WriteAllText(this._file_path + this._file_path_gripper, "frame, x, y, z, rot_x, rot_y, rot_z\n"); File.WriteAllText(this._file_path + this._file_path_target, "frame, x, y, z, rot_x, rot_y, rot_z\n"); /*if (!File.Exists(_file_path + _file_path_pos_rot)) { * print("Created file/path: " + _file_path + _file_path_pos_rot); * //File.Create(_file_path + _file_path_pos_rot); * } * if (_deleteFileContent) { * File.WriteAllText(_file_path + _file_path_pos_rot, ""); * _deleteFileContent = false; * }*/ }
void Start() { this._pf = FindObjectOfType <ScriptedGripper>(); this._t_gripper_target_distance.text = this._s_distance.value.ToString("0.00"); this._t_obstacle_num.text = this._s_obstacle.value.ToString(CultureInfo.InvariantCulture); this._t_waiting.text = ""; }